Rank: Newbie
Groups: Registered, Registered Users Joined: 8/27/2006(UTC) Posts: 6 Location: Washington, D.C.
|
It's easy to create continuous futures with MetaStock, but these seem to be pretty useless in trying to backtest data given the gaps. Does anyone have a good method for back-adjusting the contracts at rollover? It seems like such a basic request, that I'm assuming there has to be some functionality for this.
I spent an hour copying and pasting in excel last night to do this on my own, so any help would be appreciated.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 8/27/2006(UTC) Posts: 6 Location: Washington, D.C.
|
The more I dig through this site and some other web resources, it seems to be becoming clear to me that maybe metastock just doesn't have back-adjusted continuous futures. This is really disappointing to me as a new user, because the entire strength of the backtesting platform is moot without this data (for futures): a true case of "garbage in, garbage out". I guess I'll also post this in the "wish-list" section, but it's such a basic feature that it gauls me to do this.
In the interim - has anyone else spent the time to create their own back-adjusted continuous futures data? Maybe we can trade files, or discuss methodology, etc.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
mkelty wrote:The more I dig through this site and some other web resources, it seems to be becoming clear to me that maybe metastock just doesn't have back-adjusted continuous futures.
Mkelty, you are displaying a definite lack of understanding of what MetaStock charting is about. Back-adjusted data is a data issue, and not a MetaStock-related issue.
PremiumData is an excellent source of back-adjusted data. Quality in, quality out. ;)
jose '-)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 8/27/2006(UTC) Posts: 6 Location: Washington, D.C.
|
Wow - thanks for the very helpful and condescending personal swipe. I am not an idiot, and I understand that this is not a charting issue - but this forum is labeled for 'general discussion of metastock'. Getting back-adjusted continuous futures data is a basic need for anyone doing systems work in the futures markets.
If I'm paying $59/month to datalink for futures data, it just seems odd to me that I need to either (a) spend another ~$50/month for a better data source or (b) spend hours manually adjusting the data.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 12/19/2005(UTC) Posts: 2
|
mkelty,
I can relate. I have been trading futures for years. I cannot comment on Datalink, because I have never used it, but if your looking for another data vendor, CSI (www.csidata.com) is a good choice.
You can backadjust the contracts many different ways, and you can also specify almost any rollover day you want. Its software is very flexible about how data is to be adjusted.
Here is the pricing: http://www.csidata.com/ua/pricing/index.html
I used there data with Metastock for years and never had any problems.
On another note, when I back test, I used what are known as Gann contracts or the actually contract without back adjustment and just manually handle the rollover day in Metastock. This is kind of a pain, but its the only way I known how to handle the large gaps.
I hope this helps.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 8/13/2005(UTC) Posts: 90
|
co-conspirator wrote:
On another note, when I back test, I used what are known as Gann contracts or the actually contract without back adjustment and just manually handle the rollover day in Metastock. This is kind of a pain, but its the only way I known how to handle the large gaps.
Mr. Co-conspirator,
Can you please elaborate on "Gann contracts or the actually contract without back adjustment", - I understand the actual contracts without back adjustments may have gap if joined together. It seems I am missing something somewhere and your clarification might help.
Regards
Smg
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
mkelty wrote:Wow - thanks for the very helpful and condescending personal swipe. I am not an idiot, and I understand that this is not a charting issue - but this forum is labeled for 'general discussion of metastock'. Getting back-adjusted continuous futures data is a basic need for anyone doing systems work in the futures markets.
If I'm paying $59/month to datalink for futures data, it just seems odd to me that I need to either (a) spend another ~$50/month for a better data source or (b) spend hours manually adjusting the data.
Mkelty, no personal offence intended.
Again, this is a data supplier issue, and not a MetaStock problem. It would help if you described it as such.
My advice would be to dump your current (inadequate) data supplier, and subscribe to a reasonable data service.
For any serious trader, $x/month for a decent data subscription is peanuts compared to the time and effort required to manually back-adjust contracts properly.
jose '-)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 8/27/2006(UTC) Posts: 6 Location: Washington, D.C.
|
Jose -
I think the frustration I have is that the data supplier you suggest I dump is MetaStock/Reuters Datalink... I'm subscribing to the package for $59/month thinking that this was a full cost, not that I would need a secondary data supplier.
I hear you on the relative size of the cost, but I guess I'm just a little shocked that such a basic feature isn't available. It doesn't seem like it would take a lot of time or effort for one of their programmers to create this patch.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 12/19/2005(UTC) Posts: 2
|
Gann contracts are the acutally prices of the contract that have not been modified or joined togther. This only leaves one gap. I handle those gaps in the formula that I am back testing.
For example, lets say I'm running a test on Corn. I do not use a back ajusted contract. I test the system on all the contract months (March, May, July, September, December). CSIdata allows me to set the roll over day as any day I want. I usually set the rollover day to the first trading day of the contract Month. For example, the March contract would rollover on March 1, May contract on May 1st, etc. Since today is September 1, the September contract rollsover, so from today to September 1, 2007 my system will be looking at the September 2007 contract and not the Sept 2006 contract.
The gaps that occur are handled in the code I'm testing. I program the rollover day in, and tell the computer to close the trade the day before the rollover, and either reenter again or start over for the new contact. For example, if I had a Sept 2006 contract, I would have closed the position yesterday, and depending on the system, reenter today with a Sept 2007 contract, or start over with the Sept 2007 contract. What I mean, by "start over" is if I was using a 10 day moving avg. I would have closed the Sept 2006 contract yesterday, and wait 10 days into the Sept 2007 contact before reentering.
Again, this way of doing it leaves only one rollover gap for the whole year. But the problem is certain futures contracts are thinly trade a year out, so any system has to take that into consideration.
I realize that this is not ideal, especially for testing long-term systems. This is the only way I know how to get accurate results. For years I've been hoping someone out there has a better way.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 9/19/2006(UTC) Posts: 2 Location: Chicago
|
Let me know if you think what I'm doing is a better approach.
I've designed an Excel based systems which aligns all the contracts for a given futures market (S&P - 4 contracts, Grains 5 to 8 contracts, etc) and then uses a calendar specific to each market and each contract to calculate the difference between the contract about to expire and the next month out.. This difference is used to accumulate an adjustment factor (the sum of all prior such factors since the start of data). This adjustment is then added to the prices of the "current" contract to create a continuous contract. I think this would be called a forward adjusted perpetual contract.
The reason I choose forward adjustment (the downside of which is prices bears no numeric equality which what is actually traded) is that since I use neural networks to model future market activity, I have to have a static history for the model to work. In a backward adjusted contract the entire history is adjusted at every rollover.
This approach solves the problem you mentioned of distortion in using 1 contract 1 year out for rollover. If anyone would like a result of this system let me know and I’d be happy to send you a file if I have the market you trade. Any comments on quality of the process would be appreciated.
NeuralNetMan
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
NNman, I would use the ratio rather than the difference between contracts. This will avoid possible situations arising where contract differences eventually accumulate into negative data.
jose '-)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 9/19/2006(UTC) Posts: 2 Location: Chicago
|
Jose,
Could you clarify on the ratio method? Prehaps with a simple example?
I'm not use how to calculate it or apply it in the adjustment process.
I avoid going negative by adding a very large number to my initial prices which start in the 1950s So that it is not likely to go negative even with massive delfation for several hundred years.
Fredrick
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Let's take Crude Oil contracts for Aug & Sept 2006 as an example. I'll use the last day of trading in the August contract to simplify things, but ideally one would compare volume traded in both contracts and apply the back/forward-adjusting procedure at the point where volume in the new contract overtakes the previous contract's.
Crude contract 2006Q (Aug) closes at 73.08 in the last day of trading on 20/July/2006.
Crude contract 2006U (Sept) closes at 74.27 on 20/July/2006.
Difference: -1.19
Ratio: x 0.984 (i.e. 74.27/73.08)
In other words, I would multiply the Sept 2006U contract prices by 0.984 for forward-adjusting, or multiply past historical continuous data by 1.016 for back-adjusted continuous data.
jose '-)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/5/2006(UTC) Posts: 129 Location: Norgate Data
|
Jose,
With futures data and back-adjustments, I'd recommend using a additive/subtractive method rather than a multiplicative dilution factor. The reason for this is you usually operate and test trading systems on a POINTS basis.
On a stock trading system you usually want to calculate a PERCENTAGE capital return so, therefore, events such as splits/demergers/rights issues/return of capital etc. are calculated using a multiplicative dilution factor.
Cheers, Richard.
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 4/5/2006(UTC) Posts: 129 Location: Norgate Data
|
Note that negative numbers in a backadjusted futures contract are quite normal in contracts that are more often than not in backwardation. Backwardation is where the next delivery is trading at a lower value than the current spot month and when contract rollover occurs, this results the historical data being lowered to match the new month. Take enough of these together and your adjustments can cause the price to become lower. Crude Oil is a good example of this.
The opposite of this is contango where the historical data appears to go very high due to the next delivery trading at a higher value than the current spot month at rollover. Cocoa is a great example of this.
Let me know if you'd like to see some charts here that show this behaviour.
Cheers, Richard.
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Thanks Richard - good advice on the additive/subtractive vs multiplicative data dilution factors.
jose '-)
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.