Lean
Lean copied to clipboard
Security Re-Addition Behavior Tidy Up
Expected Behavior
Call Remove Security, then Add Security should reset the assets so they trigger the same events and end up in a happy state.
Actual Behavior
- Remove OptionContracts then re-adding them results in tradable-false;
- Security Initializer not called on re-adding.
- Options and equities reportedly have different behavior.
Potential Solution
Review security construction logic.
Reproducing the Problem
Code to follow.
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have provided detailed steps to reproduce the issue