Home › Forums › Trading System Mentor Course Community › Trading System Brainstorming › ASX Momentum System Testing
- This topic is empty.
-
AuthorPosts
-
October 8, 2018 at 12:51 am #109250WENKIT LUIParticipant
Thanks Said. You’re right, maybe it’s not quite right – but it works somehow
I guess with roc/atr you are trying to account for volatility in measuring roc.
On this note: have you tried to use Nick’s Bang for Buck filter as a ranking criteria in your systems? The calculation takes into account the share price, so it should overcome the bias towards lower-priced stocks?
October 8, 2018 at 1:00 am #109249WENKIT LUIParticipantHi Rob
I’ve also tried applying a weighted momentum measure to be a little different from the crowd, as Nick said in his recent relative momentum webinar – it hasn’t added a lot of value, but who knows maybe in future.
Another filter you can try is one which Nick mentioned in his one of webinars. It measures how hard a stock is trending vs. the overall index, and the stock is bought only if it’s trending harder than the overall index. I’ve interpreted this as ROC(C,Duration) > ROC (Index, Duration).
In regards to your question, Said Bitar in his reply has hopefully answered it
October 8, 2018 at 2:10 am #109248RobGilesMemberKit Lui wrote:Hi RobUnfortunately I made a mistake in that backtest, I ran it with adjusted prices instead of unadjusted prices. I have re-run it with unadjusted prices and here are the results for 1/1/2007 to 31/12/2017.
CAGR: 20.8%
Max System Drawdown: 26.01% (occuring in 2010. and 2011 was a bad year too, the annual performance was -8.2%, but all the other years are positive)
Profit Factor: 2.64
Payoff Ratio: 2.30
Win %: 50.45 %If I change the start date to 1/1/1997, the CAGR drops to 18.26% and the Max System Drawdown deteriorates further to 28.94%.
Apologies for the misinformation. The maximum system drawdown is probably in the uncomfortable zone for a few people, but I’ve been telling myself that anything under 30% is okay.
Note: To rank the stocks, the system currently uses a combination of ADX and RSI (rather than using percentage distance from the 52-week high, as per Nick’s article – this didn’t work for me).
At the moment I’m testing a ranking criteria which another member has shared under the Trading System Graveyard topic, it’s ROC(C, Duration)/ATR(Duration). For the period 1/1/1997 to 31/12/2017, the backtest shows an enhanced CAGR of 20.54% and a reduction in the max system drawdown to a more tolerable 25.97%.
I would be happy to hear from you (or anyone else!) if there are any other ideas regarding ranking criteria
Cheers
KitHi Kit…sorry but I’m a little confused. You initially said that you were ranking stocks as per Nick’s article https://www.thechartist.com.au/Shares-Stocks/52-week-high-rotation-strategy.html
then you said “To rank the stocks, the system currently uses a combination of ADX and RSI (rather than using percentage distance from the 52-week high, as per Nick’s article – this didn’t work for me).”
So are you saying that using the distance from the 52 week high did produce the results you posted but they just didn’t meet your objectives?
October 8, 2018 at 2:13 am #109149RobGilesMemberSaid / Kit ..are you still using a GapUp filter as suggested by Clenow when using the ROC/ATR approach?
Re the ROC/ATR approach, my testing suggests that shorter term ROC (e.g. 60 days) is no good. Is there a rule of thumb for the ROC / ATR parameter value ratios? I’ve seen articles that suggest an average of ROC values divided by an average of ATR values that are about a third of the duration of the ROC duration periods for e.g.
October 8, 2018 at 4:09 am #109251WENKIT LUIParticipantHi Rob
I tested “the distance from the 52 week high” as a ranking criterion, but the results weren’t good enough. Just to be clear, the backtest results I posted uses ADX(Duration)*RSI(Duration) as the ranking criterion.
In regards to ROC / ATR, I’ve used 252 days (i.e. one year expressed as no. of trading days) as the duration and it works for my system.
Yes I’m still using a GapUp filter.
October 8, 2018 at 5:09 am #109252RobGilesMemberthanks Kit…happy to brainstorm ideas in more detail via skype if interested
robgiles6000
October 17, 2018 at 4:38 am #109150RobGilesMemberwanting to develop a momentum rankng method thatranks ROC of the stock vs the Index. Am I on the right track code wise?
ROCLB = Param(“ROC Lookback”,120,10,500,1);
ROCStock = ROC(Close,ROCLB);
ROCIndex = ROC(HDBFilter,ROCLB);
RelROC = ROCStock/ROCIndex;
October 17, 2018 at 5:35 am #109293ScottMcNabParticipantI use SetForeign Rob.
SetForeign(“$RUI”,True);
ROCIndex = ROC(C,120);
RestorePriceArrays();ROCStock = ROC(C,120);
RelROC = ROCStock/ROCIndex;October 23, 2018 at 4:17 am #109151RobGilesMemberTHanks Scott
Does this code look OK?
//
//ROC Momentum Entry Rules
//
ROCLB = Param(“ROC Lookback”,110,10,500,1);
ROCStock = ROC(Close,ROCLB);SetForeign(“$XAO”,True);
ROCIndex = ROC(C,ROCLB);
RestorePriceArrays();RelROC = ROCStock/ROCIndex;
Using this, along with a few other bits & pieces I got the following metrics testing from 1/6/99 to 1/6/09:
CAR 19.06%
MaxDD -10.47%
MAR 1.86
Profit Factor 2.56however when I ran the system with unchanged variable values from 1/6/09 to 1/6/18 it returned a negative CAR and a maxDD of over -30%.
Very, very frustrating. I have no idea how a system can test so well, through a period that includes a massive market drop like the GFC and then it falls apart in a bull market. If anyone offer some guidance / insight as to why that would be appreciated.
October 23, 2018 at 5:52 pm #109304SaidBitarMemberi do not think it is any different but this is how i use the foreign ticker in my code
Code:IndexCode = ParamStr(“Index Code”,”$SPX”);
Index = Foreign(IndexCode,”C”);
IndMA = Param(“Index Filter MA Period”,170,10,300,10);
//IndMA = Optimize(“Index Filter MA Period”,170,50,200,10);
IndexFilter = Index > MA(Index,IndMA);
IndexFilt = IIf(IndexSwitch,1,IndexFilter);IndexFilterDown = Index < MA(Index,IndMA);
to adapt your code to it will be like this
Code:IndexCode = ParamStr(“Index Code”,”$XAO”);
Index = Foreign(IndexCode,”C”);
ROCLB = Param(“ROC Lookback”,110,10,500,1);
ROCIndex = ROC(Index ,ROCLB);and no need to restore price array
October 24, 2018 at 10:26 am #109305ScottMcNabParticipantRob Giles wrote:THanks ScottDoes this code look OK?
//
//ROC Momentum Entry Rules
//
ROCLB = Param(“ROC Lookback”,110,10,500,1);
ROCStock = ROC(Close,ROCLB);SetForeign(“$XAO”,True);
ROCIndex = ROC(C,ROCLB);
RestorePriceArrays();RelROC = ROCStock/ROCIndex;
Using this, along with a few other bits & pieces I got the following metrics testing from 1/6/99 to 1/6/09:
CAR 19.06%
MaxDD -10.47%
MAR 1.86
Profit Factor 2.56however when I ran the system with unchanged variable values from 1/6/09 to 1/6/18 it returned a negative CAR and a maxDD of over -30%.
Very, very frustrating. I have no idea how a system can test so well, through a period that includes a massive market drop like the GFC and then it falls apart in a bull market. If anyone offer some guidance / insight as to why that would be appreciated.
see if using
SetForeign(“$XAO.au”,True)
rather than
SetForeign(“$XAO”,True)
helps ? I thought the symbol needed the .au for it to work but defer to the people here who can codeI like the
Setforeign
restorpricearrays()setup Rob as it then becomes very easy to test a whole lot of other index filters like atr, HV, index support/resistance levels etc without changing code too much
-
AuthorPosts
- You must be logged in to reply to this topic.