This thread is meant to continue the development of the In & Out strategy started on Quantopian. The first challenge for us will probalbly be to translate our ideas to QC code.
I'll start by attaching the version Bob Bob kindly translated on Vladimir's request.
Vladimir:
About your key error, did you also initialize UUP like this?
self.UUP = self.AddEquity('UUP', res).Symbol
John Munro
I think we should be careful here. I think the reason to why TLT isn't “working” is not because of high inflation per se, but the Fed's willingness to hike rates in light of high inflation. If the Fed took BOJ's approach, TLT would have gone the other way.
NaN
I've been reading the old Quantopian and now QuantConnect thread on/off for several weeks and finally decided to create an account.
With the recent talk about how to improve the Out strategy, I'm surprised there hasn't been a mention of the yield curve and using Treasury spreads for events like the past year where both stocks and bonds go down due to interest rates going up. Has anyone looked into that as a potential indicator for when to get out or to consider using for a cash option when it's not optimal to be in bonds?
Jam
Has anyone attempted backtesting this strategy in time periods before 2008? For example, the tech meltdown of 2001.
Any ideas on how to go about testing it? Almost all of these ETFs didn't exist then with the exception of QQQ.
I've been experimenting with modifications to the strategy in times of rapidly rising rates. If anyone is interested in collaborating, send me a message on Telegram: @janthonym
Demid Fedorov
Hi Jam, Vladimir had a limited run of this strategy dating back to 2003 in one of these threads, unfortunatley I don't have it handy at the moment, but you can find it on the forums. It performed well from 2003 to 2008 in the backtest Vladimir shared.
Simon David
Backtests from 2000 through to now for the various In-Out versions run fine if you're not using some of the more recent bond ETFs as alternative assets. From memory TLT and TIP have data back before 2007 but a lot of the other “safe” assets don't, which is why most people are restricting back test runs to 2008 onwards.
Decebal Mihailescu
Has anyone been able to implement this algorithm in C#?
Viceroy
I have been playing around with this model diving more into optimizing hedging tools and inflation plays. Using Strongs recommendation, I found an effective way to better enter/exit positions in 2022/23. Backtesting produced statistically sound results using bootstrapping test and T-Test with p < 0.01 and < 0.03 respectively. Is this the best way to test this?
Heres the performance on my local system (currently transferring to QC)
More importantly, I really enjoyed the idea of inflation “anomaly” detection. I ended up with a rather unique strat and would love thoughts because I am not sure why it works. Essentially, the allocation to TLT and UUP is decided by the covariance between the assets. I calculate this for the time range and then overlay a 300-500 day mean covariance (essentially the total mean). If the covariance is < the mean then allocate to TLT else allocate to UUP.
The results are a lower correlation to market ETFs and lower correlation to TLT and UUP. Given the returns results in the new hedge allocation “Selected Returns”. It has less volatility and greater returns.
Tentor Testivis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!