Applying Ito's lemma
- Subject: Applying Ito's lemma
- From: Andrei Zorine
- Date: Thu, 4 Jun 2009 17:12:11 +0400
Hi, J.
Probably you need a translation of itovsn3 package available here
http://www.uic.nnov.ru/~zoav1/mac/sde-0.9.tar.gz
==== Sample output goes here =========
(%i1) load("mac/sde/sde.mac");
(%o1) mac/sde/sde.mac
(%i2) ItoInit(t,dt);
(%o2) DONE
(%i3) BrownSingle(w,w0);
(%o3) w0
(%i4) ItoStatus();
---------------------
Summary of current structure
of stochastic differentials
- - - - - - - - - - -
Current second-order structure
of semimartingales differentials
[ dw dt ]
[ ]
[ dw dt 0 ]
[ ]
[ dt 0 0 ]
- - - - - - - - - - -
Current first-order structure
of semimartingale differentials
[ dw dt ]
[ ]
[ Drifts: 0 dt ]
- - - - - - - - - - -
Current initial values:
[ w t ]
[ ]
[ Initials: w0 0 ]
- - - - - - - - - - -
(%o4) true
(%i5) Itosde(f,df=(r+sigma_f*sigma_g)*f*dt+sigma_f*f*dw,f0);
(%o5) [DONE, DONE, DONE]
(%i6) ItoStatus();
---------------------
Summary of current structure
of stochastic differentials
- - - - - - - - - - -
Current second-order structure
of semimartingales differentials
[ df dw dt ]
[ ]
[ 2 2 ]
[ df dt f sigma_f dt f sigma_f 0 ]
[ ]
[ dw dt f sigma_f dt 0 ]
[ ]
[ dt 0 0 0 ]
- - - - - - - - - - -
Current first-order structure
of semimartingale differentials
[ df dw dt ]
[ ]
[ Drifts: dt (f sigma_f sigma_g + f r) 0 dt ]
- - - - - - - - - - -
Current initial values:
[ f w t ]
[ ]
[ Initials: f0 w0 0 ]
- - - - - - - - - - -
(%o6) true
(%i7) ItoD(log(f));
df
(%o7) ------
log(f)
==== End of sample output ====
Is this what you expect?
--
Andrei Zorine
? ????????? ?? Thursday 04 June 2009 16:17:00 Julien Martin ???????(?):
> Hello,
> I am relatively new to Maxima and I would like to apply Ito's lemma to ln(f)
> with f defined as follows:
>
> *df:=(r + sigma_f * sigma_g) f dt +(sigma_f ) f dz*
>
> Here is what I tried:
>
> *g(f,t):=log(f(t));
>
> (diff(g(f,t),f(t),1)*(r + sigma_f * sigma_g) + diff(g(f,t),t,2) + 1/2*
> diff(g(f,t),f(t),2)*(sigma_f * f(t))^2)*dt + diff(g(f,t),f(t),1)*(sigma_f *
> f(t))*dz;*
>
>
> I don't get what I want i.e. I it does not seem to derive. What I am getting
> wrong in the syntax?
>
> Can anyone please help?
>
> J.
>
> Ps. Here is the original lemma for your information:
> http://en.wikipedia.org/wiki/It%C5%8D%27s_lemma#Black.E2.80.93Scholes_formula
>