System testing - trade cost approximation?

fundjunkie

Member
Messages
56
Likes
0
All,
I'm looking into doing some back-test research. However, my investigation up to this point has raised a question that I'm sure you can answer...

I have seen that Metastock (as an example) allows a trading system to be tested and equity growth (and draw-down) to be tracked over time. I've also seen some historic data (for the S&P500, not individual stocks). This showed price info. for the index over time and immediately raised questions in my mind. The ability to track the equity profile of a trading system is clearly crucial but how can it be done if bid/offer spreads aren't factored into the calculations? Are these discretionary parameters that the operator, ie. me, inputs into the testing software prior to test?


Thx,
D
 
The bid/ask spread of a major index should be constant or near-constant in trading hours. Take that into account when you simulate your buys/sells. Take slippage into account as well -- either worsen your buy/sell prices by a small constant no. of pips or a random no. of pips within a reasonable range, or make a calculation of the speed of price movement at that time and worsen your buy/sell price by an amount proportional to the speed of movement.

Another way to make a simulation more realistic is to simulate fill times -- introduce a fixed or random time delay between order and fill, and set your buy/sell price to what the index is at the fill time, not the order time. Again, you could make the fill time proportional to the speed of price movement at the time of order.

This all assumes you're doing bar-by-bar trading simulation on historical data by hand or with software, rather than something much higher level.
 
If the data is trades data i.e. no bid/ask factor in a slippage of 2 ticks
If the data is bid/ask factor in a slippage of 1 tick

Then factor in the commissions.

In reality you might do better than this but you will at least know the system has a positive outlook in the real world and not just in a backtest.

JonnyT
 
........and the more times a system trades the more sensitive the results will be to the cost of trading (ie slippage & commission).
 
Not necessarilly.

It depends entirely on what the average trade is.

i.e. You could trade 10 times and make 3 ticks per trade on the other hand you could trade 10 times in the same period and make 6 ticks per trade.

I agree the more frequently you trade then the likelyhood is that the average trade will be lower.

JonnyT
 
.......and JonnyT is right. It was a generalisation, not something one should do in this business.
 
blackcab said:
This all assumes you're doing bar-by-bar trading simulation on historical data by hand or with software, rather than something much higher level.

I hope that backtesting software packages are configurable for this sort of thing and will be shocked if they're not. Handling the money side by hand while backtesting would make back-tests of longer timeframes virtually impossible (unduely onerous anyway) considering the productivity benefits that this software is meant to grant the user.

This point might seem quite basic/obvious but I'm still weighing up software packages and don't want to shell out big money on something that can't do what I expect. The general superficiality of product related information me rather apprehensive in that regard!
 
I think the programs have scripting languages that you can use to do that sort of thing, but I've never used them so don't know for sure.
 
Top