Sunday, October 28, 2007

Customised systems

Make a list of everything that can go wrong and determine how you will respond to that situation. That will be the key to your success - knowing how to respond to the unexpected - Van K. Tharp

One of the benefits of designing your own system -- as opposed to buying one -- is that you can include the features you want and exclude that which you do not. The system can be, and should be, customised to suit your personal preferences. This also helps you to stick to the plan in those inevitable periods of drawdown.

So from the word go, from when you begin the systems design process, you should already know what sort of system you want to design, and which features are more important to you than others.

If you like a smoother equity curve, then have a shorter holding period (higher stock turnover) for your positions. This can be accomplished by having a tighter trailing exit (probably at the expense of profits).

If you cannot handle long losing streaks, then a way around this is to design a system with an entry which will give you a higher win%.

I was looking at improving my win% yesterday by using different universes as I currently use the whole market. So I tried the all ordinaries, ASX100/200/300, small ordinaries, and dividend paying securities.

Testing was the first 3 quarters of this year, 01-01-2007 until 30-09-2007, in an attempt to minimise inclusion bias (indices couldn't have changed too much throughout the course of the year). Nevertheless, it's only for relative measure anyway.

Results were as follows:

All Ords (488 stocks)
#Trades: 32
MaxDD: 2.73%
Return: 17.83%
Win% = 59
R/R = 2.06

Small Ords (199)
#Trades: 26
MaxDD: 3.97
Return: 14.58%
Win% = 50
R/R = 2.60

ASX100
#Trades: 37
MaxDD: 17.33%
Return: -15.79%
Win% = 23
R/R = 0.63

ASX200
#Trades: 41
MaxDD: 9.87%
Return: 6.84%
Win% = 37
R/R = 2.58

ASX300
#Trades: 39
MaxDD: 3.39%
Return: 21.51%
Win% = 61
R/R = 2.30

Div paying (645)
#Trades: 37
MaxDD: 4.65%
Return: 23.13%
Win% = 54
R/R = 3.08

Whole market (1951)
#Trades: 43
MaxDD: 4.57%
Return: 23.75%
Win% = 63
R/R = 1.93

The best returns were from the whole market, dividend paying securities, and the ASX300.

So I did 1000 monte carlo runs of each of them with the results as follows:

The format for profit is max/average/min/std deviation/%of portfolios profitable.
And for maxDD max/average/min.

Whole market
Profit: 55/18/-7/9.68/97.8
MaxDD: 17/6/1
Dividend paying securities
Profit: 43/12/-11/8.78/93.5
MaxDD: 17/6/1
ASX300
Profit: 43/12/-14/10.34/88.9
MaxDD: 17/6/1

The last figure on the profit column is one I pay the most attention to. 100% would be ideal.

To give some sort of benchmark the XAO (All ordinaries) was up by 12.5% over this 9-month period.

So it seems from this test that we can't expect an improvement by trading an alternative universe, at least from the options tested.

I will be adding $20,000 of trading capital to the system this week just to make it compound quicker as we are approaching the month of November. November to April is traditionally a very strong period for equities.

From the weekend scan, the full list of possible candidates are as follows:
AQA, BEC, BLY, BKN, CPB, CEY, DWS, FLT, GMI, JBH, LEI, LGL, MSL, MIN, NCM, NOD, RCR, SMX, SDG, UGL, WTP, WOR, WTF.

I applied 3 filters. The chart has to be good. Clear uptrend and not in a trading range.
This narrowed it down to AQA, BEC, BLY, LGL, BKN, MIN, NOD, RCR, SMX.

Then I checked if any were under takeover. None were.
Then I picked the lower price securities or the ones I liked. LGL a gold play I just had to buy it.

MIN and BKN even if they didn't trigger, I could pyramid because i have reached 15% profit (that's what was backtested).

Since I could probably afford 3 more positions, I'm going with LGL, NOD, and BLY.

Here is a website I check to see Broker consensus. It's another filter I've added. I like to see a minimum rating of buy or strong buy.

Remember the system is robust and well tested so it doesn't matter HOW we pick the stocks from the candidates spat out by the scan. All the testing initially was done by picking random trades (monte carlo analysis).

Ranking by price and even pyramiding trades, only adds 1-2%p.a.

Friday, October 19, 2007

Portfolio Update 20/10/2007




Seek and you shall find

The single most important element to being successful in the markets is having a plan. First, a plan forces discipline, which is an essential ingredient to successful trading. Second, a plan gives you a benchmark against which you can measure your performance - Howard Seidler.

It really is amazing how much good information is out there on the internet. And the best part is that most of it is free. All we have to do is look for it. I feel I have learnt a great deal from online forums and other resources available over the internet. This post is simply a list of material that I have used and that others may find useful.

I have started numerous threads over at Aussie Stock Forums, including topics such as:

*System Robustness
*Drawdowns
*Would you trade this system?
*Outside the "Blueprint"
*Systems testing

And read the whole thread. Don't focus on what I write, but rather, on the responses, which are mostly from seasoned professionals.

This is an interview with author and hedge fund manager Robert Pardo. I think it's very good and I found it useful. He covers several important aspects of systems development.

Chuck LeBeau's presentation on exits is another resource I would highly recommend.

On Nick Radge's forum, there is so much knowledge you would not believe.

