Add brokerage Financial Advisor account services - Feature 9707 fav2 - #9789
Open
Farrell-A wants to merge 53 commits into
Open
Add brokerage Financial Advisor account services - Feature 9707 fav2#9789Farrell-A wants to merge 53 commits into
Farrell-A wants to merge 53 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds brokerage-neutral Financial Advisor account-state and group-management capabilities to LEAN. The services are optional, immutable at their public boundaries, installed before algorithm initialization, and unavailable to brokerages that do not implement them. FA algorithms can currently have drift in client accounts from algorithm intent that are not visible to LEAN or the algorithm. This PR extends the integration with the IBKR API and adds additional functionalities for FA accounts.
This closes: QuantConnect/Lean#9707
** This is part of a coordinated multi-repo feature release. See the attached files for thorough details**
Use cases
Solves:
groups in live trading. Current Group allocation causes drift between algorithm intent and actual
holdings for individual sub accounts across several inevitable edge cases that are currently invisible.
following intent because Client D added money to their brokerage account.
from within an algorithm.
Enhancements:
enabling algorithms to implement end-to-end robo-advisory workflows.
A execute orders to make it in alignment with Group B intent and then move the account to Group B.
from trading for N days so it doesn't immediately trade what was intentionally liquidated.
routed to groups, or individual client accounts that may or may not be in a group.
What changed
QCAlgorithmin C# and Python.Initializeand revokes mutation authority during engine teardown without modifying the protected engine files.Compatibility
Validation
dotnet build QuantConnect.Lean.slnin Release configuration: 0 errors.Initialize, unavailable mutation authority there, and complete/scopedReadysnapshots, then exited cleanly.AlgorithmManager.cs,BrokerageTransactionHandler.cs,LocalObjectStore.cs, andBrokerage.cs.Related PRs and sequencing
The coordinated PRs can be reviewed concurrently, but their release has package and platform dependencies:
The hosted deployment schema/UI must expose the unified-groups and group-management inputs under their exact brokerage-data keys. That platform work is external to this repository.
IBAutomater version: 2.0.93 to be in alignment with the linked PRs. Update required with version drift.
Files attached explaining the full fav2 linked PR scope across repos, and testing conducted
fav2_live_verification_report.md
fav2_enhancement_summary.md
enhancement_change_inventory.md
enhancement_goals_findings.md
enhancement_scope.md
test_file_scope.md
Documentation
This update requires documentation changes. A separate PR is open for the documentation changes.
Types of changes
Checklist: