Skip to content
All library documents

Separating Intrinsic and Time Value in QuantLib-Python

Article Quant Q&A · Author: Bernd

Summary

The document asks how to split a European option’s net present value into intrinsic value and time value when pricing with QuantLib-Python’s Black–Scholes example. It explains that intrinsic value can be obtained by applying the option’s payoff function to the current underlying price. The payoff function provides the relevant exercise payoff, while time value is the difference between the option’s price and its intrinsic value.

The answer notes an important interface limitation: the payoff method was available in the C++ library but had not been exposed in Python at the time of the discussion. The example does not provide a working Python workaround or establish the status of later QuantLib versions. The method also concerns intrinsic value at the current underlying level; it does not imply that this amount is the option’s market price or present value.

Key ideas

  • An option’s payoff function can be evaluated at the current underlying price to obtain intrinsic value.
  • Time value can be viewed as the option value minus its intrinsic value.
  • The discussed QuantLib-Python interface did not expose the C++ payoff method at that time.
  • The document does not establish whether later versions changed this interface limitation.

Tags

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


# 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!

## Answer by Luigi Ballabio (score 2, accepted)

https://quant.stackexchange.com/a/39851

The method you're looking for is `option.payoff()`, which returns the payoff P of the option as a function object; the intrinsic value would then be `P(u.value())`.

However, the method is available in C++ but not yet exported to Python. I suggest you open an issue about this at https://github.com/lballabio/QuantLib-SWIG/issues so that the developers can pick it up.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.