Numerical Methods in Finance. Part A.
(2010-2011)
Paul Clifford, Sebastian Van Strien and Oleg Zaboronski
October 6, 2010
Contents
0 Preface iv
0.1 Aims, objectives, and organisation of the course. . . . . . . . . iv
1 Linear models: growth and distribution 2
1.1 Matrix computations in Matlab . . . . . . . . . . . . . . . . . 2
1.2 Non-negative matrices: modeling growth . . . . . . . . . . . . 6
1.2.1 Models with an age profile . . . . . . . . . . . . . . . . 6
1.2.2 The asymptotic behaviour depends on age-structure. . 8
1.3 Markov Models . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.1 Mood fluctuations of a Markovian market . . . . . . . 12
1.3.2 Another Markov model: a random walk on a graph . . 15
1.3.3 Matlab Project for week 2. . . . . . . . . . . . . . . . . 17
2 Linear models: stability and redundancy 18
2.1 SVD or Principal Components . . . . . . . . . . . . . . . . . . 18
2.1.1 Stability of eigenvalues . . . . . . . . . . . . . . . . . . 18
2.1.2 Singular value decomposition. . . . . . . . . . . . . . . 20
2.1.3 Application of the singular value decomposition to solv-
ing linear equations . . . . . . . . . . . . . . . . . . . . 23
2.1.4 Least square methods . . . . . . . . . . . . . . . . . . . 26
2.1.5 Further applications of SVD: Principle Component Anal-
ysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.1.6 Pairs trade by exploiting correlations in the stock market. 27
2.2 MATLAB exercises for Week 3. . . . . . . . . . . . . . . . . . 29
2.2.1 Lesley Matrices . . . . . . . . . . . . . . . . . . . . . . 29
2.2.2 Markov matrices . . . . . . . . . . . . . . . . . . . . . 30
2.2.3 Solving equations . . . . . . . . . . . . . . . . . . . . . 31
2.3 Ill-conditioned systems: general theory. . . . . . . . . . . . . . 31
2.4 Numerical computations with matrices . . . . . . . . . . . . . 34
2.5 Matlab exercises for week 4 (Linear Algebra) . . . . . . . . . . 39
2.5.1 Ill posed systems . . . . . . . . . . . . . . . . . . . . . 39
2.5.2 MATLAB capabilities investigation: sparse matrices . . 40
2.5.3 Solving Ax = b by iteration . . . . . . . . . . . . . . . 40
3 Gambling, random walks and the CLT 42
3.1 Random variables and laws of large numbers . . . . . . . . . . 42
3.1.1 Useful probabilistic tools. . . . . . . . . . . . . . . . . 43
3.1.2 Weak law of large numbers. . . . . . . . . . . . . . . . 44
3.1.3 Strong law of large numbers. . . . . . . . . . . . . . . . 44
3.2 Central Limit Theorem . . . . . . . . . . . . . . . . . . . . . . 46
3.3 The simplest applications of CLT and the law of large numbers. 49
3.3.1 Monte Carlo Methods for integration . . . . . . . . . . 49
3.3.2 MATLAB exercises for Week 5. . . . . . . . . . . . . . 51
3.3.3 Analysing the value of the game. . . . . . . . . . . . . 51
3.3.4 Portfolio optimization via diversification. . . . . . . . . 54
3.4 Risk estimation and the theory of large deviations. . . . . . . 60
3.4.1 Week 6 MATLAB exercises. . . . . . . . . . . . . . . . 63
3.4.2 An example of numerical investigation of CLT and the
law of large numbers for independent Bernoulli trials. . 63
3.5 The law of large numbers for Markov chains . . . . . . . . . . 67
3.5.1 The Markov model for crude oil data. . . . . . . . . . . 68
3.6 FTSE 100: clustering, long range correlations, GARCH. . . . . 70
3.6.1 Checking the algebraic tails conjecture numerically. . . 77
3.6.2 MATLAB exercises for week 7. . . . . . . . . . . . . . 79
3.7 The Gambler’s Ruin Problem . . . . . . . . . . . . . . . . . . 81
3.7.1 Nidhi’s game. . . . . . . . . . . . . . . . . . . . . . . . 88
3.8 Cox-Ross-Rubinstein model and Black-Scholes pricing formula
for European options. . . . . . . . . . . . . . . . . . . . . . . . 89
3.8.1 The model. . . . . . . . . . . . . . . . . . . . . . . . . 89
3.8.2 Solving the discrete BS equation using binomial trees. . 93
3.8.3 The continuous limit of CRR model. . . . . . . . . . . 94
3.8.4 Matlab Exercises for Weeks 8, 9. . . . . . . . . . . . . 100
4 Numerical schemes for solving Differential and Stochastic
Differential Equations 101
4.1 Systems of ODE’s. . . . . . . . . . . . . . . . . . . . . . . . . 101
4.1.1 Existence and Uniqueness. . . . . . . . . . . . . . . . . 101
4.1.2 Autonomous linear ODE’s . . . . . . . . . . . . . . . . 103
4.1.3 Examples of non-linear differential equations . . . . . . 107
4.1.4 Numerical methods for systems of ODE’s. . . . . . . . 114
4.2 Stochastic Differential Equations . . . . . . . . . . . . . . . . 125
4.2.1 Black-Scholes SDE and Ito’s lemma. . . . . . . . . . . 125
4.2.2 The derivation of Black-Scholes pricing formula as an
exercise in Ito calculus. . . . . . . . . . . . . . . . . . . 128
4.2.3 Numerical schemes for solving SDE’s . . . . . . . . . . 129
4.2.4 Numerical example: the effect of stochastic volatility. . 133
4.2.5 Some popular models of stochastic volatility . . . . . . 137
附件列表