QuantConnect / QuantConnect/Lean
Add CompositePortfolioConstructionModel
Open
@AlexCatarino is already working on this.
Since Apr 24, 2020.
feature
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
Have an IPortfolioConstructionModel that all allocates the same portfolio share for each alpha model.
Actual Behavior
Not implemented.
Potential Solution
Constructor
- Rebalacing func. We could inherit from PCM to re use his logic around rebalancing, but could still override CreateTargets
- Portfolio bias -> on the aggregated result
- Dictionary<string, IPCM> the source models with their corresponding IPCM
- Portfolio factoring per SourceModel (default being EW)
Would be nice being able to evaluate a SourceModel performance and factor based on it. How? Accessing its active insights + Portfolio? What if there isn’t any holding because the insight was canceled by another Alpha? There will be no holding, the security price is there though. Maybe analyze the closed insight score?
Add(string sourceModel, IPCM pcm)
IEnumerable<IPortfolioTarget> CreateTargets(QCAlgorithm algorithm, Insight[] insights)
- Filter insights with no SourceModel -> won’t happen they are set by the framework https://github.com/QuantConnect/Lean/blob/master/Algorithm/QCAlgorithm.Framework.cs#L408
- Group insights by SourceModel and push them into their corresponding IPCM
Aggregate IPCM results, factoring allocation per SourceModel
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.