I am trying to to use the Swaption Pricer via the Python Eikon Api, and it seems that the functionality does not work if the Swaption is specified as a call option. For a put option I get reasonable results, but for a call option I only get None values. See below example:
This one works:
swapDef = ipa.swap.Definition(start_date='2022-10-26', end_date='2030-10-26',
... template='EUR_AB3E')
... swaptionDef = [(ipa.swaption.Definition(instrument_tag="mySwaption",
... end_date='2022-10-26',
... strike_percent=2.2,
... buy_sell=ipa.enum_types.BuySell.BUY,
... call_put=ipa.enum_types.CallPut.PUT,
... exercise_style=ipa.enum_types.ExerciseStyle.EURO,
... underlying_definition=swapDef),
... ipa.swaption.CalculationParams(valuation_date='2022-06-23'))]
...
... valuationResult = rdp.get_swaption_analytics(
... universe=swaptionDef,
... calculation_params=ipa.swaption.CalculationParams(valuation_date=trade_date),
... fields=['MarketValueInDealCcy'])
valuationResult
MarketValueInDealCcy
0 24137.521123
But with the same input, except using call_put=ipa.enum_types.CallPut.CALL, I'll get None values:
swapDef = ipa.swap.Definition(start_date='2022-10-26', end_date='2030-10-26',
... template='EUR_AB3E')
... swaptionDef = [(ipa.swaption.Definition(instrument_tag="mySwaption",
... end_date='2022-10-24',
... strike_percent=2.2,
... buy_sell=ipa.enum_types.BuySell.BUY,
... call_put=ipa.enum_types.CallPut.CALL,
... exercise_style=ipa.enum_types.ExerciseStyle.EURO,
... underlying_definition=swapDef),
... ipa.swaption.CalculationParams(valuation_date='2022-06-23'))]
...
... valuationResult = rdp.get_swaption_analytics(
... universe=swaptionDef,
... calculation_params=ipa.swaption.CalculationParams(valuation_date=trade_date),
... fields=['MarketValueInDealCcy'])
...
valuationResult
MarketValueInDealCcy
0 None
Could there be a bug in the pricer?