Serving the Quantitative Finance Community

 
User avatar
Swing
Topic Author
Posts: 0
Joined: March 12th, 2012, 9:08 am

Monte Carlo Pb

February 20th, 2013, 3:27 pm

Hello,I'm working on a three factor affine model (interest rates), while running monte carlo simulation to estimates the factors, I get weird values, they explode in time.I have a mean reversion matrix like this: K = -0.5640 -0.2851 -0.1757 5.2495 4.0835 0.1250 -5.5287 -5.0019 -0.0661Could it be the reason values are exploding ?Model:dXt = K(theta-Xt)*dt + sigma*dWtThanks for any help.
Last edited by Swing on February 19th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
frenchX
Posts: 11
Joined: March 29th, 2010, 6:54 pm

Monte Carlo Pb

February 20th, 2013, 5:13 pm

Why do you have some negatives K? If you want to have mean reversion towards theta then K needs to be positive. Indeed consider the case when sigma is null.If x<theta then dX is positive and then X grows towards theta. The reverse occurs when x>theta.
 
User avatar
Swing
Topic Author
Posts: 0
Joined: March 12th, 2012, 9:08 am

Monte Carlo Pb

February 21st, 2013, 4:03 pm

Thanks FrenchX for your reply, but apparently the mean reversion matrix can hold negative values In this paper (page 19): http://www.ssc.upenn.edu/~fdiebold/pape ... 78/cdr.pdf The authors are getting similar results.I'm trying to implement the same model (an affine 3-factors IR model, the 3 factors are level slope and curvature), I did KalmanFilter+MLE to estimate the model parameters (K: mean reversion matrix, sigma: volatility matrix, theta: mean vector and lambda: decay)Model :dXt = K(theta-Xt)*dt + sigma*dWtwhere: Xt=(Lt, St, Ct)After that, I wanted to perform a monte carlo to generate differents possible paths for these 3 factors (Level, Slope and Curvature) horizon 1 year, and then rank the terminal values from the smallest to the largest and pick the 99% percentile (When I run monte carlo my paths just explode..Any ideas ?Thanks for any contribution.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Monte Carlo Pb

February 21st, 2013, 5:17 pm

For large t, I will guess you should find E[X(t,i)] ~ A(i) e^(lambda t), where lambda ~3.85 is the largest eigenvalue of your matrix.
Last edited by Alan on February 20th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Swing
Topic Author
Posts: 0
Joined: March 12th, 2012, 9:08 am

Monte Carlo Pb

February 21st, 2013, 5:43 pm

You think I should put constrains on the matrix K when maximizing the log likelihood of the parameters (K, sigma, theta, lambda) ? (I use the matlab function fminsearch)Thanks.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Monte Carlo Pb

February 21st, 2013, 6:52 pm

Yes.Also, I misinterpreted what I found, which were eigenvalues:{3.84994, -0.198272 + 0.319543 I, -0.198272 - 0.319543 I}The large positive is OK -- it's the negative real parts that have exponential growth.So, perhaps an optimization constraint Re[lambda(i)] > 0, (i=1,2,3) will fix things, wherethe lambda(i) are the eigenvalues of K.
Last edited by Alan on February 20th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
frenchX
Posts: 11
Joined: March 29th, 2010, 6:54 pm

Monte Carlo Pb

February 21st, 2013, 7:48 pm

Sorry I misread the equation. Alan is right, putting constrains on the real part of the eigenvalues of your matrix could help. Moreover for a 3x3 matrix the eigenvalues could be obtained analytically (without a root finding algo for the characteristic polynom). Another question how do you create your paths? by euler method?
Last edited by frenchX on February 20th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Swing
Topic Author
Posts: 0
Joined: March 12th, 2012, 9:08 am

Monte Carlo Pb

March 3rd, 2013, 7:32 pm

Hello guys,frenshX I creat my paths using: dX= K*(Theta-Path(j-1))*dt + Sigma*RandomNumber; Path(j)= Paths(j-1) + dX;
 
User avatar
Swing
Topic Author
Posts: 0
Joined: March 12th, 2012, 9:08 am

Monte Carlo Pb

March 6th, 2013, 5:20 pm

Last edited by Swing on March 6th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Swing
Topic Author
Posts: 0
Joined: March 12th, 2012, 9:08 am

Monte Carlo Pb

March 7th, 2013, 10:48 am

Last edited by Swing on March 6th, 2013, 11:00 pm, edited 1 time in total.