27
1-27 FRMFinancial Risk Manager)金融风险管理师 Simulation Modeling 模拟建模

2.15_Simulation+Modeling+模拟建模

Embed Size (px)

Citation preview

Page 1: 2.15_Simulation+Modeling+模拟建模

1-27FRM(Financial Risk Manager)金融风险管理师

Simulation Modeling

模拟建模

Page 2: 2.15_Simulation+Modeling+模拟建模

2-27FRM(Financial Risk Manager)金融风险管理师

Choosing Probability Distributions

Simulation models generate random inputs that are assumed to follow a

probability distribution.1 0 (1 )C C r

Random Variable

r → N (μ, σ2 )

Page 3: 2.15_Simulation+Modeling+模拟建模

3-27FRM(Financial Risk Manager)金融风险管理师

Choosing Probability Distributions

There are four ways of choosing a probability distribution for a simulation model,

including:

1. Bootstrapping technique: examines probability distributions of historical returns and

assumes future returns will follow the same distribution. Future ending scenarios are

simulated by randomly drawing from historical scenarios of past returns.

2. Parameter estimate technique: uses parameters to define the shape of a specific

probability distribution for future input variables. Historical data is used to estimate

parameters required for the future distribution. For example, the mean (μ) and standard

deviation (σ) are parameters for a normal probability distribution, λ is the parameter for a

Poisson distribution.

3. Best fit technique: finds a probability distribution that best fits historical data.

4. Subjective guess technique: constructs a future probability distribution based on a

subjective guess of how an input variable will behave in the future. This method is not

based on historical data. For example, if you have a pessimistic (悲观的) view of future

returns, you might use the beta distribution with a probability distribution mass that is

skewed more to the left than the normal distribution.

Page 4: 2.15_Simulation+Modeling+模拟建模

4-27FRM(Financial Risk Manager)金融风险管理师

Monte Carlo Simulation

assume we invest $100 today in the S&P 500 index for one year. Also assume

that the return over the next year, r , follows a normal distribution. In this case,

we could use historical data to estimate the mean and standard deviation for the

normal distribution. These parameter estimates will fluctuate depending on the

chosen time period. Let‘s assume that the historical mean return of the S&P 500

is 10%, and the standard deviation is 15%.

To estimate capital at the end of year one, C1, we can run a simulation drawing

100 random returns from a normal distribution with a mean of 10% and a

standard deviation of 15%. The simulation output generates 100 ending capital

amounts based on the formula C1 = C0 (1 + r). If next year’s return follows

historical returns, then, on average, you would expect to have an ending capital

amount of $110.

Page 5: 2.15_Simulation+Modeling+模拟建模

5-27FRM(Financial Risk Manager)金融风险管理师

Monte Carlo Simulation

Page 6: 2.15_Simulation+Modeling+模拟建模

6-27FRM(Financial Risk Manager)金融风险管理师

Monte Carlo Simulation

Example: what is the 95% confidence interval for the ending capital amount from

a simulation run where the number of simulations is 100 (N=100), the mean

ending capital, ( ), is $110.009, and the standard deviation, s, is $14.798?X

$14.798 $14.798

$110.009 1.98 , $110.009 1.98 $107.079, $112.939100 100

Page 7: 2.15_Simulation+Modeling+模拟建模

7-27FRM(Financial Risk Manager)金融风险管理师

Advantages of Simulation Modeling

The four major advantages of simulation modeling when multiple input variables and

compounding distributions (复合分布) are involved are as follows:

1. Simulation models simplify complex functions because the probability distribution of the

output variable does not need to be identified. When more complex functions are

involved, it is very difficult to derive the probability distribution of the output variable

based on the probability distributions of the input variables. For example, the ending

capital output is normally distributed for a one-period model assuming the input returns

are normally distributed. However, with multiple periods, the output distribution is not

known.

2. Simulation models create visible output probability distributions that can be analyzed

when compounding probability distributions result from multiple input variables.

3. Simulation models allow for correlations between input variables.

4. Simulation models can easily examine effects on output variables when changing

strategies or scenarios.

Page 8: 2.15_Simulation+Modeling+模拟建模

8-27FRM(Financial Risk Manager)金融风险管理师

Advantages of Simulation Modeling

