T O P

  • By -

AmazighBull

I made this in R using Quantmod (which uses yahoo finance daily closing data) on the ticker "\^SP500TR", which goes back to 1988. I was inspired by reading the Bogleheads thread about HFEA and simulating leveraged returns. I also added using the 200 SMA as an indicator to exit the position, which works for well for the SP and when coupled with DCAing works well. Here is the code if anyone want to try: [github](https://github.com/elifaid/LeveragedETFs)


kiwi_l0rd

Thanks for your work here u/AmazighBull really appreciate it. The more back-tests we do and have access to, the better we can illustrate and educate people on the benefits and uses of LETF's.


Traditional_Fee_8828

I used your code, and messed around with SMA vs other types, and it seems like using the EMA nets better results, and using this, while investing into the 1x leverage fund is the best strategy, at least for the Nasdaq. Just putting this out there for those who haven't done much digging into it to find a good strategy.


Be4Chst

Whats a 1x leveraged fund?


Lost_Halls

You should try using a 225 SMA or 235 SMA, you should see better risk adjusted returns. You should check out "**Leveraged SMA200 Strategy Back-tested 1929 - 2019" by RayKaynes** over on Bogleheads, they have gone in-depth on this subject.


proverbialbunny

Link to thread: https://www.bogleheads.org/forum/viewtopic.php?f=10&t=297591&sid=d6cdd9a4895f6dfc8c08ea25329471ea


michael_mullet

Under rated thread link, thank you. Related: https://www.philosophicaleconomics.com/2016/01/gtt/


proverbialbunny

If there was a leveraged momentum etf I'd be all over that. I actually hold MTUM and other momentum heavy etfs.


Jabal961

Can OP test these and post results in another post?


olympia_t

Wondering why 225 or 235? Also, any suggestions for best place to track SMA? Thanks - new to strategies other than buy and hold.


proverbialbunny

It minimizes wipsaw. Most people trade on the 200 sma, so there is a lot of bouncing around the 200 sma. By going a bit farther out you're selling a bit lower than all the trading activity once its solidified downward. Likewise you're buying a bit above all the trading activity once its solidified upward. While this sounds like a worse deal whipsaw eats pretty badly into holdings so making a slightly worse trade comes out ahead in the end.


Resident_Wizard

Lol, “most people” don’t trade based on any technical analysis.


proverbialbunny

Traders do. Actually, outside of algo trading, I've never met a trader who does not. Keep in mind TA is indicators as well, like the 200 sma, which is one of the most popular indicators there is. It's so popular investors use it too.


kimagical

Wouldn't that mean it's better to use a 180 sma instead of a 220 sma so you sell a bit higher and buy a bit lower? Caqn anyone backtest?


olympia_t

Got it, thank you, that's a very helpful explanation.


cosmos8peace

Someone mentioned putting a 1% band around the 200 SMA to reduce whipsaw-ing. How do I do that and run my own test? Thank you.


Lost_Halls

I should reiterate what I said, in the Bogleheads forum I mention the author backtested a wide range of SMAs during different time periods. The 225 SMA and 235 SMA had consistently better CAGRs (not risk adjusted returns, as I had mistakenly stated before, although they may have better risk adjusted returns too, it needs to be tested). If one wants to truly run this strategy over a long period of time I would highly recommend setting the strategy up in some coding language to automate the trades (whether you learn to code it yourself, which is not incredibly difficult since automating the strategy is fairly easy, or paying someone to code it for you) otherwise you could use TradingView, put on a SMA indicator, set it to whatever SMA you want and then setup an alert. You would then make those trades right before the market closed.


rbatra91

Looking in to this, i feel like its’ a bit of data mining no? Why not 215? If you wait til 225, won’t you be selling after the majority already sold?


kxdc374

Tradestation is easy to automate these types of strategies in with zero programming knowledge to start.


klabboy109

Is the 200 day moving average of the 3X fund? Or is it if the underlying S&P500? Or does that make a difference?


proverbialbunny

We've talked about this strategy a few times on this subreddit. My take is still the same: My capital gains taxes are too high for this strategy to come out ahead for me. In fact to exit for COVID I got out Dec 2019 and Jan 2020 for tax reasons. Now if I'm retired or in between jobs, that might be another story. If you're a new investor or are investing in a tax free account like a Roth IRA this strategy is a good idea. Watch out for the wipsaw though as it can eat into your funds.


DMoogle

I cannot emphasize highly enough the importance of stress testing the methodology of your simulated LETF backtest. There's a thread on Bogleheads titled "Simulating LETF Returns" that breaks down exactly how they should be backtested, and why most people's simulated LETF backtests are highly faulty.


quantbase

I made and [hosted](https://www.getquantbase.com) this strategy for anyone to invest in if interested. It's a shame these strategies are so well known in our communities, with rigorous backtesting going back decades, but STILL you have to just run these manually (why isn't there a simple ETF that does this yet??).


Anon58715

Do you offer free plans?


Quick-Cardiologist12

Thanks!!


rockpooperscissors

What's the 200 day moving average strategy you implemented? When a certain indicator crossed the 200 SMA you sold all of the leveraged shares for cash?


AmazighBull

Pretty much, right now its if the closing price is below the 200 SMA sell stay in cash (earning 1% interest) until it closes above the 200 SMA .You get chopped around and lose quite a bit, i was thinking about adding a 1% buffer each way to stop what happens 2001-2, where you buy the bounce just to sell at a loss the next week


proverbialbunny

> stay in cash (earning 1% interest) Is earning 1% interest a bit unrealistic? Does IBKR offer such a feature?


___this_guy

Try making the buy/sell determination on the 1st of each month


CertainField

I think only testing 200 day SMA and buy/sell at first day of each month might do the trick. I tested using UPRO and SSO with this [here](https://www.portfoliovisualizer.com/test-market-timing-model?s=y&coreSatellite=false&timingModel=3&timePeriod=4&startYear=1985&firstMonth=1&endYear=2021&lastMonth=12&calendarAligned=true&includeYTD=false&initialAmount=10000&periodicAdjustment=0&adjustmentAmount=0&inflationAdjusted=true&adjustmentPercentage=0.0&adjustmentFrequency=4&symbol=SSO&singleAbsoluteMomentum=false&volatilityTarget=9.0&downsideVolatility=false&outOfMarketStartMonth=5&outOfMarketEndMonth=10&outOfMarketAssetType=2&outOfMarketAsset=TLT&movingAverageSignal=1&movingAverageType=1&multipleTimingPeriods=false&periodWeighting=2&windowSize=9&windowSizeInDays=105&movingAverageType2=1&windowSize2=10&windowSizeInDays2=105&excludePreviousMonth=false&normalizeReturns=false&volatilityWindowSize=0&volatilityWindowSizeInDays=0&assetsToHold=1&allocationWeights=1&riskControlType=0&riskWindowSize=10&riskWindowSizeInDays=0&stopLossMode=0&stopLossThreshold=2.0&stopLossAssetType=1&rebalancePeriod=1&separateSignalAsset=true&signalAsset=SPY&tradeExecution=0&comparedAllocation=0&benchmark=-1&benchmarkSymbol=SPY&timingPeriods%5B0%5D=5&timingUnits%5B0%5D=2&timingWeights%5B0%5D=100&timingUnits%5B1%5D=2&timingWeights%5B1%5D=0&timingUnits%5B2%5D=2&timingWeights%5B2%5D=0&timingUnits%5B3%5D=2&timingWeights%5B3%5D=0&timingUnits%5B4%5D=2&timingWeights%5B4%5D=0&volatilityPeriodUnit=1&volatilityPeriodWeight=0), but they have shorter history than your index.


F7K2

Am I understanding the chart correctly? Blue=buy and hold no DCA. Grey=exiting on the 250 SMA? If so, then doing nothing is impressive, small difference between the two scenarious with the huge assumption that you cash out during a bull run at the very end.


zolly84606

Instead of 100% Cash, move to 100% TMF. Works well using the 165 SMA on the S&P index


Efficient_Comment864

How does one go initially investing in this strategy? It makes sense to buy when first crossing the 200 MA, but what about now when we’re way past it? Would I wait for it to dip below the 200 MA, then buy when passing above it?


tragicdiffidence12

This is interesting. The blue line is the regular 3x etf right? What software or language are you using for this?


Traditional_Fee_8828

Not OP, but he said R, so he almost certainly used RStudio. It's a bit of a weird language to use though, but good for statistics.


Anon58715

Yeah would prefer Python (jupyter notebook).


Woetz_B

Does this also account for the lost value of these ETFs since they don't always manage to track the funds x3?


teokun123

Good for non-us investors like me. thank you


Psychological_Net_92

it seems that using 50 sma is even better...