1
$\begingroup$

I'm trying to set up a stochastic differential equation and run numerical simulations for the following process: $$\frac{dV_t}{V_t}=\left[M+\gamma\left(M-\left(\frac{V_t}{V_{t-1}}-1\right)\right)\right]dt+\sigma dW$$

i.e. it's an Ornstein–Uhlenbeck process that converges to a steady-state growth rate $M$, with a speed of adjustment $\gamma$, and where the convergence also depends on how much the point-in-time growth rate has deviated from the steady-state growth rate.

If I use ItoProcess to input this, Mathematica seems happy enough.

proc = ItoProcess[ \[DifferentialD]V[t]/V[t] == (M + \[Gamma]*(M - (V[t]/V[t - 1] - 1)))* \[DifferentialD]t + \[Sigma]*\[DifferentialD]w[t], V[t], {V, Subscript[V, 0]}, t, Distributed[w, WienerProcess[]] ] 

However, I am stuck when I then try and generate some simulations, using RandomFunction. E.g. say, I set $M=0.05$, $\gamma=0.5$ and $\sigma = 0.02$, and initial value $V_0$ as 100.

M = 0.05; \[Gamma] = 0.5; \[Sigma] = 0.02; Subscript[V, 0] = 100 

Re-evaluating proc with those parameters, I get

ItoProcess[{{0. + 1.*V[t]*(0.05 + 0.5*(1.05 - (1.*V[t])/V[t][-1 + t]))}, {{0.02* V[t]}}, V[t]}, {{V}, {100}}, {t, 0}] 

If I then try and generate a simulated path using, say,

RandomFunction[proc, {0., 5., 0.01}] 

I get this error message:

enter image description here

I'm thinking the reason it's going wrong is that there is no 'history' of $V$ for the point-in-time growth rate to be calculated prior to t=0, and therefore it falls over.

I would be very grateful if anyone could help identify what is going wrong, and what I could do to overcome this.

Thanks!

$\endgroup$

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.