1. Place the time frame that you want on the chart for as far back as you want. (1 min, 5 min, etc)
2. I'm not by my PC right now so I wasn't able to verify/compile this, but an example of the code you need to put into your strategy looks like this:
3. Depending on how far you go back, using those continuous contracts built into Tradstation (@ES for example) becomes more and more of a risk. for instance, if you compare @ES with unmodified data, it will be more than 100 points off if you go back to 2005. If you want true price action, you need to create a custom contract.
The following 2 users say Thank You to shadrock55 for this post:
Concerning continuous contracts-I'm just thinking about the problem of historical offset
and in which cases there will result a problem because of that.
How is the logic that is used by Tradestation to construct continuous contracts
and what would be an aproppriate customized cont. contract to avoid problems due to backadjustment?
One the one hand I look for realistic historical prices of commodities
and on the other hand I want to do realistic backtests with the data.
Is it possible to export single historical contracts ?
I'm quite new to backtesting with futures and I'm looking forward to learn as much :-)
I'm a little confused, but I here's what I think you want to know.
I've actually purchased data without adjustment since I wanted large amounts of tick data, and I always use that in my backtesting. On the off event I use TradeStation, here's what I do.
Under custom futures, I select.
1. Type in the root
2. Time: 8 days prior to expiration
3. Back Adjustment Method: None
If you are trading over night, you will need to monitor these days or take them out of your trading model because it will create a gap. I do not, so it is not an issue for me.
I alway test on unadjusted because I want to know the true percentage and point size of all the moves. It throws off indicators, moving averages, and even the size of the pure price action. I just feel like I need to test on what actually happened (especially if I optimize).
I'm sure there's a varying opinion, but it just gives me comfort.
I focus on overnight strategies with holding periods arround some days, weeks or even months.
Later on I might trade based on CFD's or certifiactes since I don't have to worry about rollover by using that instruments. Since there is no data history available for those instruments I have to test based on historical future prices.
It seems like I have to include rollover into my backtesting by using to different nonadjusted continuous contracts with two different switching periods prior to expiration.
Whats the method of Tradestation for backadjustment and switching contracts to construct the readiliy available endless contracts?
I'm not sure of the exact methodology. Here's what they had in the help.
"Once a rollover point is reached, the data must be adjusted. The TradeStation network does this by either adding or subtracting a constant to all data that exists before the rollover point, all the way back to the beginning of the data series."
Rollover is only 4 days a year for most symbols, so when I used to hold over night, I just set it to sell out before rollover and start back afterwards. If you're holding for months, however, that won't help you. I'm sure there are others who have encountered the problem who may be able to help.
I don't know what a CFD is, but I would not take a tested strategy from one future and apply it to another unless you are sure they trade in tandem and with about the same volatility.