Problem with simulating 2 Ornstein-Uhlenbeck processes for extreme parameters

I have a problem with simulating 2 correlated Ornstein-Uhlenbeck-processes. After estimating the parameters from some data with multivariate maximum likelihood, it seems that I cannot simulate.

I get the following parameters - see below -, i.e. very small long-term means, and big values for the first process' mean reversion speed and volatility. When I simulate the processes with Monte Carlo, the first process goes to -inf at some point and then logically to NaN for the subsequent values. When I simulate the process with a binomial tree, I also get problems.

Am I right in assuming it is because of the extreme parameters that I estimated? What can I do? Should I scale the data before I estimate or should I scale the parameters? If yes, how?

    % 1. Basic inputs:
clc;
close all;
format long;
discount = 0.045; % discount factor
t = 0; % current point in time
sim = 30; % number of simulations
N = 365; % number of timesteps
dt = 1/N; % length of one timestep

% 2. Estimated parameters of the 2 Ornstein-Uhlenbeck processes:
rho = 5.19E-02; % correlation between X and Y
k1 = 5.96E+03; % mean reversion coefficient
mu1 = 1.85E-03; % long term mean of X
sigma1 = 5.67E+01; % volatility of X
k2 = 6.55E+01; % mean reversion coefficient
mu2 = 1.11E-08; % long term mean of Y
sigma2 = 3.66E-01; % volatility of Y
X0 = -0.642704882239982; % start value of X
Y0 = 0.016304441194403; % start value of Y

% 3. Simulation via Monte Carlo:
u = randn(sim,N);
v = randn(sim,N);
V1 = u; %V1 has size(sim,N)
V2 = rho*u+sqrt(1-rho^2)*v; %V2 has size(sim,N)

X = NaN(sim,N+1); % initialize X
X(:,1)=X0;
Y = NaN(sim,N+1); % initialize Y
Y(:,1)=Y0;
for l=1:sim
for j=2:N+1
X(l,j)=X(l,j-1)+(k1.*(mu1-X(l,j-1))-1/2*sigma1^2).*dt+sigma1.*sqrt(dt).*V1(l,j-1);
Y(l,j)=Y(l,j-1)+(k2.*(mu2-Y(l,j-1))-1/2*sigma2^2).*dt+sigma2.*sqrt(dt).*V2(l,j-1);
end
end

X = mean(X);
Y = mean(Y);

% 4. Plots:
figure;
plot(X);

figure;
plot(Y);

• I would review your estimation algorithm. What is the value of dt here? 1/365? The problem is, I think, k1*dt being higher than 1. Than makes this process being not being reverting, but an oscillating one where everyday the long term mean is crossed with magnitudes higher and higher. – Juan Ignacio Gil Dec 13 '16 at 18:46
• Thanks, yes, that makes sense! I have 2 follow-up questions: – LenaH Dec 14 '16 at 7:30
• 1) Is it sufficient to restrict solutions to k1<= 365 (I use the fmincon function for the maximum likelihood)?? 2) I did that and now I get useful simulations. However, when I divide the mean of the simulations by the mean of the data, it doesn't give 100%, but a multiple. But the values are small and the absolute difference between simulated and historical means is only around 0.03. What way is there to judge if the estimation is alright? I did several test estimations with artificially created data, and it works perfectly for that - however with the same problem for very small values. – LenaH Dec 14 '16 at 8:31
• Could you break it down to see where the problem starts? Can you do one single series with trivial parameter choices (mean reversion = 0 and/or variance = 0)? Could you then do it with one single parameter non-trivial, all parameters, two series, two correlated series? – Mats Lind Dec 14 '16 at 8:55
• Yes, I did that and it all works. The problem is with small values around zero. Any difference between historical and estimated parameters and prices seems large in percentage terms, even though small in absolute terms...! – LenaH Dec 16 '16 at 11:07