I. Basic math.
 II. Pricing and Hedging.
 III. Explicit techniques.
 1 Black-Scholes formula.
 2 Change of variables for Kolmogorov equation.
 3 Mean reverting equation.
 4 Affine SDE.
 A. Ricatti equation.
 B. Evaluation of option price.
 C. Laplace transform.
 D. Example: CDFX model.
 5 Heston equations.
 6 Displaced Heston equations.
 7 Stochastic volatility.
 8 Markovian projection.
 9 Hamilton-Jacobi Equations.
 IV. Data Analysis.
 V. Implementation tools.
 VI. Basic Math II.
 VII. Implementation tools II.
 VIII. Bibliography
 Notation. Index. Contents.

## Affine SDE.

he reference for this section is [Duffie1999] .

We consider -dimensional process given by the equations

 (Affine equation ab)
where the and are column and matrix valued functions of . We aim to calculate the characteristic function Observe that is a -martingale. We look for a representation where are deterministic functions of time, is a column, is a scalar product.

Claim

If the quantity is a martingale then there exists a choice of final conditions for such that

Proof

Note that Hence it suffices to choose to have

We explore conditions for to be a martingale. We want the dt term to be zero under some analytically tractable conditions. Hence, the presence of the term leads to the requirements of affinity:

 (Affinity pq)
with being some deterministic functions of time. The are matrixes. The notation means that we multiply every component of with a matrix: for some matrixes . We require the dt term to vanish and arrive to Here we used the fact that Hence, we require We separate the terms by powers of :

The first equality defines , the second equality is a system of Ricatti equations for . The functions are given.

Summary

Suppose an dimensional process is given by SDE where and are given affine functions of : and are matrix valued deterministic functions of time .

Then the characteristic function

 (Affine characteristic function 1)
of the -valued argument is given by the expression
 (Affine characteristic function 2)
where the -valued function and -valued function are determined by the ODEs
 (Affine alpha component)
 (Affine beta component)
with the boundary conditions
 (Affine boundary conditions)

 A. Ricatti equation.
 B. Evaluation of option price.
 C. Laplace transform.
 D. Example: CDFX model.
 Notation. Index. Contents.