Back

Framework Algorithm question

I'm currently looking to convert my existing multipart algorithm into a QC framework algorithm. I had already built my own framework similar to QC's. In my existing framework each alpha class sets a desired allocation of securities and then the framework combines the allocations and executes them all to minimize transaction fees. My algorithm is designed to be used in an long-only retirement portfolio where my goal is to use smart rebalancing to beat a simple buy and hold portfolio on a risk adjusted basis rather than focus on making individual profitable trades.

Similar to this:

  • Algo 1:
    • Spy = 0.4 
    • TLT = 0.6
  • Algo 2:
    • Spy = 0.6
    • TLT = 0.2
    • XIV = 0.2
  • Combined allocations (equiweight) that get executed:
    • Spy = (0.4+0.6)/2 = 0.5
    • TLT = (0.6+0.2)/2 = 0.4
    • XIV = (0+0.2)/2 = 0.1
 Is  there any way to convert these to insight objects that would set the desired allocation? From everything I have read it seems the insights are designed to be more of a short term 100% long or 100% short signal rather than designed to be a long-term portfolio rebalance tool. My algo updates it's desired allocations every day but the allocations don't always change. Would they be considered confidence values? or perhaps make a custom Portfolio Construction Model? 
Update Backtest







Hey Lukel! The framework (and coding in general) tries to separate concerns. One piece of code should be focused on one task. We've tried to abstract the concerns of predicting the future -- away from the concern of position sizing in the portfolio. In the framework, these are handled by separate models and although you could hack it to do what you want -- it's not the spirit of the design.

Insights are not designed for any specific time frame - but rather the best guess of your algorithm on the potential future return. From here your portfolio construction model should figure out the best weights possible.

You could make a portfolio construction model which assigned weights based on the confidence flag of your insights. This would be a reasonable proxy.

To support multiple alphas in a single algorithm we've got the CompositeAlphaModel which splices the results of two Alpha models together. The insights are named so you can determine the source in the portfolio model.

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.


Thanks Jared,

The more I think about it, the more I realize my algorithm's position sizing is actually a measure of confidence. Each alpha assigns it's various weights to each asset based on it's own individual factors of what asset or combination of assets it thinks will do best in the near future (1 week to 1 month). Even though it doesn't separate position sizing a weight of 0 would be 0 confidence that an asset will rise (basically a flat insight). A weight of 1.0 would be complete confidence that that particular asset will rise more than the other assets it could have assigned weights to. The alphas are not designed to short so there would be no down insights. My framework takes the combination of those confidence levels from each alpha in equal parts and assigns them in the final allocation. I think it seems relatively simple to make a custom  portfolio construction model based on this.

I've been exicted to use QC's framework rather than my own custom one for a while now, but didn't have time to dig into it in the last 6 months.

0

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...

This discussion is closed