netOpenQuantity

In by OptionStack

The netOpenQuantity method is used to determine the net open quantities of a position. The default behavior is that each position will have its own quantities tracked independently of another position, even when one position offsets / closes the legs of another position.

But if the consideredPositionsClosedIfOffsetByIndependentPositions setting is used, the netOpenQuantity method will include offsetting positions from other trades.

Time 1: OrderID=”BuyCallVertical1″

  • Buy 10x Call, Strike = 100
  • Sell 10x Call, Strike = 110

Time 2: OrderID = “SellCallVertical1”

  • Sell 10x Call, Strike = 100
  • Buy 10x Call, Strike = 110

By default, the netOpenQuantity will be 10 for both orders, as each position will be tracked independently of another.

If the consideredPositionsClosedIfOffsetByIndependentPositions is used, the netOpenQuantity will be zero for both orders, as the SellVertical1 order offsets / closes the BuyCallVertical1 order.

The netOpenQuantity will be the number of open contracts in the lowest ratio leg of a position.

  • 10 x (Call Vertical) = 10
  • 10 x (standard butterfly) = 10
  • 10 x (2 x 3 put ratio) = 20
  • 10 x (3 x 4 call ratio) = 30
  • 10 x (2x5x3 unbalanced butterfly) = 20

 

« Back to Glossary Index