Lean icon indicating copy to clipboard operation
Lean copied to clipboard

Support Short Straddle and Strangle Options Buying Power

Open AlexCatarino opened this issue 3 years ago • 0 comments

Expected Behavior

Supports Short Straddle and Strangle options buying power.

The margin requirements for a short straddle/strangle is the greater of the two sides' short uncovered margin requirement plus the premium of the other leg. *The premium received from the sale of the strangle may be applied to the initial margin requirement.

Source: https://support.tastyworks.com/support/solutions/articles/43000435282-short-straddle-strangle

Actual Behavior

Not supported.

Potential Solution

Add ShortStraddle and ShortStrangle to OptionDefinitions, and implement their case in OptionStrategyPositionGroupBuyingPowerModel

Reproducing the Problem

Run OptionEquityStraddleRegressionAlgorithm with short positions:

MarketOrder(call.Symbol, -10);
MarketOrder(put.Symbol, -10);

Observe that the Portfolio.TotalMarginUsed is nearly the sum of initial margin of each leg (~335k) where it should the sum of margin of the Put (~165k) and the premium of the Call (11.7k): ~176.7k.

Checklist

  • [x] I have completely filled out this template
  • [x] I have confirmed that this issue exists on the current master branch
  • [x] I have confirmed that this is not a duplicate issue by searching issues
  • [x] I have provided detailed steps to reproduce the issue

AlexCatarino avatar Sep 08 '22 23:09 AlexCatarino