Hello QC Community!
This Hedged Equity Algo template has loads of good stuff, such as, how to set up multiple alphas for separating long & short positions, how to set up multiple universes for the long & short symbols, etc.. Also, here are some ETF symbols you can apply for your research in this algo: ETF symbols. Hope you find this algo useful.
Spacetime
thanks for sharing. how do i ensure margin call is not executed?
Vladimir
Sheikh Pancham,
Very interesting and simple strategy, thanks for sharing.
I am interested in two things:
Can you get the same results in the classic version?
Are you really considering short selling an instrument with a strong negative correlation as a hedge?
Sheikh Pancham
Thanks guys, Spacetime & Vladimir!
Spacetime, the only thing I can suggest is to add a Risk Management Model and experiment with the drawdown percent to avoid the margin call. My view, though, is that adding too many constraints is likely overfitting the algo to the backtest period. Even a simple indicator like the moving average is a bit much because of the slow & fast period parameters. Perhaps, you can try making those SMA parameters adaptive. Also, try experimenting with different lists of long and short symbols from the list of ETFs to create a better hedge. You can also add more alpha models & universes for volatility ETFs. Hope that helps for now. Maybe QC Support can respond with more ideas to avoid the margin call also.
Vladimir, I only work in the QC Algorithmic Framework. Is that what you meant? For the second question, I believe, others may disagree, that you should go Long only if you have confirmation that your asset is trending up, and Short if you have confirmation that your asset is trending down. The simple moving average is applied to detect confirmation up or down. And then take a position in the assets / ETF symbols that are designed to give the most gains in the direction (long or short) that you are going. Hope that helps for now. Thanks again.
Spacetime
thanks for your inputs
i have used free portfolio value in initialize to avoid margin calls
self.Settings.FreePortfolioValuePercentage
Varad Kabade
Hi Sheikh,
Thank you for sharing the algorithm with the community. Moving forward, we have a minor recommendation - in the above algorithm, we are using history calls to ready the SymbolData class; therefore, a WarmUp request is redundant.
Best,
Varad Kabade
Sheikh Pancham
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!