Glitch8
 ( 12.10% )
- ago
@jump on Discord asked me to analyze why his intraday strategy results did not match up with the same strategy run on daily data using the new granular processing feature. I responded earlier by showing how the granular processing feature is working correctly, but this didn't explain his differing results. I proceeded to do some in depth analysis of his two strategies, using this methodology.

@jump was testing on a DataSet of 700+ symbols on both 5 minute data and daily data, and wondering why the results did not come close. I tried to narrow the scope down by running both strategies on a single symbol, I picked ACLS.

@jump's strategy uses a text file of limit order prices for each day in the history, and both the intraday and the daily strategies use this file to determine their entry points. Running the strategy on ACLS for both intraday (IQFeed) and daily data showed an immediate large difference in the results.

I examine the position lists, and while they mainly lined up nice, the intraday strategy had one extra position for a large gain that threw off the results. I looked at charts and saw the following.

The I/D took the trade for 1/11/2021 at 10:10am because that bar hit the limit price of 28.50. But look at the daily bar for 1/11/2021. The order is not filled, despite the low of the daily bar being 28.45. Why didn't it fill?

Finally I figured it out, but it took a considerable amount of analysis of @jump's code. I finally noticed he was using LimitMove orders. These won't fill the order if the price opens below the limit. The price has to open above the limit and then move below it. On the intraday 5 minute chart, the order was able to execute, but on the daily chart not, because the price opened below the limit.

The mystery was solved, and as I suspected, the issue had nothing to do with the granular processing as @jump had suspected, but rather with his own code and how it operated differently on intraday and daily data.

When I changed the order type the Limit the two strategies had very close results, some small differences due to small differences between the intraday and daily data.

2
442
0 Replies

Reply

Bookmark

Sort
Currently there are no replies yet. Please check back later.