Content of present website is being moved to www.lukoe.com/finance . Registration of www.opentradingsystem.com will be discontinued on 2020-08-14.
 I. Basic math.
 II. Pricing and Hedging.
 III. Explicit techniques.
 IV. Data Analysis.
 V. Implementation tools.
 VI. Basic Math II.
 VII. Implementation tools II.
 VIII. Bibliography

## Notes on Quantitative Analysis in Finance. ny business of trading in securities needs two capabilities:

1. To identify trading opportunities.

2. To execute such trades before competitors would.

This website contains presentation of several technologies with two matching consequences:

1. Mesh-based pricing and optimization over underlying models of high dimensionality becomes possible.

2. There is no visible limit for speed of calculation.

Presentation starts from basic concepts and continues without omissions to practical recipes and C++/Cuda/Python/Mathematica code.

P.S. If some of the math does not display correctly then hit the "Refresh" button.

I would be remiss if I did not mention that these alluring dark arts do not bring happiness but rather exact a terrible price. Thee who masters these arts gets thy wish: fat savings account in exchange for best years of life, no memories of anything worthwhile, and a hangover from endless grind. Thus, without further ado, I proceed with the presentation.

 A. Notation.
 I. Basic math.
 1 Conditional probability.
 A. Definition of conditional probability.
 B. A bomb on a plane.
 C. Dealing a pair in the "hold' em" poker.
 D. Monty-Hall problem.
 E. Two headed coin drawn from a bin of fair coins.
 F. Randomly unfair coin.
 G. Recursive Bayesian calculation.
 H. Birthday problem.
 I. Backward induction.
 J. Conditional expectation. Filtration. Flow of information. Stopping time.
 2 Normal distribution.
 A. Definition of normal variable.
 B. Linear transformation of random variables.
 C. Multivariate normal distribution. Choleski decomposition.
 D. Calculus of normal variables.
 E. Central limit theorem (CLT).
 3 Brownian motion.
 A. Definition of standard Brownian motion.
 B. Brownian motion passing through gates.
 C. Reflection principle.
 D. Brownian motion hitting a barrier.
 4 Poisson process.
 A. Definition of Poisson process.
 B. Distribution of Poisson process.
 C. Poisson stopping time.
 D. Arrival of k-th Poisson jump. Gamma distribution.
 E. Cox process.
 5 Ito integral.
 6 Ito calculus.
 A. Example: exponential of stochastic process.
 B. Example: integral of t_dW.
 C. Example: integral of W_dW.
 D. Example: integral of W_dt.
 7 Change of measure.
 A. Definition of change of measure.
 B. Most common application of change of measure.
 C. Transformation of SDE under change of measure.
 8 Girsanov's theorem.
 A. Change of measure-based verification of Girsanov's theorem statement.
 B. Direct proof of Girsanov's theorem.
 9 Forward Kolmogorov's equation.
 10 Backward Kolmogorov's equation.
 A. Multidimensional backward Kolmogorov's equation.
 B. Representation of solution for elliptic PDE using stochastic process.
 11 Optimal control, Bellman equation, Dynamic programming.
 A. Deterministic optimal control problem.
 B. Stochastic optimal control problem.
 C. Optimal stopping time problem. Free boundary problem.
 II. Pricing and Hedging.
 1 Basics of derivative pricing I.
 A. Single step binary tree argument. Risk neutral probability. Delta hedging.
 B. Why Ito process?
 C. Existence of risk neutral measure via Girsanov's theorem.
 D. Self-financing strategy.
 E. Existence of risk neutral measure via backward Kolmogorov's equation. Delta hedging.
 a. An economy with one risky asset.
 b. An economy with two risky assets.
 F. Optimal utility function based interpretation of delta hedging.
 2 Change of numeraire.
 A. Definition of change of numeraire.
 B. Useful calculation.
 C. Transformation of SDE based on change of measure results.
 D. Transformation of SDE in two asset situation.
 E. Transformation of SDE based on term matching.
 F. Invariant representation for drift modification.
 G. Transformation of SDE based on delta hedging.
 H. Example. Change of numeraire in Black-Scholes economy.
 I. Other ways to look at change of numeraire.
 3 Basics of derivative pricing II.
 A. Option pricing formula for an economy with stochastic riskless rate.
 B. T-forward measure.
 C. HJM.
 4 Market model.
 A. Forward LIBOR.
 B. LIBOR market model.
 C. Swap rate.
 D. Swap measure.
 5 Currency Exchange.
 A. Change of numeraire in currency markets.
 B. Invariant form of SDE transformation formula.
 C. Delta hedging in currency markets.
 D. Example: forward contract to purchase foreign stock for domestic currency.
 E. Example: forward currency exchange contract.
 F. Example: quanto forward contract.
 G. Example: quanto caplet.
 H. Example: quanto fixed-for-floating swap.
 6 Credit risk.
 A. Delta hedging in situation of predictable jump I.
 B. Delta hedging in situation of predictable jump II.
 C. Backward Kolmogorov's equation for jump diffusion.
 D. Risk neutral valuation in predictable jump size situation.
 E. Examples of credit derivative pricing.
 a. Credit Default Swap.
 b. At-the-money CDS coupon.
 c. Option on CDS.
 d. Basket Credit derivative.
 F. Credit correlation.
 a. Generic Copula.
 b. Gaussian copula.
 c. Example: two dimensional Gaussian copula.
 d. Simplistic Gaussian copula.
 G. Valuation of CDO tranches.
 a. Definitions of CDO contract.
 b. Present values of CDO tranches.
 c. Distribution of defaulted notional of CDO tranches.
 7 Incomplete markets.
 A. Single time period discrete price incomplete market.
 a. Existence of pricing vector.
 b. Uniqueness of pricing vector.
 c. Bid and ask.
 B. Coherent measure.
 C. Incomplete market with multiple participants.
 D. Example: uncertain local volatility.
 III. Explicit techniques.
 1 Black-Scholes formula.
 A. No drift calculation.
 B. Calculation with drift.
 2 Change of variables for Kolmogorov equation.
 A. One dimensional Black equation.
 B. Two dimensional Black 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.
 A. Affine equation approach to integration of Heston equations.
 B. PDE approach to integration of Heston equations.
 6 Displaced Heston equations.
 A. Analytical tractability of displaced Heston equations.
 B. Displaced Heston equations with term structure.
 a. Parameter averaging.
 b. Parameter averaging applied to displaced diffusion.
 7 Stochastic volatility.
 A. Recovering implied distribution.
 B. Local volatility.
 C. Gyongy's lemma.
 a. Multidimensional Gyongy's lemma.
 D. Static hedging of European claim.
 a. Example: European put-call parity.
 b. Example: Log contract.
 E. Variance swap pricing.
 a. Variance swap pricing for drifting price process.
 b. Volatility smile formula for fair variance.
 8 Markovian projection.
 A. Markovian projection on displaced diffusion.
 a. Example of Markovian projection of a separable process on a displaced diffusion.
 B. Markovian projection on Heston model.
 9 Hamilton-Jacobi Equations.
 A. Characteristics.
 B. Hamilton equations.
 C. Lagrangian.
 D. Connection between Hamiltonian and Lagrangian.
 E. Lagrangian for heat equation.
 IV. Data Analysis.
 1 Time Series.
 A. Time series forecasting.
 B. Updating a linear forecast.
 C. Kalman filter I.
 a. Kalman filter computation at t=1.
 b. Kalman filter computation for general t.
 c. Calibration of parameters with Kalman filter.
 D. Kalman filter II.
 a. General Kalman filter problem.
 b. General Kalman filter solution.
 c. Convolution of normal distributions.
 d. Kalman filter calculation for linear model.
 e. Kalman filter in non-linear situation.
 f. Unscented transformation.
 i. Unscented approximation of the mean.
 ii. Unscented approximation of covariance matrix.
 E. Simultaneous equations.
 a. Simple linear reduction.
 b. Simultaneous equations bias.
 c. Two stage least squares procedure for simultaneous equations.
 d. General note of applicability.
 2 Classical statistics.
 A. Basic concepts and common notation of classical statistics.
 B. Chi squared distribution.
 C. Student's t-distribution.
 D. Classical estimation theory.
 a. Sufficient statistics.
 b. Sufficient statistic for normal sample.
 c. Maximal likelihood estimation (MLE).
 d. Asymptotic consistency of MLE. Fisher's information number.
 e. Asymptotic efficiency of the MLE. Cramer-Rao low bound.
 E. Pattern recognition.
 a. Decision rule based on loss function.
 b. Hypothesis testing problem.
 c. Neyman-Pearson Lemma.
 3 Bayesian statistics.
 A. Basic idea of Bayesian analysis.
 B. Estimating the mean of normal distribution with known variance.
 C. Estimating unknown parameters of normal distribution.
 a. Structure of the model with unknown parameters.
 b. Recursive formula for posterior joint distribution.
 c. Marginal distribution of mean.
 d. Marginal distribution of precision.
 D. Hierarchical analysis of normal model with known variance.
 a. Joint posterior distribution of mean and hyperparameters.
 b. Posterior distribution of mean conditionally on hyperparameters.
 c. Marginal posterior distribution of hyperparameters.
 i. Distribution of mu conditionally on gamma.
 ii. Posterior distribution of gamma.
 iii. Prior distribution for gamma.
 V. Implementation tools.
 1 Finite differences.
 A. Finite difference basics.
 a. Definitions and main convergence theorem.
 b. Approximations of basic operators.
 c. Stability of general evolution equation.
 d. Spectral analysis of finite difference Laplacian.
 B. One dimensional heat equation.
 a. Finite difference schemes for heat equation.
 b. Stability of one-dim heat equation schemes.
 c. Remark on stability of financial problems.
 d. Lagrangian coordinate technique.
 e. Factorization procedure for heat equation.
 C. Two dimensional heat equation.
 a. Peaceman-Rachford (alternating directions) scheme.
 b. Stability of Peaceman-Rachford.
 D. General techniques for reduction of dimensionality.
 a. Stabilization.
 b. Predictor-corrector.
 c. Separation of variables for Crank-Nicolson scheme.
 E. Time dependent case.
 2 Gauss-Hermite Integration.
 A. Gram-Schmidt orthogonalization.
 B. Definition and existence of orthogonal polynomials.
 C. Three-term recurrence relation for orthogonal polynomials.
 D. Orthogonal polynomials and quadrature rules.
 E. Extremal properties of orthogonal polynomials.
 F. Chebyshev polynomials.
 3 Asymptotic expansions.
 A. Asymptotic expansion of Laplace integral.
 B. Asymptotic expansion of integral with Gaussian kernel.
 C. Asymptotic expansion of generic Laplace integral. Laplace change of variables.
 D. Asymptotic expansion for Black equation.
 4 Monte-Carlo.
 A. Generation of random samples.
 a. Uniform [0,1] random variable.
 b. Inverting cumulative distribution.
 c. Accept/reject procedure.
 d. Normal distribution. Box-Muller procedure.
 e. Gibbs sampler.
 B. Acceleration of convergence.
 a. Antithetic variables.
 b. Control variate.
 c. Importance sampling.
 d. Stratified sampling.
 C. Longstaff-Schwartz technique.
 a. Normal Equations technique.
 D. Calculation of sensitivities.
 a. Pathwise differentiation.
 b. Calculation of sensitivities for Monte-Carlo with optimal control.
 5 Convex Analysis.
 A. Basic concepts of convex analysis.
 a. Affine sets and hyperplanes.
 b. Convex sets and cones.
 c. Convex functions and epigraphs.
 B. Caratheodory's theorem.
 C. Relative interior.
 D. Recession cone.
 E. Intersection of nested convex sets.
 F. Preservation of closeness under linear transformation.
 G. Weierstrass Theorem.
 H. Local minima of convex function.
 I. Projection on convex set.
 J. Existence of solution of convex optimization problem.
 K. Partial minimization of convex functions.
 L. Hyperplanes and separation.
 M. Nonvertical separation.
 N. Minimal common and maximal crossing points.
 O. Minimax theory.
 P. Saddle point theory.
 Q. Polar cones.
 R. Polyhedral cones.
 S. Extreme points.
 T. Directional derivative and subdifferential.
 U. Feasible direction cone, tangent cone and normal cone.
 V. Optimality conditions.
 W. Lagrange multipliers for equality constraints.
 X. Fritz John optimality conditions.
 Y. Pseudonormality.
 Z. Lagrangian duality.
 a. Geometric multipliers.
 b. Dual problem.
 c. Connection of dual problem with minimax theory.
 [. Conjugate duality.
 a. Support function.
 b. Infimal convolution.
 VI. Basic Math II.
 1 Real Variable.
 A. Operations on sets and logical statements.
 B. Fundamental inequalities.
 a. Cauchy and Young inequalities.
 b. Cauchy inequality for scalar product.
 c. Holder inequality.
 d. Lp interpolation.
 e. Chebyshev inequality.
 f. Lyapunov inequality.
 g. Jensen inequality.
 h. Estimate of mean by probability series.
 i. Gronwall inequality.
 C. Function spaces.
 D. Measure theory.
 a. Complete measure space.
 b. Outer measure.
 c. Extension of measure from algebra to sigma-algebra.
 d. Lebesgue measure.
 E. Various types of convergence.
 a. Uniform convergence and convergence almost surely. Egorov's theorem.
 b. Convergence in probability.
 c. Infinitely often events. Borel-Cantelli lemma.
 d. Integration and convergence.
 e. Convergence in Lp.
 f. Vague convergence. Convergence in distribution.
 F. Signed measures. Absolutely continuous and singular measures. Radon-Nikodym theorem.
 G. Lebesgue differentiation theorem.
 H. Fubini theorem.
 I. Arzela-Ascoli compactness theorem.
 J. Partial ordering and maximal principle.
 K. Taylor decomposition.
 2 Laws of large numbers.
 A. Weak law of large numbers.
 B. Convergence of series of random variables.
 C. Strong law of large numbers.
 3 Characteristic function.
 A. Basic properties of characteristic function.
 B. Convergence theorems for characteristic function.
 4 Central limit theorem (CLT) II.
 A. Lyapunov central limit theorem.
 B. Lindeberg-Feller central limit theorem.
 5 Random walk.
 A. Zero-or-one laws.
 B. Optional random variable. Stopping time.
 C. Recurrence of random walk.
 D. Fine structure of stopping time.
 E. Maximal value of random walk.
 6 Conditional probability II.
 7 Martingales and stopping times.
 8 Markov process.
 A. Forward and backward propagators.
 B. Feller process and semi-group resolvent.
 C. Forward and backward generators.
 a. Example: backward Kolmogorov generator for diffusion.
 b. Example: backward Kolmogorov generator for Ito process with jump.
 D. Forward and backward generators for Feller process.
 9 Levy process.
 A. Infinitely divisible distributions and Levy-Khintchine formula.
 B. Generator of Levy process.
 C. Poisson point process.
 D. Construction of generic Levy process.
 E. Subordinators.
 10 Weak derivative. Fundamental solution. Calculus of distributions.
 A. Space of distributions. Weak derivative.
 B. Fundamental solution.
 C. Fundamental solution for the heat equation.
 11 Functional Analysis.
 A. Weak convergence in Banach space.
 B. Representation theorems in Hilbert space.
 C. Fredholm alternative.
 D. Spectrum of compact and symmetric operator.
 E. Fixed point theorem.
 F. Interpolation of Hilbert spaces.
 G. Tensor product of Hilbert spaces.
 12 Fourier analysis.
 A. Fourier series in L2.
 B. Fourier transform.
 C. Fourier transform of delta function.
 D. Poisson formula for delta function and Whittaker sampling theorem.
 13 Sobolev spaces.
 A. Convolution and smoothing.
 B. Approximation by smooth functions.
 C. Extensions of Sobolev spaces.
 D. Traces of Sobolev spaces.
 E. Sobolev inequalities.
 F. Compact embedding of Sobolev spaces.
 G. Dual Sobolev spaces.
 H. Sobolev spaces involving time.
 I. Poincare inequality and Friedrich lemma.
 14 Elliptic PDE.
 A. Energy estimates for bilinear form B.
 B. Existence of weak solutions for elliptic Dirichlet problem.
 C. Elliptic regularity.
 a. Finite differences in Sobolev spaces.
 b. Internal elliptic regularity.
 c. Boundary elliptic regularity.
 D. Maximum principles.
 E. Eigenfunctions of symmetric elliptic operator.
 F. Green formulas.
 15 Parabolic PDE.
 A. Galerkin approximation for parabolic Dirichlet problem.
 B. Energy estimates for Galerkin approximate solution.
 C. Existence of weak solution for parabolic Dirichlet problem.
 D. Parabolic regularity.
 VII. Implementation tools II.
 1 Calculational Linear Algebra.
 A. Quadratic form minimum.
 B. Method of steepest descent.
 C. Method of conjugate directions.
 D. Method of conjugate gradients.
 E. Convergence analysis of conjugate gradient method.
 F. Preconditioning.
 G. Recursive calculation.
 H. Parallel subspace preconditioner.
 2 Wavelet Analysis.
 A. Elementary definitions of wavelet analysis.
 B. Haar functions.
 C. Multiresolution analysis.
 a. Scaling equation.
 b. Support of scaling function.
 c. Piecewise linear MRA, part 1.
 d. Orthonormal system of translates.
 e. Approximation by system of translates.
 f. Orthogonalization of system of translates.
 g. Piecewise linear MRA, part 2.
 h. Construction of MRA summary.
 D. Orthonormal wavelet bases.
 a. Auxiliary function of OST.
 b. Scaling equation for wavelet.
 c. Existence of orthonormal wavelet bases.
 E. Discrete wavelet transform.
 a. Recursive relationships for wavelet transform.
 b. Properties of sequences h and g.
 c. Approximation and detail operators.
 F. Construction of MRA from scaling filter or auxiliary function.
 a. Quadrature mirror filter (QMF) conditions.
 b. Recovering scaling function from auxiliary function. Cascade algorithm.
 c. Recovering MRA from auxiliary function.
 G. Consequences and conditions for vanishing moments of wavelets.
 a. Vanishing moments vs decay at infinity.
 b. Vanishing moments vs approximation.
 c. Sufficient conditions for vanishing moments.
 d. Reproduction of polynomials.
 e. Smoothness of compactly supported wavelets with vanishing moments.
 H. Existence of smooth compactly supported wavelets. Daubechies polynomials.
 I. Semi-orthogonal wavelet bases.
 a. Biorthogonal bases.
 b. Riesz bases.
 c. Generalized multiresolution analysis.
 d. Dual generalized multiresolution analysis.
 e. Dual wavelets.
 f. Orthogonality across scales.
 g. Biorthogonal QMF conditions.
 h. Vanishing moments for biorthogonal wavelets.
 i. Compactly supported smooth biorthogonal wavelets.
 j. Spline functions.
 k. Calculation of spline biorthogonal wavelets.
 l. Symmetric biorthogonal wavelets.
 J. Construction of (G)MRA and wavelets on an interval.
 a. Adapting MRA to the interval [0,1].
 b. Adapting wavelets to interval [0,1].
 c. Adapting GMRA to interval [0,1].
 d. Adapting dual wavelets to interval [0,1].
 e. Constructing dual GMRA on [0,1] with boundary conditions.
 3 Finite element method.
 A. Tutorial introduction into finite element method.
 a. Variational formulation, essential and natural boundary conditions.
 b. Ritz-Galerkin approximation.
 c. Convergence of approximate solution. Energy norm argument.
 d. Approximation in L2 norm. Duality argument.
 e. Example of finite dimensional subspace construction.
 B. Finite elements for Poisson equation with Dirichlet boundary conditions.
 C. Finite elements for Heat equation with Dirichlet boundary conditions.
 a. Weak formulation for Heat equation with Dirichlet boundary conditions.
 b. Spacial discretization for Heat equation with Dirichlet boundary conditions.
 c. Backward Euler time discretization for Heat equation with Dirichlet boundary conditions.
 d. Crank-Nicolson time discretization for the Heat equation with Dirichlet boundary conditions.
 D. Finite elements for Heat equation with Neumann boundary conditions.
 a. Weak formulation for Neumann boundary conditions. Natural and essential boundary conditions.
 E. Relaxed boundary conditions for approximation spaces.
 a. Elliptic problem with relaxed boundary approximation.
 b. Parabolic problem with relaxed boundary approximation.
 F. Convergence of finite elements applied to nonsmooth data.
 a. H-tilde spaces.
 b. Convergence of finite elements with nonsmooth initial condition.
 G. Convergence of finite elements for generic parabolic operator.
 4 Construction of approximation spaces.
 A. Finite element.
 B. Averaged Taylor polynomial.
 a. Properties of averaged Taylor polynomial.
 b. Remainder of averaged Taylor decomposition.
 c. Estimates for remainder of averaged Taylor polynomial. Bramble-Hilbert lemma.
 d. Bounds for interpolation error. Homogeneity argument.
 C. Stable space splittings.
 D. Frames.
 E. Tensor product splitting.
 F. Sparse tensor product. Cure for curse of dimensionality.
 a. Definition of sparse tensor product.
 b. Wavelet estimates in Sobolev spaces.
 c. Stability of wavelet splitting.
 d. Stable splitting for tensor product of Sobolev spaces.
 e. Approximation by sparse tensor product.
 5 Time discretization.
 A. Change of variables for parabolic equation.
 a. Change of spacial variable for evolution equation.
 b. Multiplicative change of unknown function for evolution equation.
 c. Orthogonal transformation for evolution equation.
 B. Discontinuous Galerkin technique.
 a. Weak formulation with respect to time parameter.
 b. Discretization with respect to time parameter.
 c. Discretization for backward Kolmogorov equation.
 d. Existence and uniqueness for time-discretized problem.
 e. Convergence of discontinuous Galerkin technique. Adaptive time stepping.
 6 Variational inequalities.
 A. Stationary variational inequalities.
 a. Weak and strong formulations for stationary variational inequality problem.
 b. Existence and uniqueness for coercive stationary problem.
 c. Penalized stationary problem.
 d. Proof of existence for stationary problem.
 e. Estimate of penalization error for stationary problem.
 f. Monotonicity of solution of stationary problem.
 g. Existence and uniqueness for non-coercive stationary problem.
 B. Evolutionary variational inequalities.
 a. Strong and variational formulations for evolutionary problem.
 b. Existence and uniqueness for evolutionary problem.
 c. Penalized evolutionary problem.
 d. Proof of existence for evolutionary problem.
 VIII. Bibliography