Australian (ASX) Stock Market Forum

What do you reckon about this trading strategy?

If you are still around. This is a stock scanner that isolates your chosen criteria from the XAO. It will give up a stock list and then you have a universe of stocks that meet the fundamental criteria. Not brilliant but it narrows down the field. I also use it to create a universe of pennies under 20c for example.

http://www.ascii-data.com/index.html
That's useful, Wysiwyg, thank you for posting this.
 
Thanks all for your responses. I have tidied the code up a little now and the returns are not so impressive but still good. I have got rid of the ref(.......,-1) and used settradedelays(1,1,1,1), thanks Chesl. I think that using multiple ref(....,-1) in the same line may have been tricking the system some how. I have also changed Buy = Ref(Close > Ref(HHV(Close,time),-1),-1)
to Buy = Close == HHV(Close,time) and a few other things like that. Returns since 2001 are now as follows:
Highest 1800%
Lowest 280%
Average - around the 700% mark

Still good returns so I will not trade the system until I am 100% confident that there are no bugs in it.
The above results were obtained using a Pseudo Monte Carlo method in Amibroker that I came up with. It is posted in the Software section of this forum and I reckon it's pretty good (If I may say so myself):)
 
Harro26,

Instead of doing the Ref(...,-1), could you try this:
SetTradeDelays(1,1,1,1)
Could anyone explain what each 1 in brackets represents please. Obviously one 1 is a trade open delay of one day.
 
Harro,

How about you run the tests on the stocks that were in the ASX300 in 2000 rather than those in the ASX300 now, to rid yourself of survivorship bias. It may also have a big impact on drawdowns.

Another weakness in this type of testing is the ability to actually implement all the trades at those prices. For example, one of your biggest wins was on RIV, bought on 21/7/2006 for .92, sold 23/1/2007 for 1.95. Yet on 21/7/2006 only 103,900 shares were traded and on 23/1/2007 only 321,000 shares were traded. To overcome relatively large costs associated with brokerage, your trading size would have to be large enough to greatly affect the opening prices, probably by quite a few cents on both the purchase and sale.

It is all the little annoying realities of the market that make this type of system seem so good on paper, yet fail in the real world.

brty
 
Your system uses the ASX300 index as entry and exits?
If you are trading intraday, beware of the staggered open.
Your system equity seems to refect the index moves heavily. Do a regression against the XAO and see how high the correlation is.

Cheers


Hi SkyQuake,

Could you explain how this would be achieved?


Thanks,
 
Harro,

How about you run the tests on the stocks that were in the ASX300 in 2000 rather than those in the ASX300 now, to rid yourself of survivorship bias. It may also have a big impact on drawdowns.

Another weakness in this type of testing is the ability to actually implement all the trades at those prices. For example, one of your biggest wins was on RIV, bought on 21/7/2006 for .92, sold 23/1/2007 for 1.95. Yet on 21/7/2006 only 103,900 shares were traded and on 23/1/2007 only 321,000 shares were traded. To overcome relatively large costs associated with brokerage, your trading size would have to be large enough to greatly affect the opening prices, probably by quite a few cents on both the purchase and sale.

It is all the little annoying realities of the market that make this type of system seem so good on paper, yet fail in the real world.

brty

Hi brty,

I have thought about this but wouldn't know where to look. Do you know where I could find the 2003 ASX300? The best I have done is test it against all symbols in AB and it still gives a pretty good return.
There are always going to be problems with paper trading a strategy and you won't really know how it will perform until you actually dive in and try it for real. Backtesting gives you a reasonable indication and is an essential step prior to trading a system. No matter how good a trading strategy appears you can always be spooked away from the market due to nuances as mentioned above but if the stategy looks good on paper it is the best bet I have to go on.
For info, the maximum amount that I will commit to a trade is going to be a ratio of the average volume over a recent time period. I haven't worked out the details yet (I have read about it in a book but I can't remember which one) and my next step is to do this and see if I can write it into Amibroker to give more accurate backtesting.

Harro
 
For info, the maximum amount that I will commit to a trade is going to be a ratio of the average volume over a recent time period. I haven't worked out the details yet (I have read about it in a book but I can't remember which one) and my next step is to do this and see if I can write it into Amibroker to give more accurate backtesting.Harro

In the AA settings box under the "Portfolio" tab is an option to limit the trade size as a percentage of entry bar. It may do what you want without the need for complex code.

Limit trade size as % of entry bar volume
This prevents from entering the trades greater than given percentage of entry bar's volume. For example if backtesting daily data and today's volume for thinly traded stock is 177,000 shares, setting this to 10% will limit the maximum trade size to 17,700 shares (10% of total daily volume). This prevents from 'affecting the market' by huge orders.
System test settings window
http://amibroker.com/guide/w_settings.html
 
Wysiwyg,

these are the results you were after in the other forum.
Period tested 1/4/2007 - 1/12/2008.
All trades were long.
XAO performance in this time -39%
I ran 100 tests against the ASX300 and the results are as follows:
Average return -19.56%
Best return -2.11%
Worst return -32.55%
Obviously a negative return but still better than the All Ords. I have run it from the start of the crash to now and the results are actually a positive return.

Against all fully paid ordinary shares the results are alot worse and are as follows:
Average return -52%
Best return -26%
Worst return -70%

This is why I am trying to find historical ASX300 lists as it may be this unreality inflating returns. I'll post on this site to see if anyone has this list.
 
Harrow, I used the same time as you17/9/2001 to 11/12/2009 with start up capital of 100k, 10 positions opened max., $30 brokerage, only long, min. 100 shares, min. pos. value $500, buy/sell on open and only the systems algorithms to open and close trades. (all stops disabled)

Max. system drawdown -35193.48
Max. system % drawdown -12.76 %
 

Attachments

  • untitled.jpg
    untitled.jpg
    110.3 KB · Views: 9
Harrow, I used the same time as you17/9/2001 to 11/12/2009 with start up capital of 100k, 10 positions opened max., $30 brokerage, only long, min. 100 shares, min. pos. value $500, buy/sell on open and only the systems algorithms to open and close trades. (all stops disabled)

Max. system drawdown -35193.48
Max. system % drawdown -12.76 %
Oh dopey me. I forgot to change the formula to PosQty = 10 and the PositionScore = Random. Was 4 positions and ranking.
The results are much more impressive.

Max. system drawdown -63624.76
Max. system % drawdown -9.81 %
 

Attachments

  • untitled.jpg
    untitled.jpg
    126.5 KB · Views: 11
Those are some good results Wysiwyg. I like the win/loss ratio. Are you using a similar trend trading strategy to what I am using or something else?
 
To hold trades for a fixed n bars before allowing formula to exit trade, then this code does that. Something I experimented with and had extremely varied results. Pending on n day bars held (e.g. 5, 10, 20 or 50) and date range back tested. Better results for a longer hold in a bull run with this strategy.

Example:

SetOption("HoldMinBars", 127 );
Buy=BarIndex()==0;
Sell=1;
// even if sell signals are generated each day,
//they are ignored until bar 128
Are you using a similar trend trading strategy to what I am using or something else?
It is different.
 
Top