Showing posts with label trading system. Show all posts
Showing posts with label trading system. Show all posts

Sunday, October 03, 2010

Spreadsheets & Amibroker

 The chart above shows system performance without a profit target versus the chart below that has a profit target.
I haven't posted for a while. I find myself becoming quite secretive about trading methods and system performance!

But I have decided that I am happy to share some stuff about what can be achieved with Amibroker and some spreadsheets. The series of charts above were generated using a dummy variable in Amibroker to produce a range of outcomes from the Explorer. I have mentioned this elsewhere in this blog.

I use a template spreadsheet and just copy the data from Amibroker straight into the spreadsheet and up pop the charts above. These charts were produced using Open Office, not the best spreadsheet software on the market but certainly the cheapest - free. It is quite capable for basic tasks like the one above.

These charts are created using frequency distributions. The intervals for the distributions are automatically generated.

A profit target between 200% and 400% for the long term system (ave hold time of 290 days) shown above works quite well. Not a lot is gained by setting a higher target, and drawdown is slightly worse.

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.

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, February 27, 2008

Trading, GPS navigation and mates

I have a mate, a really good friend.

I rely on GPS navigation systems when I drive around the city. I figure that, even though there may be a quicker way, on average, I am better off with a good navigator. My mate (call him Peter) detests sat nav systems – he knows the city exceptionally well and the nav system is pretty well nearly always "wrong".

Peter decides that he wants to trade, wants to make some easy money. The managed funds he holds are doing ok but he is sure that he can do better. So he comes to me. I know that it is not as easy to show someone how to trade so I give him a list of things that he has to do – set up a brokerage account, get a data feed, buy software, work out how much money he wants to use. I want him to think about how much effort is involved. This takes him around 18 months to set up since he is very nervous about jumping into the market and also has very limited computer skills (his wife is much more comfortable with computers).

I give Peter a system, as well as a list of simulated trades that the system would have made over the last 5 - 10 years. I suggest that he studies these past trades to see how the system performed, what it’s weaknesses and strengths are, to get a feel for the system. I am very conscious that this is unlikely to happen. Paper trading is very hard. The pull of the markets, the excitement making that first trade is far too strong to waste time understanding what could happen and how the system behaves.

As usual, after waiting for some years before he can gather the courage to face the markets , the market struggles and Peter loses a little bit of money. But soon he falls into a rhythm and seems to be following the system quite well. He even wings a couple of trades because he believes that he is getting a feel for the markets.

Then the market has a bit of a downturn and Peter, who has been trading quite well for around 18 months thinks that he can improve the system by ignoring the sell signals, much like he ignores a satnav system. For a few trades he waits a few weeks and then gets out a little better then acting immediately on the signal.

But then he ignores the sell on CHC. This is not the only sell signal ignored, there are a couple of others, but this one illustrates the point nicely – none of them have recovered yet. Instead of getting out at around $2.50 back in December 2007 he holds it.



It’s early February and Peter isn’t looking too happy. I ask him how the trading is going.
“I don’t want to look” he tells me.
Over a couple of days I find out about CHC and another trade that have gone seriously wrong.
“What should I do? What would you do?”
“I would have sold CHC back when the signal was given.” I tell him. “If I did somehow ‘forget’ to act on a signal then I would get out as soon as I realised my mistake. I would sell immediately and move on.”

I am in a risky position. It is just as likely that as soon as the stock is sold it rebounds back above a $2 and Peter is cursing acting on my system based advice and believing that his judgement is better than any system. So I make sure that he understands it’s his decision, he is outside the system and I really have no special knowledge of what might happen to this stock over the next few months. He is navigating blind in a city where roads are built, moved and destroyed every day. In this sort of city a well thought out strategy is required if you want to get to your destination.

This is a true story and I take the following from it;
1. If you are going to trade a system then trade the system, don’t try to beat or “improve” the system on the fly.
2. Believing that you have some special, innate ability, some “gut feel” for the markets is a seriously delusional state of mind. Sure you can be lucky some of the time, but luck tends to run out the more it is relied on.
3. Taking a loss is hard for many people. We are not brought up to take losses. Trading is not a natural activity for humans to undertake.
4. Some people seem to be able to follow a system as easily as they breathe. They don’t question, they don’t try to beat it, and they just follow the signals and move on. For others it is not that easy!
5. Don’t look back – always move forward. What could have been is irrelevant. Peter would always say things like “if I had held it longer it would have recovered.”
6. We tend to see what we want to see. It is easy to find examples that validate our beliefs about the market and ignore the trades that don’t.
7. Some people are not suited to trading a system, or trading in general. They should go for managed funds or use a blue chip buy and hold approach.
8. It is much better to learn from another’s experience than to be the guinea pig yourself. Experience is the cruellest teacher when it comes to trading.

Do we really believe that we are, without any training, strategy or insider knowledge, natural born traders? Or do we just try to sway the probabilities in our favour and hang on for the ride?

stevo

Sunday, December 16, 2007

Market Volatility


The chart above shows the small ordinaries index on the Aussie market. The small ords is made up of around 300 stocks but excludes the top 100 stocks (ASX100). So all the big banks and giants like BHP & RIO are taken out of the picture. All the so called blue chips are stripped out of the picture - I usually don't hold too many blue chips in a portfolio.

The chart is weekly. The top chart shows weekly movements in the Index close price. The most volatile time on the chart occured this year, with a move of -8.46%, followed by a +7.3% reversal. This must have been very challenging for short term traders and certainly woke up some long term trend followers!

The bottom chart shows 52 week ROC (adjusted). The switch from below the 0% line to above it is clearly shown back in 2003. The white horizontal line on this chart goes back 52 weeks.

The red bars on the middle chart show when one of my systems turns off. The green lines show when the system is on - colour is very useful on charts!

Now to state the obvious. We are at a potential turning point. We appear to be drifting sideways with some wild swings in either direction.

I am not going to try and predict the future from this chart because that is not the way I trade, except to say that it is pretty obvious that the market is more volatile now than it has been.

This post was inspired by Andrew's Humble Money blog and his post on The Return of Volatility.

regards
stevo

Friday, August 10, 2007

JBH - goodbye


Another exit earlier this week. The system above was one I developed for slower moving stocks like QBE and WOW.

I was hoping that the market would stay reasonably calm this week since I am heading for a tropical island for a week - work related of course. It looks like I will have to place some sell orders next week after the DOW dropped 387 points last night.

stevo

Monday, July 16, 2007

Optimising & % trades not taken

I did an 2 parameter optimise on a weekly system I am working on. The axis marked "Monte Carlo" is a dummy variable - the variable is not used anywhere in the system. The axis marked "trades not taken %" is where a % of buy signals were ignored at random.



With this long term weekly system the more buy signals ignored the lower the CAR (Compound annual return %). I could ignore 10% to 30% of the trades without a huge dropoff in performance.

The "Monte Carlo" axis shows the variation of CAR at different levels of trades not taken. If a big trade is always taken because no trades are ignored then this one trade could give a false impression of the system. By testing with a random buy variable it is possible to approach Monte Carlo simulations using a different randomising approach.

Also I randomised the buy and sell price over the week the signal was given (it's a weekly system) so, even at 100% of signals not ignored there was slight variation in the results.

Hope that all makes sense!

stevo