Home › Forums › Trading System Mentor Course Community › AmiBroker Coding and AFL › ** Eliminating Selection Bias **
- This topic is empty.
-
AuthorPosts
-
May 9, 2018 at 11:35 pm #108691LEONARDZIRParticipant
Awesome work Julian.
Thanks for sharing.May 10, 2018 at 5:19 am #108711ScottMcNabParticipantNick Radge wrote:Quote:So the system would have a lower trade frequency for the elimination of selection bias ? Intuitively (ie probably incorrectly) I would think that a different system design would excel in this environment than the ones we have been designing to date ? Did you find this Julian ?Yes. But now you can make it more targeted which in fact will increase trade frequency.
I need to give that some more thought…thanks for the tip Nick
May 10, 2018 at 5:21 am #108712ScottMcNabParticipantJulian Cohen wrote:Scott McNab wrote:So the system would have a lower trade frequency for the elimination of selection bias ? Intuitively (ie probably incorrectly) I would think that a different system design would excel in this environment than the ones we have been designing to date ? Did you find this Julian ?ps..I will enjoy spending hours testing different variations but keen to hear your thoughts Julian
try lowering the stretch…you’ll see the fill rate climb dramatically. That’s where I was managing to achieve the trade frequency
Confirming that lowering meant as in a smaller stretch (so a higher buylimit price)
May 10, 2018 at 6:37 am #108714JulianCohenParticipantScott McNab wrote:Julian Cohen wrote:Scott McNab wrote:So the system would have a lower trade frequency for the elimination of selection bias ? Intuitively (ie probably incorrectly) I would think that a different system design would excel in this environment than the ones we have been designing to date ? Did you find this Julian ?ps..I will enjoy spending hours testing different variations but keen to hear your thoughts Julian
try lowering the stretch…you’ll see the fill rate climb dramatically. That’s where I was managing to achieve the trade frequency
Confirming that lowering meant as in a smaller stretch (so a higher buylimit price)
Yup. I found setting the stretch to effectively Open didn’t help but a system that was running before on 0.7 ATR stretch is now at 0.4. You don’t need to worry if it creates 500 buy signals, as your ranking method will let the cream rise to the top and you’ll only place 20 or 40 of them.
Basically I took my existing system and bolted this code on the bottom. Then I started to play with the parameters to see what worked.
If your existing system has a tight selection bias anyway then this really helps to improve it.
May 10, 2018 at 7:10 am #108715SaidBitarMemberThanks Julian & Nick
Great piece of information, now i can loosen up the systems without worrying about selection bias
good work
May 10, 2018 at 10:03 am #108716ScottMcNabParticipantYup. I found setting the stretch to effectively Open didn’t help but a system that was running before on 0.7 ATR stretch is now at 0.4. You don’t need to worry if it creates 500 buy signals, as your ranking method will let the cream rise to the top and you’ll only place 20 or 40 of them.
Basically I took my existing system and bolted this code on the bottom. Then I started to play with the parameters to see what worked.
If your existing system has a tight selection bias anyway then this really helps to improve it.[/quote]
Cheers Julian. The size of the atr stretch was a (the) key factor in eliminating the “weaker” trades in my systems. The ave profit/loss % /payoff ratio drop when I reduce the atr but I appreciate the need to do this for the fill rate…just means I need to work a bit harder with regards to the other conditions in the buysetup.
On another note it perhaps suggests a another thought regarding the number of positions and leverage….playing around with 20×10 at moment but keen to hear what others are doing…not surprisingly systems with a low maxDD look great when ramped up to 10×20…without selection bias becomes more an issue of portfolio volatility and whether can mitigate this volatility with diversity of other systems on multiple exchanges ?
Thanks again for all this Julian and to both you and Nick for sharing with us all.
May 11, 2018 at 1:47 am #108717JulianCohenParticipantI’m using 20 positions at 10% for my Swing system and 40 positions at 10% for my MOC.
I managed to juggle my Swing system to double the CAGR which is just amazing. I can get 40% CAGR and 15% MDD now with no selection bias. With almost the same parameters I was at 17% CAGR and 5% MDD before. Obviously the MDD has gone up considerably, but I’m happy with that overall level of risk.
May 11, 2018 at 2:36 am #108718TrentRothallParticipantwell done julian, that awesome! I am having trouble with the code at the moment, but i’ll wait until Nick has updated the course notes before i throw a ton of questions out there. After removing the L <= Buylim code i'm buying every signal. Look fwd to testing it more though. Thanks
May 11, 2018 at 5:17 am #108719ScottMcNabParticipantCheers Julian..might stick with 20 10 for swing for now..was tempted to also have a variation with 10×20 similar to the aggressive rotational system approach
those are amazing results…what time frame is that over ? Now I have to go back and try and obtain thatMay 11, 2018 at 6:19 am #108720JulianCohenParticipantScott McNab wrote:what time frame is that over ? Now I have to go back and try and obtain that2012 to present
May 12, 2018 at 2:57 pm #108692ZachSwannMemberif (LimitPrice <= LowPrice)
I think there should be no = ? (as wouldn’t this exclude the low of the day)
May 13, 2018 at 9:22 am #108702ScottMcNabParticipantJulian Cohen wrote:When I first started to test this I found ranking by ROC worked well for me, but in keeping with the spirit of collaboration, I would greatly appreciate anyone finding a better ranking method to pass it onBetter might just be better for your system, but at least we all get a chance to try it.
100 + atr(x)/close
May 14, 2018 at 2:41 am #108700Nick RadgeKeymasterI forgot to include the exploration code for the ranking. See below:
Code:_SECTION_BEGIN(“Explore”);if (Status(“action”) == actionExplore)
{Filter = Buy;
Filter = LESetUp;AddTextColumn(WriteIf(LESetup,””+BuyLim,””),”Lmt Price”,1.3,29,55);
AddColumn(Rank,”Ranking Measure”,1.2);SetSortColumns(-4);
AddRankColumn();
}_SECTION_END();
May 24, 2018 at 5:12 am #108722Stephen JamesMemberCorrect Zach – sorry for the delay..
May 24, 2018 at 6:51 am #108721JulianCohenParticipantZach Swann wrote:if (LimitPrice <= LowPrice)I think there should be no = ? (as wouldn’t this exclude the low of the day)
Thanks for spotting that Zach, it made a big difference to my MOC backtest.
-
AuthorPosts
- You must be logged in to reply to this topic.