Australian (ASX) Stock Market Forum

Medium to Long term system development

Re: Short/Long term system development

G'day all,

mit said:
Testing for the period 1-Mar-1999 until today returned 17% per annum on average (MDD 26%). Which is better than the market.
However, there would be some survivorship bias in the results as we are using the current asx200.

I tried this in AB and got nowhere near these results. For this period I got a total of 39 trades! And 4% annual return. Obviously something is amiss in my settings. Can anyone else confirm the above figures???

Thanks,
Andrew.
 
Could you show me your code and your settings? Look under amibroker\reports and you should be able to zip the report and send it to me or post it on the site. 39 trades seems way too low. Are you running out of equity?

MIT
 
Hiya,

After updating my ASX200 I now get 65 trades but still only just over 6% annual return. i'm using the AB code posted previously.

How many open positions are we allowing? I have it set at 5. Setting it higher gives me 87 trades and just over 8% return but my MaxDD goes from 18% to 27%.

Still something not right though.

Thanks,
Andrew.
 
sorry, forgot to attatch backtest report :)
 

Attachments

  • ASF_med-long - Backtest Report.zip
    2.2 KB · Views: 45
Artarmon,

If you could zip all of the files for this report as I would like to see the settings as well.

MIT
 
Just a thought on the survivorship of the XJO issue- does anyone know where to get past XJO lists or actually have any? I think this is a pretty big problem with testing the current XJO so i'm just testing on liquidity basis ATM.
Getting returns of 35% and have come up with a new indicator (someones probably already come up with it but its new to me). I don't think it fits with a 'buy high and sell higher approach' though as it buys on momentum. Do you guys want a look anyway?

P.S- If you get any unusually large profits check there arent gaps in your data- 264%pa I wish!
 
Hi all,

Complete backtest report.

Thanks,
Andrew.
 

Attachments

  • ASF_med-long-AB_Backtest Report.zip
    18.8 KB · Views: 39
Loakglen,

Certainly looks interesting. Post it, it sounds worth looking at. Yes there is a survivorship bias in using the current asx200. However, it is much quicker backtesting using the asx200 rather than the entire asx with a liquidity filter. I just keep in the back of my head that I am getting a better number than reality. When I get a system that seems robust I then do it against the entire asx and hopefully it will just shave a few percent off. Unfortunately, sometimes the system just falls apart entirely. The system I am currently trading actually did better against the asx rather than just the asx200.



MIT
 
Artamon said:
Hi all,

Complete backtest report.

Thanks,
Andrew.

Great,

I'll look at it on the train tomorrow. I have a three hour train trip on Wednesdays to go to the big smoke.

MIT
 
Artarmon,

Found the problem. Well my problem actually. The parameters I am using are not the ones above. I must have used the above setting when I was seeing the sensitivity of the settings.

Use:

Period = 15


I originally had period = 15 but then I thought that this was a pretty short period so I lengthened it to "40" as I thought it made better sense. But 40 does a lot worse and went back to 15.

MIT
 
mit said:
I originally had period = 15 but then I thought that this was a pretty short period so I lengthened it to "40" as I thought it made better sense. But 40 does a lot worse and went back to 15.

Hiya MIT,

Yep that did it. Annual return of just under 18% and max system DD of just under 17%. All up, there were 92 trades in that period, according to my backtest. The results are largely due to 2 trades - CTX (almost 300% profit) and OSH (180% profit and still going). A lot of other very decent trades too though.

Testing from 1/1/2000 to present yielded 78 trades, 21.8% annual return, 14% max sys DD and from 1/1/2004 to present yielded 21 trades, 23.8% annual return, 9.9% max sys DD. Obviously, this last period was a very good time in the market.

Andrew.
 
Heres the formula:

pos=IIf(C>O,Sum(C-O,50),Null); // plots the value of positive momentum
neg=IIf(O>C,Sum(O-C,50),Null); // plots the value of negative momentum
IIf(C>O,Plot(Sum(C-O,50),"pos",colorBlue,styleLine,styleLeftAxisScale),Null);
IIf(O>C,Plot(Sum(O-C,50),"neg" ,colorRed,styleLine,styleLeftAxisScale),Null);
x=4;
y=4;
Buy= pos>HHV(pos,260)/x AND H==HHV(H,260) AND Sum(V*C,260)/260>10000000 ;
/*Buy when momentum is above ratio of highest Value of pos (see chart) and highest high of price in 260 bars*/
Sell= pos<=HHV(pos,260)/y AND Ref(pos,-1)> HHV(pos,260)/y;
/*sell is same as buy in reverse is 'y' value so it can be toyed with*/
SetOption("initialequity",10000);
PositionSize=-20;
PlotShapes(shapeUpArrow*(Buy),colorGreen);
PlotShapes(shapeDownArrow*(Sell),colorRed);
Plot(HHV(pos,260)/x,"",colorBlack,styleLine);
Plot(HHV(pos,260)/y,"",colorBlack,styleLine);
BuyPrice<H+(Sum(H-L,15)/10);

IMPORTANT: SETTINGS!
Buy and sell on open with delay of 1 (next open after signal if im correct?)
Max stop- 15% with exit intraday and re-entry delay =1
Profit target- 25% with exit next day at trade price and re-entry delay=1
Brokerage- $25 (to account for autmated stops)
5 open positions at a time

These are my results 1-1-00/22-7-05
Annual return-38%
Avg trade length- 56bars
Win rate- 61%
Max drawdown- 22%