Page 9: 2.15_Simulation+Modeling+模拟建模

9-27FRM(Financial Risk Manager)金融风险管理师

Advantages of Simulation Modeling

Example: Incorporating multiple input variables into simulations

Suppose that we invest $100 in the S&P 500 index for 30 years instead of just one year.

We assume the annual returns over the next 30 years follow a normal distribution with a

mean of 10% and a standard deviation of 15%. Will the probability distribution of capital

at the end of 30 years be normally distributed?

Page 10: 2.15_Simulation+Modeling+模拟建模

10-27FRM(Financial Risk Manager)金融风险管理师

Incorporating Correlations Into Simulation Modeling

Example: Suppose that we invest $50 in the S&P 500 index and $50 in Treasury bonds for 30

years. For the S&P 500 index, we assume the annual returns over the next 30 years follow a

normal distribution with a mean of 10% and a standard deviation of 15%. Treasury bonds are

assumed to following a normal distribution with a mean of 4% and a standard deviation of 7%.

We assume correlation is -0.2. Thus the returns of S&P 500 index and Treasury bonds index

follow a multivariate normal distribution.

Page 11: 2.15_Simulation+Modeling+模拟建模

11-27FRM(Financial Risk Manager)金融风险管理师

Relationship Between Accuracy and Number of Scenarios

Page 12: 2.15_Simulation+Modeling+模拟建模

12-27FRM(Financial Risk Manager)金融风险管理师

Relationship Between Accuracy and Number of Scenarios

Page 13: 2.15_Simulation+Modeling+模拟建模

13-27FRM(Financial Risk Manager)金融风险管理师

201405真题讲解

69. A quantitative analyst used a simulation to forecast the S&P 500 index value at the end of the

year with an index value of 1,800 at the beginning of the year. He generated 200 scenarios and

calculated the average index value at year-end to be 1,980, with a 95% confidence interval of

[1,940, 2,020]. In order to improve the accuracy of the forecast, the quantitative analyst

increased the number of scenarios to attain a new 95% confidence interval of [1,970, 1,990]

with the same sample mean and the same sample standard deviation. How many scenarios

were used to generate this result?

A. 400

B. 800

C. 1,600

D. 3,200

s s1980+1.645 2020 1.645 40

200 200

s s1980+1.645 1990 1.645 10

3200

N N

N

Page 14: 2.15_Simulation+Modeling+模拟建模

14-27FRM(Financial Risk Manager)金融风险管理师

Estimator Bias

离散

Page 15: 2.15_Simulation+Modeling+模拟建模

15-27FRM(Financial Risk Manager)金融风险管理师

Identifying the Most Efficient Estimator

Page 16: 2.15_Simulation+Modeling+模拟建模

16-27FRM(Financial Risk Manager)金融风险管理师

201405真题讲解

32.A quantitative risk analyst is comparing the computational efficiency of different

estimators generated using Monte Carlo simulation. Relevant information is

summarized in the following table:

which of the estimators is most computationally efficient?

A. Estimator A

B. Estimator B

C. Estimator C

D. Estimator D

Estimator A Estimator B Estimator C Estimator D

Standard Deviation 0.30 0.40 0.25 0.35

Time for generating one

scenario (seconds)

35 25 40 30

Scenarios 20 40 30 50

Total time for generating

scenarios (seconds)

700 1,000 1,200 1,500

1 1 0.30 700 7.9373s A

2 2 0.40 1000 12.6491s B

3 3 0.25 1200 8.6603s C

4 4 0.35 1500 13.5554s D

Page 17: 2.15_Simulation+Modeling+模拟建模

17-27FRM(Financial Risk Manager)金融风险管理师

Inverse Transform Method

Creating Random Numbers

Inverse transform method

X~U[0,1] )()( 1 xNyyNx

Page 18: 2.15_Simulation+Modeling+模拟建模

18-27FRM(Financial Risk Manager)金融风险管理师

Pseudorandom Number (伪随机数) Generators

Midsquare technique (中间平方技术)

was one of the first pseudorandom number generators. The sequence from this

technique is created by squaring the first random number (i.e., the seed) and using the

set of middle digits for the next random number.

Take a seed, square it and use the set of middle digits as the next random number. For

example:

53812=28955161; middle four digits=9551; random number=0.9551;

95512=91221601; middle four digits=2216; random number=0.2216

This random number sequence continues using the same midsquare technique. Eventually,

the middle digits become a small number such as 1 or 0, and the sequence converges and

generates the same numbers over and over again. Therefore, this technique can result in a

very short cycle of random numbers.

Page 19: 2.15_Simulation+Modeling+模拟建模

19-27FRM(Financial Risk Manager)金融风险管理师

Example

1. What is the first random number in a sequence of random numbers between 0

and 1 that is created using the midsquare technique with a seed number of

4931?

A. 0.3147

B. 0.4852

C. 0.6931

D. 0.9246

Page 20: 2.15_Simulation+Modeling+模拟建模

20-27FRM(Financial Risk Manager)金融风险管理师

Pseudorandom Number (伪随机数) Generators

Congruential pseudorandom number generators (非线性同余伪随机数发生器

). A more effective technique that avoids the short cycle problem of the midsquare

technique.

Suppose A=2, m=10, the seed x0= 1198

n 1

n n 1

A xx A x m

m

取整

Page 21: 2.15_Simulation+Modeling+模拟建模

21-27FRM(Financial Risk Manager)金融风险管理师

Stratified Sampling Method

Page 22: 2.15_Simulation+Modeling+模拟建模

22-27FRM(Financial Risk Manager)金融风险管理师

Stratified Sampling Method

The stratified sampling method can also be used with more than one variable or

dimension. For example, the Latin Hypercube (拉丁超立方体) Sampling

method is a p-dimensional model instead of a linear interval from [0,1].

Page 23: 2.15_Simulation+Modeling+模拟建模

23-27FRM(Financial Risk Manager)金融风险管理师

Example

2. An analyst is running a Monte Carlo simulation to estimate the ending amount of

capital in 20 years based on monthly returns for three investments. Two of these

investments are highly correlated, and one has a correlation close to zero with the

other two investments. In order to properly analyze Monte Carlo simulation output

for this problem, the analyst:

A. must carefully determine the probability distribution of the output ending

capital.

B. can easily examine effects on output variables when changing scenarios.

C. must assume that the probability distribution for the output ending capital is

normally distributed if the monthly returns are assumed to be normally

distributed.

D. cannot control for correlations between the three investments.

Page 24: 2.15_Simulation+Modeling+模拟建模

24-27FRM(Financial Risk Manager)金融风险管理师

Example

3. The 95% confidence interval for the output of ending capital is calculated to be

($117.03, $122.97) for a simulation run with 100 scenarios. In addition, the

simulation resulted in a mean ending capital amount of $120 with a standard

deviation of $15. Suppose we want to improve the accuracy of this confidence

interval by running a simulation of 400 scenarios. What is the new 95%

confidence interval with a simulation of 400 scenarios using the same mean and

standard deviations from the model with 100 scenarios?

A. ($117.23, $122.95).

B. ($118.52, $121.48).

C. ($119.02, $121.99).

D. ($119.71, $122.27).

Page 25: 2.15_Simulation+Modeling+模拟建模

25-27FRM(Financial Risk Manager)金融风险管理师

Example

4. Suppose you run a simulation to estimate the output of ending wealth for an

investment of $100,000 today over a 30-year time period using random monthly

returns that are assumed to be normally distributed. How does this action create a

discretization error bias?

A. The true probability of the input random returns is unknown and creates the

bias.

B. The true probability of the output ending wealth is unknown and creates the

bias.

C. The assumption that returns are random creates the bias.

D. The assumption that returns occur on a monthly basis in the model instead of

continuously creates the bias.

Page 26: 2.15_Simulation+Modeling+模拟建模

26-27FRM(Financial Risk Manager)金融风险管理师

Example

5. An advantage of the Latin Hypercube Sampling technique over a traditional

Monte Carlo simulation is that:

A. fewer scenarios are required.

B. clustered observations are more easily obtained.

C. strata do not need to be well represented.

D. assumptions of input probability distributions are not required.

Page 27: 2.15_Simulation+Modeling+模拟建模

27-27FRM(Financial Risk Manager)金融风险管理师

结 束

恭 祝 大 家

FRM学习愉快!

顺利通过考试!