We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
LEAN provides an order event for every expiration.
When a leg of Bull Put Spread is assigned earlier, we don't get the assignment/exercise of the other leg because of buying power.
N/A
namespace QuantConnect.Algorithm.CSharp { public class LogicalBlueLemur : QCAlgorithm { private Symbol _spxw; private bool _done; public override void Initialize() { SetStartDate(2022, 1, 21); SetEndDate(2022, 1, 26); SetCash(10000); var option = AddIndexOption(AddIndex("SPX").Symbol, "SPXW"); option.SetFilter((x) => x.IncludeWeeklys().Strikes(-5, 5).Expiration(1, 4)); _spxw = option.Symbol; } public override void OnData(Slice slice) { if (_done) return; Buy(OptionStrategies.BullPutSpread(_spxw, 4490, 4485, new DateTime(2022, 1, 24)), 1); _done = true; } } }
When we replace the starting cash from 10,000 to 20,000, the 4th order is recorded.
master
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
LEAN provides an order event for every expiration.
Actual Behavior
When a leg of Bull Put Spread is assigned earlier, we don't get the assignment/exercise of the other leg because of buying power.
Potential Solution
N/A
Reproducing the Problem
When we replace the starting cash from 10,000 to 20,000, the 4th order is recorded.
Checklist
master
branchThe text was updated successfully, but these errors were encountered: