Calculate Option Pricing¶
Build option spread pricing details
-
analysis_engine.build_option_spread_details.
build_option_spread_details
(trade_type, spread_type, option_type, close, num_contracts, low_strike, low_ask, low_bid, high_strike, high_ask, high_bid)[source]¶ Calculate pricing information for supported spreads including
max loss
,max profit
, andmid price
(break even coming soon)Parameters: - trade_type – entry (
TRADE_ENTRY
) or exit (TRADE_EXIT
) of a spread position - spread_type – vertical bull (
SPREAD_VERTICAL_BULL
) and vertical bear (SPREAD_VERTICAL_BEAR
) are the only supported calculations for now - option_type – call (
OPTION_CALL
) or put (OPTION_PUT
) - close – closing price of the underlying asset
- num_contracts – integer number of contracts
- low_strike – float - strike for the low leg of the spread
- low_ask – float - ask price for the low leg of the spread
- low_bid – float - bid price for the low leg of the spread
- high_strike – float - strike for the high leg of the spread
- high_ask – float - ask price for the high leg of the spread
- high_bid – float - bid price for the high leg of the spread
- trade_type – entry (