be in a dilemma for trading futures?

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

be in a dilemma for trading futures?

Post by yoyo2000 »

I meet dilemmas when I'm developing futures trading system,they are problems of data

proceeding.
We all know that each futures contract has a starting date and a expiring date,for

example,Cu contract usually starts in July and expires in Jan.when we chain all the contracts with the same starting and expiring month in the same market,there is always a big gap between this starting price and previous expiring

price,it's not suitable for a indicator troughout the whole period of the contract,so how

to test a mediun/long term system on several markets.

A suggestion is to test on index data,that's,create an open interest-weighted index from

all the contracts in the same market,regards the results from it as the performance of a

system on the whole market.But when a

long/short signal occurs on index data with this system,the operator have to check

whether this signal could be performed on contracts in this market,there are too many

unstable factors in this period,so the performence between test and reality would be very

huge.

Another suggestion is to create some continuous contracts from a market,a case is picking

the most active sections of contracts in a market to compound an index data.So new problems of adjusting contract comes:

1. should I back-adjust or forward-adjust? back-adjusting data could keep the data in the

most recent section the same as the data in the most active real contract,but the absolute value of data in the older sections would be distorted ( althouth there is

no change to their relative relationship ),but with date going,the contract with the most active data changes,and new 'most active data' is added,the new absolute value of data in previous sections would change,too.So the value of some indicators,which are base on the price of data (not on the

relationship),would change accordingly,probably the signals for trading(entry price/exit

price) would change,the results of a system in this data proceeding rules may not be

stable,how can I believe this system?
If I decide to forward-adjust data,that's,letting the absolute value of starting data

be,and revise the data in the following sections,in this way,once the data is

revised,they will not be changed any more,the result of test on them would be

constant,but the absolute value of data in the most recent section are different from

their relating real market data completely,althought their relationship between the data

are the same.The direct effect is,the position sizing rules in test may be different from

those in real trading on real market data completely--the entry / exit price are not the

same,also the result of risk measuring.

2. in order to eliminate the gap between different sections,should I adjust them with

add/subtract rule or multiply/divide rule? with add/subtract rules,probably many data's change originally in the limit-day range,but not after being added / subtracted,for example,two close price originally are: 8341 and 8123,the change% in real market is (8123-8341)/8341*100=2.64%,which is in the 3% limit day range,in order to eliminate the gap between two sections,that are subtract 3000 to 5341 and 5123,the change% in this state is 4.08% > 3% limit day rule.

How to sovle these problem please?

regards.
TrendMonkey
Roundtable Knight
Roundtable Knight
Posts: 154
Joined: Fri Apr 22, 2005 9:14 pm
Location: Vancouver, Canada

Post by TrendMonkey »

[moderator edit]

Yoyo, CSI's web site has a bunch of so-called technical journals where the founder, Bob Pelletier, talks at length (at GREAT length, some might say) about the approaches and dangers of creating continuous contracts. They are free and you could start there, but be careful, it's a bit like saying 'do you have a minute to explain the theory of relativity to me'?

Personally, I find the whole backadjusting thing (needing to rely on artificial data when backtesting) a very scary thing and I share your concern. However, I seem to be in the minority, most of the other folks on this site seem to have gotten over it, and they are infinitely more experienced than I.
yoyo2000
Roundtable Fellow
Roundtable Fellow
Posts: 58
Joined: Fri Jan 30, 2004 10:37 pm

Post by yoyo2000 »

[moderator edit]


could you please give some suggestion on how to deal with the drawback of back-adjust/forward-adjust continuous data?

TrendMonkey,thanks for your hints,could you please give me a detailed address?

and here is my revised description about the same question(some snapshots are plused from my friends)

IMO,the most difference among spot futures data and continuous futures data and weighted compounding futures data is about medium/long term trendency.
this is a snap of spot futures data,it start in Nov. and expire in May in every year.
Pic 1:
http://imageserver1.textamerica.com/use ... 955429.jpg

we can't get any information about medium/long term trendency of this class of contracts when we observe these contracts individually,but when we chain them up,we get to know something about its medium/long term trendency(shown in snap),but with the big gaps between price in previous expire day and the in the next starting day,the trendency is distorted,so we should do something to correct it,all my puzzle come from this basic thought.

In order to eliminate the gaps,at first,I planned to build an index data from those basic real market futures data,that's,multiplied price with open interest each bar,the result are every bar's open capital -- capital stored in market in each bar,then sum all contracts in the same market up each bar(there are 12 contracts in this market),also added their open interest up each bar,then divided total open capital by total open interest each bar,by this mean,a weighted bar is built,I repeated this procedure again and again,a series of weighted data is built:
Pic 2:
http://imageserver1.textamerica.com/use ... 545802.jpg

I then run systems on this weighted data,and got an acceptable result,but I found a new problem:when a signal is occured with my system on this data,I don't know which contract should I take,and I don't know how to set rules to pick corresponding contract,it's really a big problem.

then I want to tried another way to eliminate gaps.after studying,I found some contracts' (active) main period are continuous,so I divided 12 contracts into 4 groups.the periods and groups are shown in the following snap:
Pic 3
http://imageserver1.textamerica.com/use ... 526720.jpg

firstly,I picked the first group including contracts expired in Jan,May,and Sep.for each contract,in order to avoid liquidity risk,I cut the data in the first 2 months and last 1 month,the rest data in 4 months in 3 contracts could be joint.but gaps are still be.
pic 4
http://imageserver1.textamerica.com/use ... 737849.jpg

but at least,now if the system sent a signal to entry or exit,I could immediately know which contract should I operate on.

but now,the big problem for me is:
in order to eliminate gaps,should I adjust data from the most recent part back to the older part(back adjust),or from the oldest part to the recent part(forward adjust)?should I add/subtract something to eliminate gaps or multiply/divide factors to do so?
Attachments
pic 1
pic 1
screenshot4358.jpg (151.98 KiB) Viewed 4084 times
pic 2
pic 2
screenshot4359.jpg (136.9 KiB) Viewed 4084 times
pic 3
pic 3
screenshot4360.jpg (41.62 KiB) Viewed 4084 times
TrendMonkey
Roundtable Knight
Roundtable Knight
Posts: 154
Joined: Fri Apr 22, 2005 9:14 pm
Location: Vancouver, Canada

Post by TrendMonkey »

I am really not qualified to comment on any of your questions/comments, but these guys live breathe & eat this kind of stuff.

http://www.csidata.com/techjournal/index.html
Post Reply