QuantConnect / QuantConnect/Lean

Penny Pilot Program for Options Pricing

Open
#8,191 1 comment 1 reaction 1 assignee View on GitHub

@jhonabreul is already working on this.

Since Jul 23, 2024.

bug depth feature
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
  1. Identify Eligible Securities: Update the symbol and market data handling to identify securities included in the Penny Pilot Program.
  2. 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.
  3. Validation Updates: Ensure the order validation process supports the new price increment rules for eligible options.
  4. 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
  1. Create a new algorithm in the Lean.
  2. 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));
  1. Attempt to update an order for the AAPL option with a price increment of $0.01, such as 18.12
  2. 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 master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.