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

Sunday, April 27, 2008

Equity Curves

I always thought that multiple equity curves from a Monte Carlo would be fun to plot.

The program is free from TickQuest.

I have to admit I don't really know what I am doing!

stevo

Monday, April 21, 2008

Even a monkey could write a great novel

I have been reading Fooled by Randomness by Nassim Nicholas Taleb. It’s a challenging read, but worth the effort by anyone that is into system design. I haven’t finished it yet.

To quote p.163;
“Beset with insomnia, the computerized day traders become night testers plowing the data for some of its properties. By dint of throwing monkeys on typewriters, without specifying what book they want their monkey to write, they hit upon hypothetical gold somewhere. Many of them blindly believe in it.”

The reference to “monkeys on typewriters” relates to the theory that if enough monkeys are put in front of typewriters eventually one of them will write War and Peace. I strongly suspect that the number of monkeys required would be impossible to find, let alone feed!

Any results need a good dose of scepticism – even a monkey can write a great novel!?

Trading is not just about making the maximum profit. “The greater the profit the greater the chance of going broke. “ (stevo 2008). Well maybe – I am not really into hard and fast rules. If I try for 100% plus returns using leverage then I might make it 3 out of 4 years, but the 4th year will wipe me out. If I plug for 20% I am less likely to self destruct.

Then there is the ride taken. I did some work on a fairly simple system. The equity curves are shown below. The system was developed using data from 1999 to 2003 so the walk forward equity curve looks pretty good.

Figure 1 Basic System

The first curve is the basic system from 1999 to March 2008. It looks pretty good considering I am not pyramiding profits into the system, just trading with a flat amount. The second equity curve has an index filter added to turn the buy signals off if the market looks weak. The equity curve is still pretty good, but total profits are down compared to the system without the index filter.

Figure 2 With index filter

But when I look at the period from Jan 2007 to current a different picture is painted. Without the index filter the equity curve is south of the zero line for most of the period, whilst the index filter version looks much more tradeable. . I always remember starting up a system back in 2002 and immediately losing money. Startup is always hard! Starting this system up at the beginning of 2007 would have been tough.

Figure 3 Basic system from 2007


Figure 4 With index filter from 2007. Note that a lot of the money was made in just a couple of trades, but at least it wasn’t given back as in the basic system.

Over the last 5 years from 2003 to 2008 turning off a system when the occasional market dip occurred didn’t really help make money. It was better to be in the market all the time.

But it’s not only about CAR (compound annual return) it’s about the ride taken. Measuring the ride can be difficult, but the equity “curve” paints a picture that most people can understand

stevo

Thursday, April 10, 2008

March Quarter

Not the best quarter. I've posted a yearly chart as well as the quarterly. The equity line is looking a little shaky for the start of this year. There are some early signs of life in the market - let's see what the rest of 2008 brings.

stevo