Australian (ASX) Stock Market Forum

Long-term trading

Joined
25 January 2006
Posts
27
Reactions
0
Hi all,
As a BuyAndHolder, got slaughtered in 2008 so took an interest in figuring out how to exit in the future in time to salvage some profits.

Came across a longterm Stochastic indicator which I've been testing with Bullcharts and TradeSim on weekly data, with promising ten-year historical results over the All Ords.

BuyAndHolders rarely use stops, and I found that with this exercise, any stop I tried in TradeSim decreased net profits, win rates, and average profit per trade. But an exit based only on the longterm stochastic worked.

The exercise is contrarian, and very unsophisticated: Enter long on Monday's open when %k of the stochastic(55,39,3) crossed above 20. Exit long on Monday's open when %k of the stochastic(55,39,3) crossed below 80.

The exercise pretended I had $204000 capital at the start. Brokerage is $30 per transaction ($60 per round trip). Example 1 invested up to 34 positions maximum at $6000 each. Example 2 (pyramid profits) invested up to 33 positions maximum at 3% of the total capital at the time. Thus with no stop, my risk per position was around 3% of capital, being 100% of each position. Stop Loss purists will have a field day with that!

Trade Sim excludes open trades, so if any were going to be a loss, accumulated profits would be reduced accordingly. However,balancing that, virtually no trades would have been entered during 2008.

The Trade Sim simulation results do not include the beneficial impact of dividends which would be received given the longterm holding periods.

I tried different ASX subsets and starting dates to try and pick up different companies, results were always similar. I have just the standard Trade Sim version, so could not attempt a "Monte Carlo" test.

Trade Sim detailed simulation reports for two examples are attached (I hope) in case anyone finds them of interest. Comments and suggestions welcome, especially from any other ASF members who prefer a long-term trading or investing timeframe.

Also, if any members have Trade Sim, and access to other stock exchange data, would anyone care to test the exercise to see if the results are similar to the ASX All Ords? I've already tested the NZX, and found it similarly profitable, but far too few transactions to be certain.

dougy
 

Attachments

  • AllOrdsTestTrade_Report.pdf
    63.5 KB · Views: 45
  • AllOrdsTestTradePyramidReport.pdf
    63.5 KB · Views: 25
The exercise pretended I had $204000 capital at the start. Brokerage is $30 per transaction ($60 per round trip). Example 1 invested up to 34 positions maximum at $6000 each.

Hi there. Wondering how you can turn a $6000 share purchase into ...
Largest Winning Trade/(Date-Time): $184,899.23 (9/07/2007)
with a swing from 20 to 80 on a weekly stochastic oscillator? Details of that particular company, entry date and entry/exit prices will be fine if you have them. Thanks.
 
I used this formula and on weekly got zero trades but on daily returned the below figures. I can only assume there is a difference of understanding with the $6000 maximum per trade.
This test was on the All Ords (XAO) constituents, well ... some may not have been back then.
PHP:
PositionQty = 34;
PositionSize = 6000;  
PositionScore = Random();

SetOption ("UsePrevBarEquityForPosSizing", True);
SetTradeDelays (0,0,0,0); 

weekDays = DayOfWeek();

BuyR = weekDays == 1; BuyPrice = Open;
SellR = weekDays == 1; SellPrice = Open;

Buy = Cross(StochD(55,39,3), 20) AND BuyR;
Sell = Cross(80, StochD(55,39,3)) AND SellR;
 

Attachments

  • Stochastic Long.pdf
    23.5 KB · Views: 20
Hi there. Wondering how you can turn a $6000 share purchase into ...

with a swing from 20 to 80 on a weekly stochastic oscillator? Details of that particular company, entry date and entry/exit prices will be fine if you have them. Thanks.

That was AGS, Alliance Resources Ltd.
Bought at $0.0542 18 Mar 2002, sold at $1.725 9 Jul 2007. Hope the chart is readable, not too sure on upload protocol.
But in real life, I probably wouldn't have entered that investment if there was an alternative opportunity with a company which paid regular dividends.

