I am trying to write a Python function that performs some calculations using a list of Quantlib options, and I would like to pass only that list without other information. In particular, the strike of each option is embedded there somewhere, but I am finding it hard to extract. Here is a toy example of an instance (extracted from one of Luigi Ballabio's excellent tutorial notebooks):
from QuantLib import *
maturity_date = Date(15, 1, 2016)
spot_price = 127.62
strike_price = 130
volatility = 0.20 # the historical vols for a year
dividend_rate = 0.0163
option_type = Option.Call
risk_free_rate = 0.001
day_count = Actual365Fixed()
calendar = UnitedStates()
calculation_date = Date(8, 5, 2015)
Settings.instance().evaluationDate = calculation_date
payoff = PlainVanillaPayoff(option_type, strike_price)
exercise = EuropeanExercise(maturity_date)
european_option = VanillaOption(payoff, exercise)
Now I would like to use something like european_option.strike
. That doesn't work, of course. Can someone offer a simple solution? (TIA.)