Hey there. I’ve created a screen to replicate the strategy by Toma Hentea on SeekingAlpha. He’s basically using two timers and when they both go south, the portfolio moves from high yield / convertible ETFs to treasuries. I got it working on the SCREEN function, but when I copy the buy rules to Simulation, it gives me an error related to the ShowVar function. I’d like to get it in Simulation, so that I can put it into a book and see how it works with other strategies. Is ShowVar a function that only works with screens?
seeking alpha link → JNK: Momentum Strategies For A Bond Portfolio (NYSEARCA:JNK) | Seeking Alpha
Slightly Modified Rules:
Risk Timer #1: If UUP > DBB for last 77 days then risk off
Risk Timer #2: If XLP > XLY for last 77 days, then risk off
Rebalance: Weekly
Time period: 1/2/2008 to current
If both timers are risk on, then Tickers are -->CWB,JNK,ICVT,ANGL
If one time is risk off, then Tickers are → TLT,IEF,TLH,UST,TYD,ANGL
If both timers are risk off, then Tickers are → TLT,IEF,UST,TLH,TYD
Only 2 rules, hold top 2 ETFs based on last 100 days total return
showVar(@SFTY,(Ret%Chg(77,0,GetSeries(“XLP”)) > Ret%Chg(77,0,GetSeries(“XLY”))) + (Ret%Chg(77,0,GetSeries(“UUP”)) > Ret%Chg(77,0,GetSeries(“DBB”))))
Eval(@SFTY=2,Ticker(“TLT,IEF,UST,TLH,TYD”),Eval(@SFTY=0,Ticker(“CWB,JNK,ICVT,ANGL”),na) or Eval(@SFTY=1,Ticker(“TLT,IEF,TLH,UST,TYD,ANGL”),na))