Monday, December 21, 2009

Customers trade


Exited this one last week - I was hoping to make a year with it. Just over 120% up.

Tuesday, November 24, 2009

Walk Forward testing – some thoughts

The numbers below are from a weekly system I have been playing with. It’s not really a complex system, although it does use ranking of stocks potentially to boost results – something I am still contemplating as a strategy.

The buy signal initially only used one indicator – the one optimised in this test. I then added in extra criteria, but only when the index was bearish as determined by a moving average. I then added a ranking criteria based on momentum – the system takes the strongest stocks in terms of momentum. So the breakout criteria optimised in these tests is a major component since when the market is bullish it is the only buy criteria used.

The table below shows out of sample only results for 3 walk forward simulations. The walk forward used optimisation of a parameter used in an indicator, a dummy parameter with the real parameter fixed throughout the test and, in the final test the indicator that used the real parameter was deleted from the buy signal altogether. The optimisation metric used was profit factor in all tests, although it’s sort of irrelevant if the test is optimising a dummy value.



Working on the hypothesis that the in-sample tests are irrelevant, and to save words, I have left the in-sample results out of the above table.

The orange colored rows are using a dummy walk forward optimisation variable with the parameter / indicator removed altogether from the buy signal, instead of being a fixed value as in the white rows, or the optimised parameter in the yellow rows.

I also graphed CAR% below to get a better picture of the results.


So - the questions are;
1. Does the buy parameter / indicator being tested make any difference?
2. Is the system robust?
3. How valuable has the walk forward process been?

Q1 Whilst at first glance it doesn't make much difference look at the Maximum System Drawdown column, especially the last row when drawdown hit 57%. Whilst the parameter often doesn’t do a lot it was certainly worth having in the buy signal during the Global Financial Crisis. Exposure to the market was also often higher than the other tests when the indicator was removed, as was the number of trades taken.

Q2 The system's robustness is something that I would test using Monte Carlo analysis for further verification, although the system performed well over a range of different market conditions. I would like to understand what path the ranking is leading me on through the range of possible paths through the market.

Q3 I get a lot out of walk forward, but not in the sense that some people might. I am not keen on changing indicator parameters on a regular basis, but I have no real proof that my lack of keenness is warranted. But as a method of testing a strategy over a range of different market conditions and portfolio start-up dates it certainly is useful.

Without going into a lot of statistics I would be happy to say that there is no significant difference HHV optimised and changed every walk forward period and HHV "intelligently" fixed, however taking the parameter out altogether….no.

stevo

Saturday, November 14, 2009

Rubber glove bagpipe

Wonderful stuff - you should see what he does with a condom.



Linsey has a website as well.

stevo

Thursday, November 12, 2009

TradeSim Parametric Testing - good stuff!

I always thought it would be nice to optimise on position size criteria. It can be done in Amibroker, however TradeSim has really excelled with the recent upgrades to their software as shown by the following charts. It is clear that, with the system below, there is not a lot to be gained from increasing risk much beyond 1% in terms of net profit. Drawdown will increase, with some decent size outliers to spoil the party. I am sure I would manage to become an outlier (in the wrong direction) in actual trading!





These tests were run using TradeSim Enterprise Edition. I used Amibroker to generate the trades without having made any changes to the setup I had in AB for the previous version of TradeSim. The charts above do not do justice to the quality of the output - although the TradeSim site has better examples.

The charts above are from a monthly system I am using, as mentioned below.

regards

stevo

Wednesday, November 11, 2009

Monte Carlo and spreadsheets



I couldn't find any posts I had put up on this technique. I run Monte Carlo simulations (as many as you have the patience for - I did 200 runs) in Amibroker and then export the data to a spreadsheet.

The graphs shown above were done using Open Office, but any decent spreadsheet software will do (although OpenOffice is free for those that are frugal with their dollars :) ). I have done the same thing using Excel as well. I didn't generate the data for these graphs but the technique is quite easy once you master how to work out how to auto generate the "Bins" for the frequency distribution.

I put this up on ASF in response to a question - I haven't visited ASF for nearly a year.

regards

stevo

BTA & CTX - A couple of trades

I closed a couple of system trades over the last couple of weeks. CTX didn't do much, except to lose some dollars for me.


BTA was a more interesting ride. I remember taking the entry on this stock because it had closed at $0.87 on the Friday and jumped to $1.405 on the opening the following Monday when I was about to take the trade. I usually struggle to remember an individual trade after a couple of weeks. It peaked at at $1.79 for the week whilst I entered at $1.61! The volatility forced me to scale back the position substantially to reduce risk. I got out at $2.72.

