mafipy.function.payoff_butterfly_spread

mafipy.function.payoff_butterfly_spread(underlying, spot_price, spread, gearing=1.0)[source]

Butterfly option consists of following options:

  • Buy 1 call with a (spot_price - spread)
  • Sell 2 calls with a spread
  • Buy 1 call with (spot_price + spread)
Parameters:
  • underlying (float) –
  • spot_price (float) – spot price of underlying.
  • spread (float) – non-negative value is required. If value is 0, this is same as straddle.
  • gearing (float) – coefficient of this option. Default value is 1.
Returns:

payoff of butterfly spread option. If spot_price is negative, return 0.

Return type:

float