Australian (ASX) Stock Market Forum

Why isn't everyone rich trading these systems?

If you're going to journal some buy signals then please consider starting your own thread
"Wysiwyg's ASX Mean Reversion journal", rather than take this thread way off topic.
 
Howard this uses 500 positions with a $1,000,000 account, i dont think that is very practical in the real world. Is that right?

Greetings --

No, it is not practical.

I hope no one thinks the system as posted was tradable as posted, nor intended to be seen as tradable as posted. Nor should it be considered investment advice. I am an independent system developer, educator, writer, and speaker. I do not manage other people's money, I do not sell systems, I do not give investment advice.

It is illustrative. The purpose is to demonstrate that there are systems (or at least there is one system) that trade ASX stocks profitably.

The system settings allow every trade for every issue. Since there are about 500 issues in the ASX watchlist, setting the limit to allow 500 simultaneous positions allows for the situation when every issue on the list is in a trade. Setting the initial equity high is to ensure that there will be enough funds to take all trades signaled.

There are many other considerations that the developer / trader would want to / need to take into account.

Membership / selection / survivorship bias is a big one. The list is the current list of ASX constituents. The test was run beginning 1/1/1999. Many of the issues now in the ASX list were not in the list for the entire period.

The test assumed that the system was stationary for the entire 17 year period. It almost certainly was not.

No position sizing was used. Each trade is a fixed dollar amount. Using risk normalization to determine proper position size and trade-by-trade dynamic position sizing as a trade management tool the final equity will be much higher.

Some issues fit well with this model, others poorly. During development a short list of preferred stocks would be chosen.

The management of funds has not been addressed. There might be occasions when there are more signals than fund tracks. A metric to rank potential trades would be developed.

As I posted it, there are no trend-in-place filters. Some people prefer to take long positions only when the price is in an upward trend by some definition. That would be tested. And validated. Do not take anyones word for it, or do it just because some book suggested it. My research and experience shows that the best trading of long/flat systems comes when prices are not in a well defined upward trend.

There are no auxiliary data series or secondary rules. Perhaps knowing something about currency, interest rates, or a foreign market will help.

The only model being considered is decision tree. This system can be developed using any traditional trading system development platform -- AmiBroker, Ninja, TradeStation. The same data could be passed to a machine learning platform and any of 20 or 30 additional models considered. Results will be better.

The entry is market-on-close of the daily bar that generates the signal. When you have a system that is accurate in predicting a one-day direction, act as soon as possible. Waiting until the next open seriously deteriorates performance. About one-third of the close-to-next-close profit comes in the close-to-next-open period. Don't miss that.

There are no Sell signals. The system either takes a profit using a limit order or a maximum holding period. Adding rules to generate Sell signals might be beneficial.

Commissions are set to zero. Since the average trade gains 0.40%, there is plenty of profit to pay commissions. Set the value to reflect your own broker.

Slippage is set to zero. The entry is MOC, exit is either a limit order or MOC. Slippage should be low. Do some analysis using fills you receive from your own broker.

Etc.


The important takeaway is a demonstration of a system that meets the criteria that are both necessary and sufficient for being profitable:
Trade frequently
Trade profitably
Hold a short period of time

Best,
Howard
 
Correct!

As per your code:-

BuyRule1 = C > MA(C, 100);
BuyRule2 = C < MA(C, 5);
BuyRule3 = Sum(L < Ref(L, -1), 3) == 3;

So Buy on the next bar after the above 3 Buy rules are met on the proviso that
the price on entry has fallen a further ATR(10) from the previous days closing price.

Providing "SetTradeDelays" for the Buy is set to zero bars delay then this code reflects the system rule:-

BuyPrice = Min(O,Ref(C-ATR(10)*0.5,-1));

Ask someone else if you don't believe me however, trust me Wysiwyg when I say I'm only trying to help as you are the one that will benefit from the exercise.

Cheers,
Rob


I would add this to your code, it is correct i agree with Rob
 
I'll offer up my testing of the mean reversion strategy discussed here.
The testing is based on trading the ASX500 using CMC markets as a broker.
I haven't used a delisted database so there is survivorship bias in my results.

I have coded it using the original rules by the author of the system.
I have included the following filters to make it a bit more of a reality:
250,000 shares a day,
$250,000 turnover a day
Commissions are CMC markets, $9.90 or 0.8%.

The back tests were run from 1/1/1999 to today.

Below is a summary of ALL possible trades generated by the system (NO position sizing).
All signals.PNG

Below is a single back test run using the position sizing suggested by the author. $100,000 cut into 10 positions.
Single run.PNG

Below is a number of results from a Monte Carlo simulation. The data was taken from all possible trades and the simulation run over a 2 year look ahead.

Below is final equity. At the 25th percentile you would have added $20,000 to your initial $100,000.
Equity.GIF

Below is MaxDD. At the 95th percentile it is 7.5%.
MaxDD.GIF

Below is 10 random equity curves.
Equity_curves.GIF
 