I am wondering if I could consider recalculating risk on this sort of trade a couple of weeks in and add to the position size - something to ponder (but not lose sleep over).



The dog is looking at me like I should feed him so I better go - I sometimes wonder who is wearing the leash! According to accepted wisdom my dog is 90 human years old, although I haven't seen too many 90 year old men chasing possums (younger women maybe, but not possums)

regards
stevo

Tuesday, October 13, 2009

System design & testing

This post refers to a monthly time-frame system I mentioned a couple of posts ago.

To design this system I used ASX data for around 500 stocks from January 1999 up to the end of 2004. The initial ideas were coded and then optimised. The buy signal is made up of 2 variables and the exit is a simple ATR trailing stop plus a simple, rarely triggered, profit exit.

I optimised the variables, fixed them and forward tested up to September 2009. The whole exercise was completed over a weekend. It's not a question of what time-frame to use, trading is about what works for the trader.

The security profit distribution shown below has the top 50 winning trades excluded to see if there are any big winners impacting on the results. I excluded the top 50 since there were over 1000 possible trades over the 10 year period.


Yearly profit is shown below ($500,000 capital kept constant) again with the top 50 trades excluded.


Yearly profit without trades excluded.


I am ranking the trades, not so much to improve the performance of the system, then to stop me wondering which stock to pick out of the handful presented.

I also did some runs where I started the system up at the beginning of every year from 2000 through to 2009. There are some difficult startups based on these runs, but nothing that a trader that understands the system could not ride out. I am not starting from scratch anyway since the portfolio is already close to fully in the market.

regards

stevo

Thursday, October 08, 2009

Couple of Trades



A couple of trades that I closed recently. Nothing spectacular, but profits are profits. This system is the one I have been trading in this portfolio since January this year. The first trade was CUS (Customers) way back in January and it's still running.

LYC above was looking pretty good, but then I believe that the Chinese couldn't buy into the company due to FIRB rules and the price took a bit of a tumble - although I won't complain about a 40% plus gain.

stevo

Wednesday, October 07, 2009

Possible New System

Click on the chart to get an animation!

I have been a little busy lately, but I have had time to work on a new system. The chart shows what the system's potential could be. One thing that many people would struggle with is that the system runs on a monthly time frame. It should do nicely for my super fund.

I'll post some more test info when I get a chance - got to go.

stevo

Wednesday, September 09, 2009

Weekly Systems

In response to a recent question and stealing from something I did sometime ago...

Advantages of long term weekly systems;
1. Big money comes from big moves. Some of the biggest winners in the Australian market took several years to develop.

2. Less trades, less mistakes (although I still seem to manage!). Less trades (or trading) does not mean that less money is made or that less money is committed to the market. I am often fully invested.(I spent 6 months out of the market last year!)

3. Less time required (although the more capital the more time it takes). Much of my time is spent researching systems and strategies (not lately though - just trading). I also work, although my hours are quite flexible.

4. Reduced noise. Weekly charts allow the trader to stand back from the market and see the bigger picture. When I am on holidays I will often only check the prices on the weekend to see if any exit signals have been triggered.

5. Liquidity becomes less of a problem. I can buy or sell a stock on more than one day in a week, just as some might buy or sell several times through the day to get the position they want. I will buy up to 8% of average weekly volume, although I rarely do.


So weekly systems suit me, although each to their own.

I use the All Ordinaries index (around 500 stocks) as my universe of stocks.

The number of trades that trigger is dependent on the trading system used, the time frame and the number of stocks scanned. One of the systems I am currently using ranks the trades. I limit myself (in this system) to the top 4 stocks in the list. Another system allows discretion - flip a coin, look at the fundamentals, consult the stars, whatever, to make the final selection from the possible trades presented.

I use 1% risk position sizing. I don't worry too much about portfolio heat - I can easily have 20 trades running, although some will be below 1% risk due to lack of volume.

My biggest problem lately is adding extra money into the portfolio when it becomes available. I have been looking into the future and position sizing based on capital that will become available in the next 6 months from other sources.

I'm off to Europe for a while,

regards
stevo

Saturday, August 22, 2009

Cheap netbook & Amibroker


I loaded Amibroker onto a small 10" Kogan Agora Pro laptop to see how it would go. I had no problems installing and running Amibroker on the netbook - not all that surprising except it's running a version of Ubuntu linux called gOS. It just installed using Wine without any hassles.

It's not all trouble free, help and the editor seem to have some bugs, but as a small cheap travel computer to monitor a system it would work quite well.

