Need Help Understanding EqualWeightingPortfolioConstructionModel

Back

Hi everyone,

I'm just now learning QuantConnect and I have become stuck trying to understand something about the implementation of the EqualWeightingPortfolioConstructionModel in python.

I'm simply looking at the GitHub file to see the inner-workings.

https://github.com/QuantConnect/Lean/blob/master/Algorithm.Framework/Portfolio/EqualWeightingPortfolioConstructionModel.py

The documentation states "Portfolio Construction Models have one primary method: CreateTargets()"

https://www.quantconnect.com/docs/algorithm-framework/portfolio-construction

However, when I look at the equal weighting portfolio implementation, I don't see this method implemented. Can anyone tell me what is going on? How does this class take insights from an Alpha, make decisions, then return the resulting PortfolioTargets to Risk Management?

 

On another note that is a broader version of the previous specific question,

I am ultimately getting frustrated with reading the GitHub source code implementations of these "provided" framework modules. It appears that the basic rules and functionalities that is described in the documentation aren't followed in most of these implementations.

Alphas should implement Update(), Portfolio Constructions should implement CreateTargets(), Risk Management should implement ManageRisk(), and Execution should implement Execute(),.

In what circumstances would a provided model for any of these framework sections not implement their respective method?

Where could I have learned this information myself?

 

Thanks.

Update Backtest







 
0

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 Daniel,

The algorithm instance is responsible for passing the insights from the alpha model to the portfolio construction model. Refer to the source code here. For the EqualWeightingPortfolioConstructionModel, the CreateTargets method is defined in the superclass, PortfolioConstructionModel.

If there are any other suspected discrepancies found in our documentation, please share as we are in the process of upgrading our docs.

Best,
Derek Melchin

1

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.


Update Backtest





0

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.


Loading...

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!