Home › Forums › Trading System Mentor Course Community › Trading System Brainstorming › Trading System Graveyard
- This topic is empty.
-
AuthorPosts
-
April 20, 2017 at 9:21 pm #106672JulianCohenParticipant
I thought that too but every time I run it I get a slightly different result. Maybe the MCS code being on there is affecting it? I’ll try running without and see. I did the MCS as 500 runs and skip 1 and got that variance.
April 20, 2017 at 10:25 pm #106674Nick RadgeKeymasterRemove the MCS code. Selection Bias is not an issue with rotational. The MCS adds the randomness which we don’t need.
April 20, 2017 at 10:26 pm #106673LeeDanelloParticipantSaid Bitar wrote:Julian Cohen wrote:Not quiteCode:Dur = Param(“ROC Length”,126,125,250,25);
LDur = Param(“LMA Length”,100,10,400,5);MYROC2 = ROC(C,Dur);
LMA = EMA(C,LDur);//=================================================================================
//Entry & Exit
//=================================================================================Cond1 = Close > LMA;
Cond2 = MYROC2 > 0;
Cond3 = OptFilt AND IndexUp AND HDBFilter AND gapFilter;I set the ATR and ROC duration the same.
This gave me
I thought for rotational system better not to skip any trades and take all of them as they come
So how many positions do you normally have open?
April 20, 2017 at 11:26 pm #106675JulianCohenParticipantNick Radge wrote:Remove the MCS code. Selection Bias is not an issue with rotational. The MCS adds the randomness which we don’t need.OK will do. Thanks Nick
April 21, 2017 at 12:48 am #106676LeeDanelloParticipantposqty = Param(“# Positions”,30,1,100,1);
Why is this line in the code if there is no selection bias?
April 21, 2017 at 4:05 am #106677Nick RadgeKeymasterThat is referencing the maximum number of positions allowed at any one time. It’s not randomising.
All it will do is limit the max number of positions and keep the balance in cash.
April 21, 2017 at 7:47 pm #106678LeeDanelloParticipantSo if there are 40 signals and you can only take 30 doesn’t that introduce selection bias.
April 21, 2017 at 8:52 pm #106679JulianCohenParticipantMaurice Petterlin wrote:So if there are 40 signals and you can only take 30 doesn’t that introduce selection bias.No because you start at the top and work down. You don’t try to enter all 40 on a limit order hoping 30 will be hit, you enter the specific shares from the top down until your funds are depleted. In backtesting the system does exactly the same and will enter exactly the same trades, therefore no selection bias.
Selection bias is only involved if you don’t know which 30 trades will be hit first out of the 40. In this case you know which ones as you only enter the trades to be executed at market open, no stretch. On US markets you enter a market order and on AUS markets you enter a limit on open order to get in the opening auction. An order entered will be filled. No selection bias.
Hope I’m explaining it well enuff:)
April 22, 2017 at 2:19 am #106680LeeDanelloParticipantThanks. Don’t trade this type system so wasn’t sure of the mechanics. So on the ASX are you always filled in the auction.
April 22, 2017 at 4:38 am #106681JulianCohenParticipantYes if you put your buy order in with 3-5% leeway
April 22, 2017 at 7:21 am #106682LeeDanelloParticipantThanks Julian
Maurice
April 22, 2017 at 3:51 pm #106603LEONARDZIRParticipantI backtested the rotational code I posted on SP500 with Said’s ROC/ATR as momentum with a couple of tweaks. I used Julian’s wma instead of sma for trend, optimized ROC and ATR duration and ran backtest from 1995. I had CAR/MDD 22.9/21. Not bad, certainly tradeable but nowhere near Juian’s and Said’s MDD of 16-17%. Also 2016 was pretty modest at 10% CAR not Said’s 35%.
Not sure what is Said’s”secret sauce”.April 24, 2017 at 7:39 pm #106683SaidBitarMemberLen Zir wrote:Not sure what is Said’s”secret sauce”.
the secret Sauce is Simplicity
no idea how i got the 35% but as i mentioned before 17% came from Nov and 5 % came from Dec they add up
and the these are the period of the boost that was in the market after the US electionJune 4, 2017 at 10:14 am #106617ScottMcNabParticipantJulian Cohen wrote:Maurice Petterlin wrote:Looking for a discarded rotational system.here’s One for you maurice. I ran it for a few months but it went into hard drawdown so I stopped it. Fairly basic. I haven’t found a rotational system that I want to run yet. I feel better using WTT variants instead.
_SECTION_BEGIN (“System Parameters”);
//=================================================================================
//Parameters
//=================================================================================
Duration = Param(“Length of ROC”,252,10,504,10);
MADuration = Param(“MA Length”,200,150,250,25);LMA = WMA(C,MADuration);
HV = 100 * StDev(log(C/Ref(C,-1)),20) * sqrt(252);//=================================================================================
//Entry & Exit
//=================================================================================
OnLastTwoBarsOfDelistedSecurity = BarIndex() >= (LastValue(BarIndex()) -1) AND !IsNull(GetFnData(“DelistingDate”));Cond1 = HV > 5 AND HV < 20;
Cond2 = ROC(C,Duration) > 0;
Cond3 = C > LMA;
Cond4 = IndexUp AND OptFilt AND HDBFilter AND gapFilterOn;LESetup = Cond1 AND Cond2 AND Cond3 AND Cond4; //Any additional buy rules apart from the rotational criteria – e.g index, price filters etc
LE = Ref(LESetUp,-1) AND NOT OnLastTwoBarsOfDelistedSecurity;//=================================================================================
_SECTION_END();_SECTION_BEGIN (“Backtesting Options”);
//=================================================================================
//Backtesting Parameters
//=================================================================================
posqty = Param(“# Positions”,30,1,100,1);
Eq = Param(“Initial Equity”,100000,1,10000000,1);
SetOption(“InitialEquity”,Eq);
SetOption(“MaxOpenPositions”,posqty);
SetOption(“UsePrevBarEquityForPosSizing”,True);
SetOption(“AccountMargin”,100);
SetOption(“AllowPositionShrinking”,True);
//SetOption(“WorstRankHeld”,100);
SetTradeDelays(0,0,0,0);SetBacktestMode(backtestRotational);
EOM = Month() != Ref(Month(),-1);
score = Ref(ROC(C, Duration),-1);//score is the rotational criteria
Score = IIf(LE,score,0);
PositionScore = IIf(Year()>=1985 AND EOM,score,scoreNoRotate);
//
PortfRisk = Param(“% daily Portfolio Risk”, 0.2, 0, 2, 0.05);
SetPositionSize( Ref(C,-1) * PortfRisk /Ref(ATR(20),-1), spsPercentOfEquity);[/code]
Can I ask about the line of code containing worstrankheld please Julian? I am trying to read through the info on rotational and I thought that this was the setting that forced the exit of securities…i.e. when the stock falls below the worst rank held….did you find it was not needed ?
June 4, 2017 at 10:23 am #107066ScottMcNabParticipantI am also struggling to understand the setpositionsize….depending on the atr this could results in variations between 5 and 20% of equity (or higher) ? Does the rotational system automatically account for this variation by just selecting the top stocks based on score until the equity is depleted ?
-
AuthorPosts
- You must be logged in to reply to this topic.