The laptop itself is running surprising well - 2gb ram & 160gb hard drive for $439 plus postage is not bad. The wireless is not as powerful as my Dell but works ok. Considering that you can pay twice that for an iPhone it's quite impressive. Whilst it won't make a phone call it does come with Skype ready to go and a webcam built in - I'd like to see Amibroker run on an iPhone!

The screenshot is of one of my current trades, FXL. It's a very nice trade so far, although it's not over yet.

stevo

Saturday, August 01, 2009

Animating Trades


Stevo - just playing around. If you click on the chart above you should get a slideshow of some of my current trades.

stevo

Wednesday, July 29, 2009

PAN trade and an update



PAN was nothing spectacular but at least it made some gains. I re-entered this trade when the buy signal was triggered a week after I sold it. This system ranks the trades and I just take them in order so I have less decisions to make.

There has been a few sells in July as the market wobbled a little - some winners and some losers. Other sells included DYL, MMX, ETC, DOM.

Trading started up again back in January 2009 when signals started to appear. I was cash before then. With longer term systems it's usual to only realise loses in the startup period - winning trades tend to last longer whilst losing trades are cut short.

Over the last week substantial gains have crept into the portfolio - the market is looking promising. I am pretty well fully invested.

stevo

Saturday, May 30, 2009

At Last!!!

At last I sorted out my software to handle another cash account and put in all my back contract notes since September 2008. The following charts are based only on trade profits and losses. Interest and some dividends will help take the edge off the year, just a little bit.

Yearly performance shows that I gave everything that I made in 2007 back in 2008. Such is trading. 2009 is shaping up ok at the moment, at least the calender year will. It would be nice to present the data in financial years.



The equity curve suffered more than it needed to as I put significantly more money into the market over the last 18 months.

I am close to fully invested at the moment. Best trade this year is CUS.

stevo

Monday, May 11, 2009

Profit to Risk - current portfolio


I thought that Profit to Risk on current trades was a good way to see how the portfolio was tracking. The chart shows actual trades in the market.

A profit to risk of -0.5 would mean that the trade is half way to the maximum risk for the trade. So if risk was $10,000 then a profit to risk of -0.5 would mean that the trade is down $5,000. A profit to risk of -1 means that it would be time to sell.

This portfolio is showing some promise. I have some buying to do today.

Since I changed bank accounts part way through this financial year my records are in a bit behind, which is why I haven't been reporting portfolio performance (or lack of) on the blog. I have to link another bank account to my cash book in Stockmaster, whilst not losing data from the old account. I am sure that it is easy to do but I haven't worked it out yet.

Thanks Comsec for complicating my record keeping and adding an extra bank account to the mix! They have a set up where I have a Cash account and an Investment account. Everytime I make a trade I have to remember to transfer the correct amount from the Investment account to the Cash account so the trade can be settled. If I buy a few shares and sell a couple over a few days I have to do the maths and make sure that the correct amount is in the account. If I try to maximise interest I have to transfer the funds on a daily basis. If I am short then they charge a $50 plus fee even if there is millions of dollars in the Investment account, although if I ring them they supposedly waiver the fee. I have had to ring them once this year already.

I should have left things as they were rather than chasing a little bit more interest. I was 100% cash and an extra 1% (or something like that) seemed worth it at the time.

Enough of my complaining.

stevo

Friday, April 24, 2009

SBM sell signal


Another sell for the system. I acted on this on the monday following the signal. This weekly system is only just starting to get back into the market. I will probably only be selling losing trades for a few months.

The most promising trade in the portfolio is CUS. It was purchased back in January 2009 and is most of the gains in the portfolio.

stevo
Please note: I am not making any recommendations above. This blog is historical by nature - not real time in terms of trading.

Sunday, March 15, 2009

RMD sell


RMD looked promising, for a while.

stevo

Friday, February 20, 2009

Failure to act


I have really beat myself up on a failure to act on a sell signal.

I have used the excuse that I sold most of them so it's not such a big deal. But I am far from perfect – I stuffed up. It's easy to see the mistakes others make, but it's harder to accept failure in oneself.

I sold 2/3rds of BKN way back in September 09 when the signal was given for an average price of $9, but there was a part of the order just sitting there at the end of the week. I am out now for a substantial loss.

I guess I learned something. Experience can be the worst way to learn, but maybe sometimes it's the only way. Maybe someone will learn from my mistakes.

stevo

Wednesday, January 28, 2009

Sailing and trading


I know it's not trading related, but it's what I have been up to lately. The Google Earth image is a plot of the path of my sailing kayak last weekend. I have coloured it by distance, starting with red and finishing with magenta.

I have had a couple of buy signals in January (and both trades were taken!) so I might start posting some trading soon.

stevo