Home › Forums › Trading System Mentor Course Community › Trading System Brainstorming › Ranking Trend following systems
- This topic is empty.
-
AuthorPosts
-
April 19, 2016 at 7:37 pm #101480SaidBitarMember
The target is to find the best ranking way for trend following. Even though all the time i use and prefer to use position score as random but just i want to see if there is real difference.
the system that i will test on is WTT so i think it is a familiar system for everyone and it is weekly system, in the ranking sometimes i will change the time frame to daily.
the ranking will be done as follows:
[ol]
[li]Random[/li]
[li]Highest ROC[/li]
[li]Lowest ROC[/li]
[li]Highest ADX[/li]
[li]Lowest ADX[/li]
[li]Highest ATR[/li]
[li]Lowest ATR[/li]
[li]Distance from the last 52 Weeks High (Far is better) %[/li]
[li]Distance from the last 52 Weeks High (Near is better) %[/li]
[li]Distance from the last 52 Weeks Low (Far is better) %[/li]
[li]Distance from the last 52 Weeks Low (Near is better) %[/li]
[li]Bang-For-Buck[/li]
[li]reversed Bang-For-Buck[/li]
[li]Distance from 200 Day MA (far is better) %[/li]
[li]reversed Distance from 200 Day MA (near is better) %[/li]
[li]Distance between 50 Day MA and 200 Day MA (Far is better) %[/li]
[li]Reversed Distance between 50 Day MA and 200 Day MA (Near is better) %[/li]
[li]Higher price[/li]
[li]Lower price[/li]
[li]Higher RSI[/li]
[li]Lower RSI[/li]
[li]Higher historical volatility[/li]
[li]Lower Historical volatility[/li]
[/ol]each will have 50 MCs to have enough statistics to judge
the Universe is Russell 3000
and duration from 1/1/1995 till 12/31/2015April 19, 2016 at 7:40 pm #103597SaidBitarMemberIn order not to lose time modifying the code and running optimization i added all the scenarios to the code and it will run in one optimization of 1150 runs
so it will take some time
i wanted to add text column to the result of the optimization but did not know how yet but still i can track them from the number of runs
if anyone has any idea please share and i can add it to the test
here is the code that i used
Code://Random
if (Run <= 50 ) PositionScore = mtRandom(); //Highest ROC if (Run > 50 AND Run <= 100 ) PositionScore = 1000 + ROC(C,20); //Lowest ROC if (Run > 100 AND Run <= 150 ) PositionScore = 1000 - ROC(C,20); //Highest ADX if (Run > 150 AND Run <= 200 ) PositionScore = 1000 + ADX(20); //Lowest ADX if (Run > 200 AND Run <= 250 ) PositionScore = 1000 - ADX(20); //Highest ATR if (Run > 250 AND Run <= 300 ) PositionScore = 1000 + ATR(20); //Lowest ATR if (Run > 300 AND Run <= 350 ) PositionScore = 1000 - ATR(20); // distance between the close and one year high (Far) if (Run > 350 AND Run <= 400 ) PositionScore = 1000 + (HHV(C,52) / C - 1) * 100; // reversed distance between the close and one year high (Near) if (Run > 400 AND Run <= 450 ) PositionScore = 1000 - (HHV(C,52) / C - 1) * 100; // distance between the close and one year Low (Far) if (Run > 450 AND Run <= 500 ) PositionScore = 1000 + (C / LLV(C,52) - 1) * 100; // reversed distance between the close and one year Low (Near) if (Run > 500 AND Run <= 550 ) PositionScore = 1000 - (C / LLV(C,52) - 1) * 100; //Bang For Buck if (Run > 550 AND Run <= 600 ) { TimeFrameSet(inDaily); ATRRank = ATR(200); TimeFrameRestore(); PositionScore = 1000 + (10000 / C * ATRRank); } //Reversed BFB if (Run > 600 AND Run <= 650 ) { TimeFrameSet(inDaily); ATRRank = ATR(200); TimeFrameRestore(); PositionScore = 1000 - (10000 / C * ATRRank); } //Distance from 200 Day MA if (Run > 650 AND Run <= 700 ) { TimeFrameSet(inDaily); MA200 = MA(C,200); TimeFrameRestore(); PositionScore = 1000 + (C / MA200 - 1) * 100; } //Reversed Distance from 200 Day MA if (Run > 700 AND Run <= 750 ) { TimeFrameSet(inDaily); MA200 = MA(C,200); TimeFrameRestore(); PositionScore = 1000 - (C / MA200 - 1) * 100; } //Distance between 50 Day MA and 200 Day MA if (Run > 750 AND Run <= 800 ) { TimeFrameSet(inDaily); MA200 = MA(C,200); MA50 = MA(C,50); TimeFrameRestore(); PositionScore = 1000 + abs(MA50 / MA200 - 1) * 100; } //Reversed Distance between 50 Day MA and 200 Day MA if (Run > 800 AND Run <= 850 ) { TimeFrameSet(inDaily); MA200 = MA(C,200); MA50 = MA(C,50); TimeFrameRestore(); PositionScore = 1000 - abs(MA50 / MA200 - 1) * 100; } if (Run > 850 AND Run <= 900 ) PositionScore = 1000 + C; if (Run > 900 AND Run <= 950 ) PositionScore = 1000 - C; if (Run > 950 AND Run <= 1000 ) PositionScore = 1000 + RSI(10); if (Run > 1000 AND Run <= 1050 ) PositionScore = 1000 - RSI(10); //100 days Historical volatility if (Run > 1050 AND Run <= 1100 ) { TimeFrameSet(inDaily); HV = StDev(log(C/Ref(C,-1)),100)* sqrt(252)*100; TimeFrameRestore(); PositionScore = 1000 + HV; } //100 days Historical volatility reversed if (Run > 1100 AND Run <= 1150 ) { TimeFrameSet(inDaily); HV = StDev(log(C/Ref(C,-1)),100)* sqrt(252)*100; TimeFrameRestore(); PositionScore = 1000 - HV; }April 19, 2016 at 8:11 pm #103598ScottMcNabParticipantrelstrength (strongest/weakest)
LinRegSlope…..I enter trend after a pullback and found using Ref(LinRegSlope(C,20),-5) or similar tests were interestingApril 19, 2016 at 8:18 pm #103601SaidBitarMemberpfff
i found out that
Code:if(MCP)
BuySetUp = BuySetUp AND Random()*100 > MCP;does not work
so i had to fix it and re run the optimization
maybe it is better to replace it with
Code:if(MCP > 1 )
BuySetUp = BuySetUp AND Random()*100 > MCP;April 19, 2016 at 8:21 pm #103602SaidBitarMemberScott McNab wrote:relstrength (strongest/weakest)
LinRegSlope…..I enter trend after a pullback and found using Ref(LinRegSlope(C,20),-5) or similar tests were interestingTomorrow i will add the relative strength and the linear regression slope
Linear regression all the day i was saying i want to test it then i forgot about it :silly:
regarding relative strength i imagine it will be same result as the ROC but will test it
April 19, 2016 at 9:50 pm #103599Nick RadgeKeymasterI’m unsure if ranking is appropriate for trend following (not o be confused with Momentum).
April 20, 2016 at 7:27 am #103604SaidBitarMemberMay be the title is misleading what I meant is that in case of several signals and capital only for one
which one to takeApril 20, 2016 at 10:30 am #103605SaidBitarMemberThe aim of the exercise was to check which is the best way to take signals in case you have more signals than capital.
I ran 50 MCs on each scenario mentioned above to compare and here are the results
so it is clear that it does not matter how you will rank the extra signals on the long run all are the same.
So Nick was perfectly right in his comment :blush:
Some are having higher CAR than the others but with deeper DD
April 20, 2016 at 9:09 pm #103600Nick RadgeKeymasterRegardless of what I say it’s excellent research and one that you now can store with confidence in the ever-growing pool of knowledge. Great insights – thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.