I'm not sure if I am missing an import, but I do not see a way to get any of the greeks of an option in pyql
:
from quantlib.instruments.api import AmericanExercise, VanillaOption, Put, Call
from quantlib.instruments.payoffs import PlainVanillaPayoff
from quantlib.pricingengines.api import BaroneAdesiWhaleyApproximationEngine
from quantlib.pricingengines.api import FDAmericanEngine
from quantlib.processes.black_scholes_process import BlackScholesMertonProcess
from quantlib.quotes import SimpleQuote
from quantlib.settings import Settings
from quantlib.time.api import Actual365Fixed, Date, May, Mar, TARGET
from quantlib.termstructures.volatility.equityfx.black_vol_term_structure \
import BlackConstantVol
from quantlib.termstructures.yields.api import FlatForward
option = VanillaOption(payoff, exercise)
How do I get the delta of this option?
It looks like the greeks are only provided in some cases. I am not sure why the built in engines don't just provide the greeks as explained in this video:
https://www.youtube.com/watch?v=MgUlBB59Ll0