Python for Finance: Analyze Big Financial Data

(Elle) #1

Part III. Derivatives Analytics Library


This part of the book is concerned with the development of a smaller, but nevertheless still


powerful, real-world application for the pricing of options and derivatives by Monte Carlo


simulation.


[ 60 ]

The goal is to have, in the end, a set of Python classes — a library we call


DX, for Derivatives AnalytiX — that allows us to do the following:


Modeling


To model short rates for discounting purposes; to model European and American


options, including their underlying risk factors, as well as their relevant market


environments; to model even complex portfolios consisting of multiple options with


multiple, possibly correlated, underlying risk factors


Simulation


To simulate risk factors based on geometric Brownian motions and jump diffusions


as well as on square-root diffusions; to simulate a number of such risk factors


simultaneously and consistently, whether they are correlated or not


Valuation


To value, by the risk-neutral valuation approach, European and American options


with arbitrary payoffs; to value portfolios composed of such options in a consistent,


integrated fashion


Risk management


To estimate numerically the most important Greeks — i.e., the Delta and the Vega of


an option/derivative — independently of the underlying risk factor or the exercise


type


Application


To use the library to value and manage a VSTOXX volatility options portfolio in a


market-based manner (i.e., with a calibrated model for the VSTOXX)


The material presented in this part of the book relies on the DX Analytics library, which is


developed and offered by the author and The Python Quants GmbH (in combination with


the Python Quant Platform). The full-fledged version allows, for instance, the modeling,


pricing, and risk management of complex, multi-risk derivatives and trading books


composed thereof.


The part is divided into the following chapters:


Chapter 15 presents the valuation framework in both theoretical and technical form.


Theoretically, the Fundamental Theorem of Asset Pricing and the risk-neutral


valuation approach are central. Technically, the chapter presents Python classes for


risk-neutral discounting and for market environments.


Chapter 16 is concerned with the simulation of risk factors based on geometric


Brownian motions, jump diffusions, and square-root diffusion processes; a generic


class and three specialized classes are discussed.

Free download pdf