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.
Hi Klemen,
You can look through some of the basic portfolio construction code on GitHub and some sample framework algorithms for inspiration. We do have 5 specific examples, but please be creative and try to implement this portfolio construction model in QC! If you run into any questions about the API, please do not hesitate to reach out again.
I don't know how to take a simple portfolio creation, let's say, for the sake of example, this one discussed here Adaptive Asset Allocation: ReSolve Asset Management . As you can see it trades only at the end of monthÂ
self.Schedule.On(self.DateRules.MonthEnd("SPY"), self.TimeRules.BeforeMarketClose("SPY", 15), Action(self.allocate))
and has three other paramters
self.momentum_lookback = 126
self.correlation_lookback = 126
self.volatility_lookback = 21
What I want to create (and have no idea how to do it as a beginner in QuantConnect) is many sub portfolios (tranches) each parametrized in a different way and with rebalancing every trading day of the month (not only last trading day of the month) to hopefully crete a more roboust "model" (avoid overfitting to turn of the month and other cherry picked/lucky paramters).
For example I want to have momentum_lookback in the range of 120 to 130, correlation_lookback in the range of 110 to 140 and volatility_lookback in the range of 15 to 25. This means I am simultaneously running 21(number_of_tranding_days_of_the_month) * 11(number of distinct values for momentum_lookback parameter) * 31(number of distinct values for correlation_lookback parameter) * 11(number of distinct values for volatility_lookback parameter). From all this tranches (slightly differently paramterized portfolio constructions) I need to then, every day, consolidate positions and do the trading (delta from current portfolio holdings to desired portfoolio holdings).
Please look at the links I provided in original question. Does this makes sense now? How to do this in QuantConnect? Can you maybe guide me on how to extend Adaptive Asset Allocation: ReSolve Asset Management ?
Hi Klemen,
There are, broadly speaking, two ways to approach this:
To do the code above then at some level, you'll need an abstraction before passing it to QuantConnect's basic API to implement. You won't get that stuff "out of the box" -- but its code, so you can build whatever you need. The API provides a thousand different types of lego blocks it is up to you how you clip them together.Â
public class KlemenPortfolio {
// Do Stuff,
}
Â
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.
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!