QuantConnect / QuantConnect/Lean
Penny Pilot Program for Options Pricing
@jhonabreul is already working on this.
Since Jul 23, 2024.
- Dominant language
- C#
- Stars
- 21.7k
- Forks
- 5.3k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 34
Description
Expected Behavior
The Lean Algorithm should support the Penny Pilot Program, allowing options on eligible securities to be quoted and traded in $0.01 increments for quotes below $3.00 and $0.05 increments for quotes at or above $3.00.
Actual Behavior
Currently, when attempting to update an order on an option such as AAPL with an expiration date of 2024/07/19 and a strike price of 215 (Right: Call), the system throws an error indicating that the price is not rounded to a valid increment. For example, attempting to place an order at a price of 18.12 results in an error like "18.12000000 not rounded to a valid price increment [0.05]".
Potential Solution
- Identify Eligible Securities: Update the symbol and market data handling to identify securities included in the Penny Pilot Program.
- Modify Price Increment Logic: Adjust the order processing logic to allow $0.01 increments for options priced below $3.00 and maintain $0.05 increments for options priced at or above $3.00.
- Validation Updates: Ensure the order validation process supports the new price increment rules for eligible options.
- Testing and Verification: Implement unit and integration tests to ensure that options eligible under the Penny Pilot Program are correctly handled and that price increments are properly validated.
Reproducing the Problem
- Create a new algorithm in the Lean.
- Use the following code to define an option contract:
var AAPLOption = Symbol.CreateOption(Symbols.AAPL, Market.USA, OptionStyle.American, OptionRight.Call, 215m, new DateTime(2024, 7, 19));
- Attempt to update an order for the AAPL option with a price increment of $0.01, such as 18.12
- Observe the error indicating that the price is not rounded to a valid increment:
18.12000000 not rounded to a valid price increment [0.05]
Please ensure that the Lean Algorithm Framework is updated to handle the Penny Pilot Program pricing increments correctly.
System Information
OS: Windows 10 x64
test: run on x64 CPU
IDE: Visual Studio 2022
Additional Sources
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
- I have provided detailed steps to reproduce the issue
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.