LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
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?
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.
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.
2
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 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.
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!
You do not have enough QC Credit to send this award, get a QC Credit Pack
here.
Award Sent Successfully
Thank you for giving back to the community.
Processing...
Choose a Credit Pack
Payment Confirmation
QuantConnect Credit (QCC) can be applied to your cloud-invoices or
gifted to others in the community with Community Awards in recognition of their contributions.
Community Awards highlight the awesome work your fellow community members are doing and inspires
high quality algorithm contributions to the community. Select an option below to add
QuantConnect Credit to your account:
$5
500 Credit Points
 
$10
1,000 Credit Points
 
$18
2,000 Credit Points
10% bonus
$45
5,000 Credit Points
10% bonus
03/23XXXX XXXX XXXX 0592
We will charge your default organization credit card on file, click
here to update.