[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Just a note on a shortcoming in contracts accuracy inTradestatio n



PureBytes Links

Trading Reference Links

I generally trade a fixed number of dollars when backtesting. Something like:

    Num = 20000 / Close;
    Buy Num shares ....

or

    Num = 200000 / (BigPointValue * Close);
    Buy Num contracts ....

When trading a fixed dollar of equity exposure, the ideal equity
curve is a straight line increasing X dollars per time period.

Trading a fixed number of shares or contracts tends to distort the
results and biases the system to what worked when the prices were
high. In the NASDAQ, for example. you would get big distortions over
the past few years.

Increasing the trade size as profits increase (as with "fixed
fractional trading") will quickly get you to huge numbers of
contracts where you will hit the 65000 limit. It seems totally
unrealistic to me since no one would scale bet sizes over a long
period.

Bob Fulks



TS2000i allows a fixed dollar transaction in the Format Strategy - Cost dialog but I never have used it.



At 6:06 PM +0200 7/7/01, Bengtsson, Mats wrote:

>This will not cause a problem for many, but it does for me. When I backtest,
>I want to be as realistic as possible, and also to include both commission
>and inflation in the calculation in a reasonable way. This is destroyed for
>me by the number of contracts being handled is based on a old wordint with
>maximum resolution of 65000 contracts.
>
>My solution has been to look att the market of Sweden (where I live), the
>commission rules, and the contract sizes. As an end result, I do my
>backtesting based on always buying for a fixed amount (30000 SEK, or around
>3000 dollars), and a commission on that. This means that when backtesting on
>previous years, number of contracts goes up, and the value of each trade
>will become independent of if it is a recent or a distant trade. Thus all
>signals are valued just as important independent of when they occurred in
>time.
> 
>This is easily done in Tradestation , just to enter a trade based commission
>and a fixed amount in the contract setup for the strategy. Now, this works
>except for symbols that has been around quite a while and have had a good
>price development. For such symbols, the current value will be around
>300-400 SEK but the very old value will be around 0.3xxxx SEK (splits,
>emissions, ...).
>
>I just learned (never got an error message) that tradestation can not handle
>more than 65000 shares in a contract (at least not in the automatic share
>calculation). When trying to buy 30000/0.333 shares (90090 shares) it
>decides to buy 65000 shares. Thus eliminating my ambition to have the same
>value over all years.
>
>This also combines with the decimal discussion we had in codelist a couple
>of days ago. Internally, Tradestation cuts decimals in calculations (I think
>I can figure out how they implemented that, most likely all internal
>calculations are performed in ticks. Thus a price back in year 1984 might be
>1.41414. Converted to ticks using the default it becomes 1.414 and number of
>contracts decided on deviates from the theoretical. Not by too much, but the
>difference is there. The lower the number, the bigger the chance is for a
>difference from the theoretical, until suddenly the difference becomes huge
>due to the above mentioned limitation in number of contracts.
>
>Well, I now have to decide, do I prefer my 30000 SEK tradesize since it
>gives me a good resolution on 400 SEK shares (one such contract more or less
>in a 30000 SEK trade amounts to around 1.3% in accuracy in the valuebased
>contribution). Or do I prefer a tradesize of 3000SEK which gives me the
>possibility to have old contracts valued to the same value as current
>contracts, but at the same time introduces a 13% accuracy problem for
>rounding of 1 share for 400 SEK shares.
>
>Ah well, just wanted to give you the knowledge on a possible trap, and
>another example on how the ridicoulusly low accuracy setting in Tradestation
>can affect us.
>
>Anyone backtesting out there that has suggestions on the solution?
> 
>--- Mats ---
>
>
>This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.