Monday, October 8, 2007

Maximising performance part 3

I have found that the greatest traders are the ones who are most afraid of the markets - Mark Weinstein.

I found a flaw in my testing method when ranking trades due to price, well, not a flaw as such, but the study design could've been structured better. Because I was ranking by lower priced stocks, this should mean, in theory, that there is only one possible route of trades to take. So everytime I ran a single portfolio simulation (with original ordering), all else being equal, the results should be exactly the same.

But they weren't, and I soon realised this was due to slippage. The variability would come from the randomness generated by the market orders which would buy a price anywhere between the low and the high of the entry bar and exit through any price between the low and the high of the exit bar.

As this wasn't a sound method of testing, I started again. For the purposes of this test, I ran monte carlo simulations (20,000) this time using default order slippage. Then I ran a single simulation through with the ranking giving preference to lower priced securities, also using default order slippage. So there's only 1 possible outcome. Then I compared this to the average portfolio result generated from monte carlo. The results are as follows.

01-01-1998 to 31-12-2003
Monte carlo average: 37.4%p.a.
With trade ranking: 38.9%p.a.

01-07-2001 to 01-03-2003 (The worst - XAO loses 18%, peak to trough of the bearmarket)
Monte carlo average: 1.5% (non-annualised)
With trade ranking: 13.56% (non-annualised)

01-01-2004 to 30-06-2007
Monte carlo average: 31.1%p.a.
With trade ranking: 44.6%p.a.

I don't think its coincidence that the more recent we go, the more wider the gulf becomes. I suspect it's due to not many stocks back in the 90s getting past my liquidity filter, though this hypothesis has not been tested. You can see this from the trade database. For the 6 year test between 1998 and 2003, there were 1234 possible trades, and for the 3.5 year test between 2004 and 2007, there were 1647 possible trades.

No comments: