Download presentation
Presentation is loading. Please wait.
1
CF-3 Bank Hapoalim Jun-2001 Zvi Wiener 02-588-3049 http://pluto.mscc.huji.ac.il/~mswiener/zvi.html Computational Finance
2
Zvi WienerCF3 slide 2 Plan 1. Hypothesis test 2. Maximal Likelihood estimate 3. Multidimensional VaR, contour plots 4. Monte Carlo type methods
3
Zvi WienerCF3 slide 3 Hypothesis tests Given a population, we would like to perform a test in order to accept or reject the claim that it is distributed according to some rule (for example normal or normal with some mean and standard deviation).
4
Zvi WienerCF3 slide 4 Pearson goodness of fit test Is based on calculating the sample moments and then comparing the number of observations in more or less equally full bins. The comparison of actual number of points versus the expected frequency allows to estimate the likelihood of the distribution to belong to the suspected class.
5
Zvi WienerCF3 slide 5 Pearson goodness of fit test For large samples the following Q statistics follows a Chi Square distribution with m-1 degrees of freedom. Here m – the number of bins. f k – is the actual number of points in bin k, e k is the expected number of points.
6
Zvi WienerCF3 slide 6 The Kolmogorov-Smirnov test Here we compare the maximal distance between actual and proposed cumulative distribution. 1. Numerical Recepies in C, second edition, p. 623-625. 2. Mathematica in Education and Research Journal, vol. 5:2, 1996, p. 23-30 by David K. Neal.
7
Zvi WienerCF3 slide 7 The Kolmogorov-Smirnov test Define test statistics by Here n is the number of sample points, F(x) the sample and G(x) the expected cumulative distribution. For large n distribution of D converges to a distribution Y ( see Degroot 1986 ).
8
Zvi WienerCF3 slide 8 The Kolmogorov-Smirnov test data hypothesis difference
9
Zvi WienerCF3 slide 9 Maximal Likelihood
10
Zvi WienerCF3 slide 10 Example Your portfolio is exposed to two independent (correlation =0) risk factors. Each one is uniformly distributed between –1 and 1 for a given time horizon. What is your VaR 95% for the same horizon?
11
Zvi WienerCF3 slide 11 Example A B Probability density
12
Zvi WienerCF3 slide 12 2 dimensional risk -11A B 1 Probability of 5%
13
Zvi WienerCF3 slide 13 Example The total probability is 1, the area of the rectangle is 4, so the height is 0.25. We are looking for x, such that x=0.6325, and VaR 95% =2-x=1.3675
14
Zvi WienerCF3 slide 14 Ovals Consider a portfolio managed versus benchmark. The benchmark has duration T and includes only government bonds (no credit risk). A manager has two degrees of freedom. He can choose non-government bonds and have a duration mismatch. Denote the actual duration by T+q and by a – % of the assets invested in non-government bonds.
15
Zvi WienerCF3 slide 15 Ovals Denote by r – the current yield on treasuries Denote by L – LIBOR (for simplicity we assume a flat term structure). Denote by dr and dL the possible change in each risk factor during a short period of time.
16
Zvi WienerCF3 slide 16 Ovals The value of the benchmark today is 1. quantity discount factor The value of the benchmark tomorrow will be For short time intervals we ignore dT.
17
Zvi WienerCF3 slide 17 Ovals Similarly the dollar P&L of the portfolio will be We ignore convexity and carry effects. To measure relative performance we use
18
Zvi WienerCF3 slide 18 Assume that dr and dL are jointly normal and use delta approach. Then the gradient vector is One should also check the impact of the second derivative. For a given variance covariance matrix of the risk factors one can easily construct the level curves of the total risk on the q, a plane.
19
Zvi WienerCF3 slide 19 Assuming correlation of 26% between dr and dL we have: The resulting contour plot shows the levels of risk for any potential position as seen according to today’s data.
20
Zvi WienerCF3 slide 20 Ovals VaR=1bp VaR=2bp
21
Zvi WienerCF3 slide 21 Plan 1. Monte Carlo Method 2. Variance Reduction Methods 3. Quasi Monte Carlo 4. Permuting QMC sequences 5. Dimension reduction 6. Financial Applications simple and exotic options American type prepayments
22
Zvi WienerCF3 slide 22 Monte Carlo
23
Zvi WienerCF3 slide 23 Monte Carlo Simulation
24
Zvi WienerCF3 slide 24 Introduction to MC Hopefully due to the strong law of large numbers the approximation is good. The idea is very simple
25
Zvi WienerCF3 slide 25 Introduction to MC How to determine a well distributed sequence? How one can generate such a sequence? How to measure precision?
26
Zvi WienerCF3 slide 26 Speed of Convergence From the central limit theorem the error of approximation is distributed normal with mean 0 and standard deviation
27
Zvi WienerCF3 slide 27 Regular Grid An alternative to MC is using a regular grid to approximate the integral. Advantages: The speed of convergence is error~1/N. All areas are covered more uniformly. There is no need to generate random numbers. Disadvantages: One can’t improve it a little bit. It is more difficult to use it with a measure.
28
Zvi WienerCF3 slide 28 Variance Reduction Let X( ) be an option. Let Y be a similar option which is correlated with X but for which we have an analytic formula. Introduce a new random variable
29
Zvi WienerCF3 slide 29 Variance Reduction The variance of the new variable is If 2 cov[X,Y] > 2 var[Y] we have reduced the variance.
30
Zvi WienerCF3 slide 30 Variance Reduction The optimal value of is Then the variance of the estimator becomes:
31
Zvi WienerCF3 slide 31 Variance Reduction Note that we do not have to use the optimal * in order to get a significant variance reduction.
32
Zvi WienerCF3 slide 32 Multidimensional Variance Reduction A simple generalization of the method can be used when there are several correlated variables with known expected values. Let Y 1, …, Y n be variables with known means. Denote by Y the covariance matrix of variables Y and by XY the n-dimensional vector of covariances between X and Y i.
33
Zvi WienerCF3 slide 33 Multidimensional Variance Reduction Then the optimal projection on the Y plane is given by vector: The resulting minimum variance is where
34
Zvi WienerCF3 slide 34 Variance Reduction Antithetic sampling Moment matching/calibration Control variate Importance sampling Stratification
35
Zvi WienerCF3 slide 35 Monte Carlo Distribution of market factors Simulation of a large number of events P&L for each scenario Order the results VaR = lowest quantile
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.