Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Re-Addition Behavior Tidy Up #8647

Closed

Conversation

jhonabreul
Copy link
Collaborator

Description

This includes multiple changes that improve and fix the security re-addition behavior:

  • Security instances are not re-created:
    • Security instances are re-used from the SecurityManager so state can be tracked
  • Security changed events for removal are not emitted for securities that are removed from one universe for kept or added by another one.
  • Securities are re-initialized when re-added to the algorithm:
    • Securities can be re-added manually or by being re-selected by any universe.

Note: some regression algorithms stats changed due to the security re-addition behavior fixes, including the initialization of re-added securities which also makes the history data point count increase.

Related Issue

Closes #7929

Motivation and Context

Securities can be re-added manually or by being re-selected by any universe, which requires them to be re-initialized, specially if the algorithm is using a custom security initializer.

Also, removed security change events where being emitted for securities removed from a universe, even if other universes still select them.

Requires Documentation Change

How Has This Been Tested?

Regression algorithms

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@jhonabreul jhonabreul force-pushed the bug-7929-security-re-addition branch from f5f2217 to 55b7824 Compare March 26, 2025 14:28
@jhonabreul
Copy link
Collaborator Author

Closing for now in favor of #8656

@jhonabreul jhonabreul closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security Re-Addition Behavior Tidy Up
1 participant