Home › Forums › Trading System Mentor Course Community › Trading System Brainstorming › A simple ETF strategy
- This topic is empty.
-
AuthorPosts
-
April 12, 2023 at 7:53 am #102267Nick RadgeKeymaster
Here’s a simple ETF strategy that might be good for a conservative retirement account At the end of each month:
(1) Ensure the trend of #NYSEHL is up
(2) Ensure the trend of the $SPX is up
(3) If (1) or (2) is true, calculate the rate of change of $SPY and $GLD for the last 150 days
(4) If (3) > 0, the buy strongest. If (3) < 0, then stay in cash CAGR: +11.2% maxDD -20.5% Exposure: 74%August 3, 2023 at 12:16 am #115540PaulBaileyMemberAnyone else having a go at replicating / repeating this?
I’m trying……….
August 11, 2023 at 11:09 pm #115701KateMoloneyParticipantMy version gets 11% CAGR with a -38% maxDD, but it hasn’t accounted for interest on cash and I used monthly bars.
I don’t think I’ve coded in the off switch properly either….
Nick or Craig, how to do you code for interest on cash? Do you use a bonds ETF to do this?
August 11, 2023 at 11:15 pm #115709KateMoloneyParticipantWork in progress code
Notes:
All weather example
1) If #NYSEHL is up OR SPY is up
2) If above is true, calcuate ROC for SPY and GLD in last 150 days
3) If the ROC is above 0, buy the strongest, if they are below 0, stay cashImport:
DataSource: Norgate
IncludeList: SPY, GLD {“ETFs”}
IncludeList: #NYSEHL, $SPX
StartDate: 1/1/1995
EndDate: Latest
SaveAs: AllWeather.rtdSettings:
DataFile: AllWeather.rtd
StartDate: 1/1/2005
EndDate: Latest
BarSize: Monthly
Benchmark: Benchmark
Side: Long
Allocation: S.Equity
EntrySetup: Symbol=$$SPX
Parameters:RegimeLen: From 1 to 18 def 12
RocLen: From 1 to 12 def 3 //Data:
Uptrend: Extern($$SPX, C > MA(C,RegimeLen))
HiLo: Extern($#NYSEHL, C > MA(C, RegimeLen))MyROC: ROC(C, RocLen)
MyRank: #rank if(InList(“ETFs”), MyROC, nan) // the “nan” means “don’t rank if not in ETFs list” (you can’t trade $SPX or #NYSEHL)Strategy: AllWeather
Side: Long
EntrySetup: MyRank = 1 // top-ranked ETF
ExitRule: MyRank > 1 // no longer top-ranked ETF
Quantity: 100 //
QtyType: Percent// Below items need work
// 1) Check that the uptrend and HiLow indicators are switched on – don’t think they are
// 2) Also need code to account for interest earned on cash ??? Bonds ETF or just interest on cash in bankAugust 11, 2023 at 11:23 pm #115710KateMoloneyParticipantI’ve tried using the following to include the regime filter, seems to worsen results, don’t think I’ve coded it correctly.
Notes:
All weather example
1) If #NYSEHL is up OR SPY is up
2) If above is true, calcuate ROC for SPY and GLD in last 150 days
3) If the ROC is above 0, buy the strongest, if they are below 0, stay cashImport:
DataSource: Norgate
IncludeList: SPY, GLD {“ETFs”}
IncludeList: #NYSEHL, $SPX
StartDate: 1/1/1995
EndDate: Latest
SaveAs: AllWeather.rtdSettings:
DataFile: AllWeather.rtd
StartDate: 1/1/2005
EndDate: Latest
BarSize: Monthly
Benchmark: Benchmark
Side: Long
Allocation: S.Equity
EntrySetup: Symbol=$$SPX
Parameters:RegimeLen: From 1 to 18 def 12
RocLen: From 1 to 12 def 3Data:
Uptrend: Extern($$SPX, C > MA(C,RegimeLen))
HiLo: Extern($#NYSEHL, C > MA(C, RegimeLen))
Setup: Uptrend or HiLo
MyROC: ROC(C, RocLen)
//MyRank: #rank if(InList(“ETFs”), MyROC, nan) // the “nan” means “don’t rank if not in ETFs list” (you can’t trade $SPX or #NYSEHL)
Myrank: #rank Setup and if(InList(“ETFs”), MyROC, nan)Strategy: AllWeather
Side: Long
EntrySetup: MyRank = 1 // top-ranked ETF
ExitRule: MyRank > 1 // no longer top-ranked ETF
Quantity: 100 //
QtyType: Percent// To work on
// Check that the uptrend and HiLow indicators are switched on – don’t think they are
// Also need code to account for interest earned on cash ???
// And check that the system is in cashAugust 12, 2023 at 3:10 am #115711JulianCohenParticipantI haven’t downloaded and tested this but I think you need to have
EntrySetup: MyRank = 1 and Setup
remove the setup from the ranking. That will switch on/off the regime filter
September 12, 2023 at 9:17 am #115712StevenPolaMemberI gave it a crack as follows.
Robust feedback on where this is a little bit shite much appreciated. Its the only we we learn right……..!No commissions included but with only 39 trades this shouldn’t trouble the scorer too much.
Notes: Attempt to replicate “A simple EFT” strategy poste by Nick on Forum.
Import:
DataSource: Norgate
IncludeList: SPY, GLD, $SPX, #NYSEHL
StartDate: 1/1/00
EndDate: Latest
SaveAs: ChartistSimpleEFT.rtdSettings:
DataFile: ChartistSimpleEFT.rtd
StartDate: 1/1/05
EndDate: Latest
BarSize: Daily
UseAvailableBars: False
AccountSize: 100000Notes: There are 2 (Filter1) and 2 (Posrank). “//” without backdating the ROC that seems to work better with momo.
Data:
Reggie1: Extern($#NYSEHL, C > MA(C,20)) // Regime Filter – NYSEHL
Reggie2: Extern($$SPX, C>MA(C,200)) // Regime Filter – SPX
ReggieCombo: Reggie1 or Reggie2 // Regime Filter – Combined
//Filter1: ROC(C,150) > 0 // Momentum not backdated – as per Nicks Post
Filter1: ROC(C,150)[20] > 0 // Momentum Backdated by a month works better.
Universe: Symbol == $GLD or Symbol == $SPY // Define Universe to stop $SPX going into trades
canhold: ReggieCombo and Filter1 and Universe
//Posrank: #rank if(canhold, ROC(C,150), -1) // Remove $SPX and #NYSEHL from Ranking – as per Nicks Post
Posrank: #rank if(canhold, ROC(C,150)[20], -1) // ROC Backdated by a month works better.Parameters:
Positions: 1
Worstrank: 1 // Only 2 symbolsNotes: Benchmark with Dividends reinvested.
Benchmark: SPY
Side: Long
EntrySetup: Symbol=$SPY
ExitRule: Dividend > 0Strategy: Nick Simple ETF
Side: Long
Quantity: 100 / Positions
QtyType: Percent
MaxPositions: Positions
EntrySetup: EndOfMonth and canhold and Posrank <= Positions
SetupScore: Posrank
ExitRule: EndOfMonth and (!canhold or Posrank > worstrank)September 12, 2023 at 9:42 pm #115795Nick RadgeKeymasterLooks okay and not too dissimilar to what I initially posted.
You can probably tighten the code up, i.e.
Reggie1: Extern($#NYSEHL, C > MA(C,20)) // Regime Filter – NYSEHL
Reggie2: Extern($$SPX, C>MA(C,200))
ReggieCombo: Extern($#NYSEHL, C > MA(C,20)) or Extern($$SPX, C>MA(C,200))June 2, 2024 at 2:56 pm #115796RobertKinnellParticipant12.6% ROR, 22% maxDD and AvgExp 79%.
And with QQQ instead of SPY…. 15.7% ROR, 20.5% MaxDD and AvgExp 79%.
June 11, 2024 at 3:16 pm #116169ArthurHillMemberInteresting….thanks for sharing.
Nasdaq stocks account for around a third of the S&P 500 and there is an equivalent indicator for the S&P 500. #SPX52HL
-
AuthorPosts
- You must be logged in to reply to this topic.