I do have some reservations on other issues though - particularly the unknown effect of survivorship bias - example - maybe the method would have bought HIH and gone down with the ship.

dougy
 

Attachments

  • AGS - Weekly - ALLIANCE RESOURCES LIMITED11.jpg
    AGS - Weekly - ALLIANCE RESOURCES LIMITED11.jpg
    212.1 KB · Views: 16
That was AGS, Alliance Resources Ltd.
Bought at $0.0542 18 Mar 2002, sold at $1.725 9 Jul 2007. Hope the chart is readable, not too sure on upload protocol.
But in real life, I probably wouldn't have entered that investment if there was an alternative opportunity with a company which paid regular dividends.

I do have some reservations on other issues though - particularly the unknown effect of survivorship bias - example - maybe the method would have bought HIH and gone down with the ship.

dougy

Thanks, I checked that trade out and apart from a few spurts the share price languished until July 2005 when it started rising. As you say it would be near impossible to know which stock would do this and to hold through hell and high water would be extremely difficult.

I like the concept and will incorporate this into my longer term market overview.
Thanks.
 
I used this formula and on weekly got zero trades but on daily returned the below figures. I can only assume there is a difference of understanding with the $6000 maximum per trade.
This test was on the All Ords (XAO) constituents, well ... some may not have been back then.
PHP:
PositionQty = 34;
PositionSize = 6000;  
PositionScore = Random();

SetOption ("UsePrevBarEquityForPosSizing", True);
SetTradeDelays (0,0,0,0); 

weekDays = DayOfWeek();

BuyR = weekDays == 1; BuyPrice = Open;
SellR = weekDays == 1; SellPrice = Open;

Buy = Cross(StochD(55,39,3), 20) AND BuyR;
Sell = Cross(80, StochD(55,39,3)) AND SellR;

There must be some differences in implementing the exercise, but I don't know how to compare them. Attached file is Trade Sim detailed simulation of the stoch(55,39) applied to 2600 daily bars of the All Ords up to 22 Jan 2010. It was profitable, but not as good as when applied to weekly bars.

dougy
 

Attachments

  • AllOrdsTestTradeDaily_Report.pdf
    70.3 KB · Views: 12
There must be some differences in implementing the exercise, but I don't know how to compare them. Attached file is Trade Sim detailed simulation of the stoch(55,39) applied to 2600 daily bars of the All Ords up to 22 Jan 2010. It was profitable, but not as good as when applied to weekly bars.

dougy

Yes I get very mediocre results so I removed the "buy on Monday open" condition and changed the stochd(55,39,3) to stochk(55,39) used ...
1) 34 positions maximum
2) $6000 per position
3) $30 brokerage
4) 28/2/2000 to 22/1/2010
5) All Ords
6) Stochk(55,39) buy cross up 20, sell cross down 80.
7) Set trade delays to 1 day (in reality you buy the day after the signal)
8) Daily
9) $204k
No matter which way I jig it the results are about 60% winners and about 50k profit. Nothing remotely close to your backtest.
 
Oh I know what is going on now. I have my backtester set to only trade 20% of entry bar volume. This means that I cannot take the whole volume traded that day. "This is to prevent affecting the market with large orders".

I removed this restriction on trade size and I hit very big dollars profit but this is far from reality. :)
 
Oh I know what is going on now. I have my backtester set to only trade 20% of entry bar volume. This means that I cannot take the whole volume traded that day. "This is to prevent affecting the market with large orders".

I removed this restriction on trade size and I hit very big dollars profit but this is far from reality. :)

