I trade longer term mechanical trading systems exclusively on the ASX. I rarely look at daily charts and the systems are built using weekly timeframes. The information in this site is based on actual trades in real portfolios. I don't trade using margin or any sort of leverage. I mainly use Amibroker for system testing and trade monitoring. I am not selling anything. This is just a journal to record where I have been and, just maybe, where I am going.
Wednesday, April 30, 2008
Random Entries and Black Swans
Systems;
1. Simple breakout.
2. HHV breakout.
3. RSI breakout - RSI must be above 70.
4. MA "breakout" - classic C crossing the MA, not really a breakout.
5. Random entry - uses Random()>0.955 in Amibroker.
The above chart shows the RAR of the 5 different entries teamed with a 12 week timed exit. So the exit is always taken 12 weeks after the entry.
Position sizing was 10% of equity.
The tests were run on the current ASX200 stocks.
The 0 to 80 axis is a dummy variable to generate 10 possible outcomes of each system. Positionscore was set to random.
Trades delayed and timeframe was weekly and the test was run from 1997 to December 2005. This allows, if so desired, for out of sample runs on all the systems up to April 2008.
You could investigate this sort of stuff for years wondering if the results are real, whether you are curve fitting, whether you got some test methodology wrong, or whether the whole concept of testing is flawed in some way etc.
stevo
Subscribe to:
Post Comments (Atom)
6 comments:
is it possible that the random trades are not a good comparison. basically, I wonder if adjusting the random # so that the # of trades is comparable in each sample vs the # of trades in each system is a better guage. what are your thoughts?
jw
The range of trades for all the systems is;
System 1 = 400 trades over the 9 years tested.
System 2 = 437 trades.
System 3 = 420 trades.
System 4 = 458 trades.
System 5 = 484 trades. (random entry)
The number of trades is reasonably close for each system - it's not like one system is generating 5 times more trades. You could spend countless hours trying to develop the perfect test.
The best performing on in-sample testing was the one that took the least trades. I haven't done any walk forward testing.
I would think that, over the time period tested the greater the number of trades initiated the greater the profits. System 1 clearly beat system 5 yet did the least number of trades.
It seems logical to me to have a system that only chooses stocks that have the greatest potential to move. This can be done quite simply by looking at the past movements of a stock. A major bank is highly unlikely to move 100% in 6 months, but many smaller cap stocks, and even some quite large companies, could.
Random trades doesn't target the faster moving potential of some companies. Entry is important.
The random entry was set to take around 5% of possible trades - similar to throwing a dice but only moving if a "6" is thrown.
It's a bit of fun coding up multiple entry trading system and optimising performance based on what entry works best. It would be possible to compare as many different entries as a trader could think of using this approach.
regards
stevo
Hi Stevo,
I find it interesting how the "Simple breakout" system outperforms the "HHV breakout" system so significantly.
May I ask, what is the Simple breakout system based on, is it bollinger bands?
Nizar.
An extremely interesting distribution of results and one which implies breakouts as an entry have some positive predictive value at the 12 week mark. The good part about the testing is the attempt to control for systematic biases (survivor bias, opportunity costs) - great stuff.
Nice thinking outside of the square. Methinks it's time to break out the backtesting engine again for some serious research into this idea.
MichaelD.
MichaelD & Nizar
An extremely interesting distribution of results and one which implies breakouts as an entry have some positive predictive value at the 12 week mark.
Some breakouts might have, but obviously not all.
There are roughly 200 stocks in the tests above. A breakout system may not discriminate between the different stocks and just look for classic style breakouts - new highs, moving average crossovers etc.
But maybe there is another aspect to breakouts that need to be considered. For example a breakout in something like a property trust or one of the big banks may not be as lucrative as jumping on a small mining company or a tech company.
It is possible to try and rank the relative strengths of the breakouts and pick the stocks that that have the most chance of making big profits. System 1 in the test above not only picks breakouts but it also looks for the stocks with more potential.
Potential need not based on any relative strength but on the absolute strength of the breakout. So a stock that has broken out is considered based on the past movement. If a stock is up 5% and has broken out versus a stock that is up 40% which one has the most potential?
I think it's good to endeavour to filter out the slow movers and stand in front of the stocks with the greatest potential.
Many people struggle with the idea of taking trades in stocks that have moved up a lot already. But these may be the stocks with the greatest potential, even if it would have been nice to jump on earlier.
When confronted with 100's of stocks we can be very selective - we don't have to take just any breakout. I would much prefer to take a trade that has doubled in the last 6 months than one that has gone up 100% over the last 4 years.
Nizar - it's not bollinger bands.
stevo
Stevo,
Thanks for your thoughts.
Though I haven't ventured as much as I perhaps should have into the area of relative strength, one thing I have tried is backtesting my system, with giving preference and ranking candidates according to highest ROC.
The benefit this showed was modest over the long term (2%pa), and it offered the same degree of benefit as ranking in order of ascending stock price.
Nizar.
Post a Comment