Please pick it to bits. :D
 
Artarmon,

Great just a few more things before we can start tearing it part again and looking at the optimization. The system simply looks at beating the 52 week high and makes sure that the long term GMMA are separated.

Now a share that is just drifting along can probably just drift up to a 52 week high. We want some shares that have some oomph. One function is ROC. This is just the percentage change between now and some period in the past. Because today could be an up day and the close n periods ago could be a down day. We do it against an EMA to smooth the curve out a little.

Adding the line

AND ROC(EMA(C,5),20) > 20

Which says that the share has returned 20% over the last month. For me it hits an annual return of 33%. Even between 01-Mar-1999 and 1-Mar-2003 returns 21%. (Unless somebody finds an error)

I would still like to look at the 52 week entry. Whether to look at a pull back and partial recovery after a 52 week high, or a short term entry.

Another area to investigate is to sell on some kind of weakness rather than a trailing stop.

Thirdly use Amibroker's 4.7 features and try scaling in and out. Or as we are starting at a low capital start try using 5% risk at the start and move to 1% risk as the capital builds.

MIT
 
loakglen,

I can't reproduce your results. I get 4% return over the period (seems to be a common problem with this thread).


MIT
 
mit said:
loakglen,

I can't reproduce your results. I get 4% return over the period (seems to be a common problem with this thread).


MIT

My data is in cents so the volume is actually $100000 not $10mil.
Hope that fixes it!

The system does suffer pretty bad drawdowns over different timeframes. I'm just trying to remedy that ATM. Currently, return is 28% 1/1/00-22/7/05 and max drawdown is about 14% over any time-frame. The worst it has performed is -10% 1/1/05-22/7/05 but I think that's just the initial drawdown effect.

You might want to try scanning your start/finish dates as well.

I'm going to play with some volume tests and see how that goes.

Cheers :D
 
F/A will always win in the end. Why bother buying a stock that is not making money? You may be surprised to learn that you can wait for a couple of quarterly reports to confirm a strong balance sheet and still buy value. And get great trading opportunities, and good short term increases in SP. The so called "great opportunities" in the market are not restricted to companies with new products, exploration companies or the like.

1) A recurring revenue stream (that a customer base is constant).

2) Organic growth of revenues from that existing base.

3) Potential to acquire revenue streams from acquisition of new customers.

4) A product that is easily differentiated, with strong brand and pricing power.

5) A cost base that is constant or lagging revenues on a marginal base. The best base is one that is fixed.

6) Exists in a market that is expanding, and the position of the company is improving within that market, ie. Increasing market share.

7) High return on equity.

8) High operating cashflows (you can fudge profit but you can’t fudge operating cashflow).

Avoid Companies that fail point #1.

There is always a sector that these rules apply, and there are always companies that fit these rules. And these companies usually have plenty of appreciation left in their SP, long after you have identified them. In direct contrast to speccies.
 
idribble said:
F/A will always win in the end.

That's a point of contention. Its results can't be easily quantified unless you go burrowing through years of annual reports. T/A is my weapon of choice for this reason.

You can talk about Buffet all you like but that doesn't give us all the ability to pick winners on Fundamental Basis.
 
loakglen you said >>You can talk about Buffet all you like but that doesn't give us all the ability to pick winners on Fundamental Basis.<<

Actually I couldn't agree more.

What I was trying to communicate was that the market will eventually recognise the fundamental value of the company, to the extent of the current strength of the market.

I'm not suggesting that F/A is better than T/A at all.
 
..... and further loakglen, that check list I posted is extremely easy to tick off.

You don't have to have any special skills to evaluate a company against that criteria. Got any stocks that are relevant?
 
idribble,

I am curious about your comment "FA will always win in the end" Do you mean that as a method it beats TA or that a company will eventually reach it's "true" value?

I am curious about FA because I don't really know what kind of returns you can expect. Through backtesting I know what you can expect using mechanical TA and extrapolating out to what a good discretionary trader can make.

I know a couple of people at work who just did FA and weren't making money until I showed them the use of simple EMA crosses and trailing stops. Also they weren't accounting properly. They buy a share it would go down and sell it 12 months later and then sell it when it came up again and think they made a profit, when it was a loss.

I have two problems with pure FA (as opposed to looking for healthy companies and using TA to get in and out)

1/ The simplest FA doesn't work. (I'm trying to find a PDF document I had on it) where people were testing various formulas such as sustained EPS growth. Debt, PE and the such like. The only thing that worked was buying companies with high PE with a simple sell strategy.

2/ I believe that more in depth analysis can pick better companies as you need to put the numbers into context. High Debt may make sense for some companies (Envestra for instance). Historical EPS growth should be ignored as the company is getting to be too large a player to replicate high historical growth (Origin Energy) and so on. But it can get very subjective.

3/ When do you sell? Going down is no reason to sell. The share not moving is no reason to sell. When does the share become a "dog". Also there is the emotional attachment. Share forums are full of people who are holding onto stocks that have lost the majority of their value and hanging onto every word that the chairman has released.

I am not trying to knock FA investing as I don't know much about it especially from a successful FA trader and I would be interested in hearing from "pure" FA traders about how they invest end to end (When to buy, money management and when to sell)

A reasonably simple mechanical portfolio share system can return 20-30+% a year on average and take a couple of hours a week to run. T/T has shown this live. Tech himself says that there are private versions around that return better results I believe this as I have a completely different system which returns better results. I believe that discretionary traders can return much more.

MIT
 
Top