Ahaa.. I didn't have a volume filter set in Trade Sim - guess it won't make me a squillionnaire after all. But have redone the weekly non-pyramid exercise, with a 5% volume filter. (Presumably it's testing weekly volume which is why I settled on 5%). This reduced the trades executed by 5 down to 74, net profits down to $856k, and largest winner becomes $128k.

But the pyramid exercise was significantly affected: Executed trades down to 49, and net profit down to $1.1m.

Thanks for picking that up.

dougy
 
If you are interested ..... Here are two stock that have crossed up 20 on the Stochastic %K(55,40) , I simplified the 39 SMA to 40. These two could be referenced in the future for profit or loss on the 80 cross down. Trouble is ... we could be waiting years. :D

ASB :- AUSTAL LIMITED FPO
Date :- 22/1/2010
Last Price :- $2.37

ATR :- ASTRON LIMITED FPO
Date :- 21/1/2010
Last Price :- $1.805



P.s. If you don't want this test on thread then I can have it deleted.
 
If you are interested ..... Here are two stock that have crossed up 20 on the Stochastic %K(55,40) ,

ASB :- AUSTAL LIMITED FPO

ATR :- ASTRON LIMITED FPO

Thanks for the tips - had a look but they weren't giving buy signals on their weekly charts. Have however bought Ausenco (AAX) as it displayed synchronised buy signals on both the daily and weekly charts. They're guidance is for much-reduced profit this year just ended, but seem to have good potential down the track. We'll see I guess in due course..

dougy
 
If you are interested ..... Here are two stock that have crossed up 20 on the Stochastic %K(55,40) , I simplified the 39 SMA to 40. These two could be referenced in the future for profit or loss on the 80 cross down. Trouble is ... we could be waiting years. :D

ASB :- AUSTAL LIMITED FPO
Date :- 22/1/2010
Last Price :- $2.37

ATR :- ASTRON LIMITED FPO
Date :- 22/1/2010
Last Price :- $1.805

Update on share positions:

ASB :- AUSTAL LIMITED FPO
Date :- 16/2/2010
Last Price :- $2.44

Up 7 cents. Stochastic(55,40) %K at 39.50

ATR :- ASTRON LIMITED FPO
Date :- 22/1/2010
Last Price :- $2.02

Up 21.5 cents. Stochastic(55,40) %K at 46.00

Both up with the banded oscillator holding it's line.
 
Thanks for the tips - had a look but they weren't giving buy signals on their weekly charts. Have however bought Ausenco (AAX) as it displayed synchronised buy signals on both the daily and weekly charts.
dougy
Weekly stochastic seems too open to opportunity loss and terrible price per share paid for a long term trade.
 
Can I suggest you look at liquidity...

Presumably it's testing weekly volume which is why I settled on 5%

I have my backtester set to only trade 20% of entry bar volume.

To me those numbers are frighteningly high. It is not when you get in that is vital, but when you want to get out. ATR had a volume of 12,000 for the day today, with only 8 trades. Lack of liquidity means todays price is fairly meaningless.

brty
 
Can I suggest you look at liquidity...
brty
With this long term trading approach the entries and exits are rare. With Doug's weekly oscillator setting, the swing from OB to OS range is upward of 6 months to over a year. Orders would be filled trading the ASX200/300 I feel.

Agree that large orders could be a problem.
 
Update on share positions:

ASB :- AUSTAL LIMITED FPO
Date :- 16/2/2010
Last Price :- $2.44

Up 7 cents. Stochastic(55,40) %K at 39.50

ATR :- ASTRON LIMITED FPO
Date :- 22/1/2010
Last Price :- $2.02

Up 21.5 cents. Stochastic(55,40) %K at 46.00

Both up with the banded oscillator holding it's line.


Maybe I should have bought those ones after all!
AAX has dropped - I paid an average price of $4.157, so your observation ("terrible price"!) is so far right on the button. But I hold now until the long-term stoch completes its cycle.
Also bought RHL - paid $2.30, so far up a little, but again will hold until the cycle completes.

I am basically a Buy-and-Holder, and the only reason for adopting the longterm stoch for entries and exits is because it enables me to know when to give up, or when to take profits.
dougy
 
Can I suggest you have a look at how the Stochastic oscillator is constructed and what its telling you so that you understand what your looking at.

http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:stochastic_oscillator

Its nothing more than a representation of a longer timeframe.
Nothing magical Im afraid.

You dont see this post as worthy of consideration or is it that you dont understand what I'm getting at?

but again will hold until the cycle completes.

Cycle?
What on earth is that about?
 
Top