Chapter 20. Portfolio Valuation

Price is what you pay. Value is what you get.

Warren Buffet

By now, the whole approach for building the DX derivatives analytics package—and its associated benefits—should be clear. By strictly relying on Monte Carlo simulation as the only numerical method, the approach accomplishes an almost complete modularization of the analytics package:


The relevant risk-neutral discounting is taken care of by an instance of the dx.constant_short_rate class.

Relevant data

Relevant data, parameters, and other input are stored in (several) instances of the dx.market_environment class.

Simulation objects

Relevant risk factors (underlyings) are modeled as instances of one of three simulation classes:

  • dx.geometric_brownian_motion

  • dx.jump_diffusion

  • dx.square_root_diffusion

Valuation objects

Options and derivatives to be valued are modeled as instances of one of two valuation classes:

  • dx.valuation_mcs_european

  • dx.valuation_mcs_american

One last step is missing: the valuation of possibly complex portfolios of options and derivatives. To this end, the following requirements shall be satisfied:


Every risk factor (underlying) is modeled only once and potentially used by multiple valuation objects.


Correlations between risk factors have to be accounted for.


An option position, for example, consists of a certain number of option contracts.

However, although it is in principle allowed (it ...

Get Python for Finance, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.