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.
 a. Definition of CDFX model.
 b. The martingale normalization (CDFX).
 c. Fourier transform (CDFX).
 d. Calculation of Fourier transform (CDFX).
 e. Calculation of Premium Leg of CDS.
 f. Calculation of the protection leg of the CDS.
 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.

## Calculation of Premium Leg of CDS.

e would like to calculate the expression Observe that is not a martingale. Indeed, Hence, We conclude that Therefore, for some martingale . We want to replicate the with some function of state variables . If successful, such function should satisfy for some martingale . If both martingales also coincide at final time then we will have the equality:

We will seek for in the form where the and are some deterministic functions. Hence, We introduce notation with

then hence we calculate the drift part as We want the above expression to be Hence, it suffices to have where Consequently, We separate the coordinates We substitute the expressions for the . The equations resolve to These coincide with the equations (17) in the article because (in article [CarrWu2006a] 's notation)

 Notation. Index. Contents.