This certainly isn't a strategy I would trade in it's current form. It generates far too many signals in my opinion. You would spend hours a day placing and managing your limit orders without the use of something like an API.

With a bit of work on the entry mechanism, further filtering of signals and a decent position sizing algorithm you could get quite easily get something more manageable and profitable.
 
I am going to post one buy/sell trade for the following stocks that met the simple system rules. Limit order buy only.

1. TWE = buy price $9.735
2. STO = buy price $4.16
3. PRY = buy price $3.64
4. MIN = buy price $8.135
5. LNK = buy price $8.14
6. CAR = buy price $12.11
7. BPT = buy price $0.62

So today the trades that met the criteria. Will post the exit price (next day open price) of these 4 when their c > ref(c, -1). STO gets sold on Monday open price.

1. TWE = no buy
2. STO = buy at $4.16
3. PRY = no buy
4. MIN = buy at $8.135
5. LNK = buy at $8.14
6. CAR = no buy
7. BPT = buy at $0.62
 
If you're going to journal some buy signals then please consider starting your own thread
"Wysiwyg's ASX Mean Reversion journal", rather than take this thread way off topic.
Won't be journalising, thank you.
 
So today the trades that met the criteria. Will post the exit price (next day open price) of these 4 when their c > ref(c, -1). STO gets sold on Monday open price.

1. TWE = no buy
2. STO = buy at $4.16
3. PRY = no buy
4. MIN = buy at $8.135
5. LNK = buy at $8.14
6. CAR = no buy
7. BPT = buy at $0.62

I think something is wrong here. We entered STO, PRY and MIN yesterday. They all made their 3rd lower low on Wednesday, not yesterday. Check your code (or am I wrong ??). Also, my trade list is much bigger than yours (I have no filters for liquidity turned on though).
 
I think something is wrong here. We entered STO, PRY and MIN yesterday. They all made their 3rd lower low on Wednesday, not yesterday. Check your code (or am I wrong ??). Also, my trade list is much bigger than yours (I have no filters for liquidity turned on though).
I ran the exploration yesterday after close on XKO. Check the time and date of posting was this morning 1 a.m. ish.
 
This is my STO signal.

Can someone confirm I am right?
Yes the next day limit order would be at 4.33 if you ran the exploration on the 15th. See my exploration run on the 15th with the limit order next day 16th at $4.33.

Untitled.png
 
If the rule is C-0.5*atr how can the buyprice be above or equal yesterdays close?

Just saying, it will be correct and for people who can't code it up, if they were interested

i've got the buy at $4.16

On thursday the price didn't reach the limit order

On the 15th I have a signal at a close (close=4.430). So the limit order on the 16th is for 4.430 - 0.5*0.18 = 4.330 (rounding for tick size). Not being defensive, what have I done wrong? Maybe I need to fix my code? I seem to be a day early...

So it looks like you agree with me wysiwyg. How come you took the trade a day later than your signal? Also you listed 7 trades in this thread but your scan shows 23 signals?
 
How come you took the trade a day later than your signal? Also you listed 7 trades in this thread but your scan shows 23 signals?
:D You replied to my post where I explained that I ran the exploration yesterday which was the 16th.

I ran the exploration yesterday after close on XKO. Check the time and date of posting was this morning 1 a.m. ish.
 
On the 15th I have a signal at a close (close=4.430). So the limit order on the 16th is for 4.430 - 0.5*0.18 = 4.330 (rounding for tick size). Not being defensive, what have I done wrong? Maybe I need to fix my code? I seem to be a day early...

So it looks like you agree with me wysiwyg. How come you took the trade a day later than your signal? Also you listed 7 trades in this thread but your scan shows 23 signals?

I think you guys are right, my buy price is calculated from the low not the close.. i had L - x not c - x.. have you tested off the low?
 
:D You replied to my post where I explained that I ran the exploration yesterday which was the 16th.

It doesn't matter when you ran the exploration. Your code didn't tell you that you were already in the trade, a mistake in my opinion. Therefore STO, PRY and MIN aren't real trades because you would have taken them a day earlier if you were trading real time...

roller - Changing the buy limit reference price from C to L increases profit per trade and decreases trade frequency.
 
So your code didn't tell you that you were already in the trade. Therefore STO, PRY and MIN aren't real trades because you would have taken them a day earlier if you were trading real time...
Okay I will show the sequence I took.

1. run exploration XKO after close on 16/06/2016 (note not before this time and no trades before)
2. result is a list of stocks that met the 3 lower lows, close above ma(100) and close below ma(5) (is that bit confusing?)
3. calculate the limit order price of c - 0.5 * atr(10) to buy today 17/06/2016
3. posted stock list with their limit orders on forum
 
It doesn't matter when you ran the exploration. Your code didn't tell you that you were already in the trade, a mistake in my opinion. Therefore STO, PRY and MIN aren't real trades because you would have taken them a day earlier if you were trading real time...

Agree - otherwise you could keep getting signals while your in a position and double up on a stock
 
Top