QuantLib-Python: Splitting the NPV of an option into intrinsic & time

I am right now working throught the "cookbook" of Goutham Balaraman & Luigi Ballabio. By the way a very nice introduction into QuantLib-Python and a good starting point :-)

In section four there is the following example that prices a simple option with Black&Scholes:

from QuantLib import *

today = Date(7, March, 2014)
Settings.instance().evaluationDate = today

# The Instrument
option = EuropeanOption( PlainVanillaPayoff(Option.Call, 100.0),
EuropeanExercise(Date(7, June, 2014)))

# The Market
u = SimpleQuote(100.0)      # set todays value of the underlying
r = SimpleQuote(0.01)       # set risk-free rate
sigma = SimpleQuote(0.20)   # set volatility
riskFreeCurve = FlatForward(0, TARGET(), QuoteHandle(r), Actual360())
volatility = BlackConstantVol(0, TARGET(), QuoteHandle(sigma), Actual360())

# The Model
process = BlackScholesProcess( QuoteHandle(u),
YieldTermStructureHandle(riskFreeCurve),
BlackVolTermStructureHandle(volatility))

# The Pricing Engine
engine = AnalyticEuropeanEngine(process)

# The Result
option.setPricingEngine(engine)
print( "NPV: ", option.NPV() )

The code spits out the NPV of the option.

In university I once learned that the value of an option could be split up into an 'intrinsic' and 'time' part. Is it possible to achive this with QouantLib-Python?

NPV_intrinsic = max([ 0 , u.value() - option.getStrike() ])

The above does not work because 'option.getStrike()' doesn't exist :-(

Thank you very much!

• I don't think you need QuantLib to compute the intrinsic value of your option. It's simple to get max(S - K, 0), once you have this the time value is just the price minus the intrinsic value. May 15 '18 at 16:59
• If you insist on using QuantLib for the intrinsic value, you can get it by using a duplicate of the option that you are pricing but with expiry = today. May 15 '18 at 16:59
• You are right. The equation is simple. So I don't need QuntLib to compute it for me. But I need to reextract the strike from the option-object and have no idea how to achive it? May 15 '18 at 18:29
• In other words: what do I have to replace the option.getStrike() in the following command? NPV_intrinsic = max([ 0 , u.value() - option.getStrike() ]) May 15 '18 at 18:30
• Shouldn't it be possible to get the information about the methods of the option object somewhere here: quantlib.org/reference/class_quant_lib_1_1_european_option.html May 15 '18 at 18:34