Tech/a has shared the discussion regarding the full design and development of his system and traded it live and answered questions for the last 5 years. Any question you have on systems development chances are somebody has asked it and it has been responded to. I would recommend reading the whole folder (about 50 threads).

Also, in the Trading Systems section, go to the very end, and read anything by Stevo and OPM and tech/a. A search may be helpful here.

And lastly, I just stumbled across another forum recently, called Elite traders. This thread by Acracy is pure gold. I would regard it as the next level of system development. He goes beyond entries, exits, and money management.

Tuesday, October 16, 2007

Don't be fooled by randomness

All great traders are seekers of truth - Michael Steinhardt

The whole purpose of systems development is to find a method of trading that gives us an edge. An edge in terms of trading can be defined as probability of making profit which is greater than random chance.

If our probability of being profitable is the same as random chance, then any gains we make can be attributed to luck. That said, luck is also an important and often underrated factor when it comes to trading. We can see this from the difference in the results between the minimum and maximum of thousands of monte carlo simulations. This is why we should aim to design systems with enough rigidity so that the distribution of results is nice and tight. But this is another topic.

Here is nice definition of an edge: "If you make only bets on which you have an edge, you will win and you will lose but in the long haul your winnings will overwhelm your losses."

A good way to test a system is to compare it to another system which is based on randomness. ASX.G has done significant work on this. I ran one test but it was enough to confirm the work he had done. An random system with 10% chance of entering on any bar and 20% of exiting on any bar returns about 1%p.a. greater than the market, on average. The luckiest bastard made many thousands of percent.

In addition to this, I did a bit of testing to attempt to see whether the edge in my system was in the exit or the entry. And from my work, I can say that entries are very underrated.

The testing period was from 01-01-1998 to 31-12-2003.

The market as a whole underperformed it's long term average significantly during this time, with a compounded annual return (CAR) of only 3.82%p.a.

My whole system returned 38.90%p.a.

My system with my entry and random exit: 28.00%p.a.

My system with my exit and random entry: 7.74%p.a.

Random entry/exit was defined as a 10% chance of entering/exiting on any given bar.

My system with my entry and random exit: 15.95%p.a.

Random exit here was defined as a 5% chance of exiting on any given bar in an attempt to extend holding time to that similar to the original system which is 20 bars. It looks like the trailing stop becomes increasingly important in this instance.

But still, it seems most of the edge lies in the entry.

Sunday, October 14, 2007

Speaking my language

Some people say, "I can't sell that stock because I'd be taking a loss." If the stock is below the price you paid for it, selling doesn't give you a loss; you already have it - William O'Neill.

It's nice to see somebody else speak your language. I was reading this week's BRW and there was an interview (pg.78-82) with a hedge fund manager named Karl Siegling. Below are some of the things he had to say about the way he trades. His fund's gross return is up 75.98% over the last 15 months (inception) and about 32% for the last 6 months for Australian shares.

"A falling share price is not a buying opportunity, but a clear warning from the market that something is wrong. Repeated new highs for a stock are not evidence of a missed opportunity or an overpriced company, but rather an invitation to buy more shares."

"I believe that there is no sense, no matter how compelling our fundamental belief may be, in buying into a stock as it is falling in value."

"I believe that the words "contrarian investor" are often used out of context, and that a contrarian strategy of constantly buying and adding to a falling position and constantly selling or shorting a rising market leads an inexperienced investor into making costly mistakes."

"The market can be irrational and sell down a stock for no reason - no reason based on the fundamentals of a business. But it's not for us to say when the market will stop being irrational."

"I will buy shares at, for example, $1, then $1.10, and then $1.12, but if I have just paid $1.12 for a stock then I will not pay $1.10 if the price falls a few days later. That's because I like buying shares that are going up."

So do I, Karl!

Based on these sounds principles, his strong performance comes as no surprise.

Saturday, October 13, 2007

Not an exact science

You've got to know when to hold 'em; know when to fold'em; know when to walk away; and know when to run - Kenny Rogers.

Backtesting is not an exact science, and has its limitations. At times, it can be said that the best computer is the the one between the ears.

One limitation that I only discovered recently was regarding company M&A. I realised yesterday that 2 out the 10 companies that I purchased this week were under takeover offers. So I was wondering how TradeSim handles these situations, because, I want to stick to the plan which was backtested with the least degree of deviation as possible; so I have the most chance of realising similar results.

Well TradeSim is only as good as the data that you feed to it; and data is simply 5 values for each bar. It cannot in any way account for company decisions. So when a company is delisted i.e. stops trading for any reason (merger with another company, script takeover, cash takeover, change of stock code, bankcruptcy), then TradeSim will close the position on the last bar it traded, the trade will be found in the TradeSim trade database as an open trade, and the price will be at the price it last traded (regardless of how long ago that was).

It will be marked as an open trade to differentiate from those trades that were closed out because they hit the protective stop or triggered a normal exit.

So it is upto me how to deal with these company M&A situations. I think at least for now, I will just leave the positions as they are, but will reassess the situation periodically.

I will not be updating the portfolio this week because all exits (as are entries) are delayed by one bar, I will have to check at the close of the next bar, which is next week, to see if any stops or exits were triggered. And I won't be running a scan (exploration) for any new candidates because all my capital is already in open trades anyway.

I notice there's some media articles regarding next week being the 20th anniversary of the 1987 crash. Some commentators say that this may well be a cause of market "jitters" next week. I guess that sort of news sells newpapers.