Index | Recent Threads | Who's Online | Search |
|
New Thread |
|
scrichley
![]() |
Hey there. Looking to replicate a QQQ trading system from @QuantpT on Twitter. Basically the rules are... Buy if QQQ SMA(50) > SMA(125) & ROC(5) < 0 for each of the last 5 days & ROC(5) close < ROC(5) yesterday's close Sell if RSI(2) > 70 I'm getting a worse result than the author who runs the system on Amibroker and I wonder if my code is correct for summing the number of consecutive days with the ROC(5) < 0. His system may be selling the close with RSI(2) > 70 which I don't think I can replicate here? LoopSum("ROC(5,0) < 0", 5) = 5 ![]() ![]() |
||
|
yuvaltaylor
![]() |
Hey there. Looking to replicate a QQQ trading system from @QuantpT on Twitter. Basically the rules are... Buy if QQQ SMA(50) > SMA(125) & ROC(5) < 0 for each of the last 5 days & ROC(5) close < ROC(5) yesterday's close Sell if RSI(2) > 70 I'm getting a worse result than the author who runs the system on Amibroker and I wonder if my code is correct for summing the number of consecutive days with the ROC(5) < 0. His system may be selling the close with RSI(2) > 70 which I don't think I can replicate here? LoopSum("ROC(5,0) < 0", 5) = 5 Buy rules: SMA(50) > SMA(125) LoopMin("ROC(5,Ctr)",5) < 0 ROC(5) < ROC(5,1) Sell rule: RSI(2) > 70 Results are pretty nice overall - https://www.portfolio123.com/port_summary.jsp?portid=1664925 - but not in the last ten years. Yuval Taylor Product Manager, Portfolio123 invest(igations) Any opinions or recommendations in this message are not opinions or recommendations of Portfolio123 Securities LLC. |
||
Edit 1 times,
last edit by
yuvaltaylor
at Nov 29, 2021 10:07:37 AM
|
WalterW
![]() |
It seems to me that; LoopMin("ROC(5,Ctr)",5) < 0 should be LoopSum("ROC(5,Ctr)<0",5)=5 No? |
||
|
yuvaltaylor
![]() |
It seems to me that; LoopMin("ROC(5,Ctr)",5) < 0 should be LoopSum("ROC(5,Ctr)<0",5)=5 No? Yes, you're right. Either that or LoopMax("ROC(5,Ctr)",5) < 0. Sorry about the error, and thanks for the catch! Yuval Taylor Product Manager, Portfolio123 invest(igations) Any opinions or recommendations in this message are not opinions or recommendations of Portfolio123 Securities LLC. |
||
|
geov
![]() |
Results with TLT when model is not in QQQ are good. Annualized return= 17% from 2000 to 2021. Max D/D= -23% Ideal Number of Positions = 2 Reconstitution & Rebalancing Frequency = Daily Position Weight Formula : 9.99*ticker("QQQ")+0.01*ticker("TLT") Buy: ticker("QQQ") & SMA(50)>SMA(125) & LoopSum("ROC(5,Ctr)<0",5)=5 & ROC(5)<ROC(5,1) | ticker("TLT") Sell: ticker("QQQ") & rsi(2) > 70 ![]() |
||
|
scrichley
![]() |
Thank you all for your help. My next question was going to be how to buy IEF when not in QQQ. Georg is in my head! |
||
|
scrichley
![]() |
Roger that. TY. I only have the simulation level sub, so it won't let me use position weighting, but I appreciate the result with TLT. My image was that the low exposure to equities would give a decent result if we allocate to treasuries when out of the market... I don't suppose there is a way to run this without the simulation level subscription? I'd like to run it with a basket of bonds when not in QQQ using trend following to pick duration. |
||
|
|