Maa.org Mail Steve Dunbar <sdunbar@maa.org>

FW: math finance
1 message

Steven Dunbar <sdunbar1@unl.edu> Fri, May 17, 2013 at 2:32 PM
To: "sdunbar@maa.org" <sdunbar@maa.org>


From: Steven Dunbar
Sent: Friday, May 17, 2013 2:31 PM
To: Marc Hapward
Cc: Steven Dunbar
Subject: RE: math finance

MH >> Y(t)=W^3(t), is dY(t) = 3W(t)dt + (3W(t)^2)dW 
MH>> and then the integral of W^2(t)dW(t)-(using this result) is = to 1/3*W^3 – W*t?

SD> No.  Use Theorem 1, as I have it in the Ito's formula section or equivalently Corollary 1.  
SD> For what you consider, in > the notation of Theorem 1: 
SD> Y(t) = 0*t + 1*W(t), so r = 0, sigma = 1 and f(x) = x^3,  and Z(t) = (Y(t))^3 = (W(t))^3

SD> Then dZ = (3/2)*(W(t))^2 dt + (W(t))^2 dW

SD> Then using the technique of guessing correctly, to evaluate 
SD> Z_1(t) = \int_0^t W(t)^2 dW, we would guess that we need a drift process 
SD> Y(t) = -1/2*t + W(t), and Z_1 (t) = > (1/3)*(Y(t))^3, so that 
SD> dZ_1 = (-1/2*(Y(t))^3 + (1/2)*(Y(t))^2)dt + (Y(t))^2 dW = (Y(t))^2 dW 
SD> works out correctly.
SD>  That is, \int_0^t (W(t))^2 dW = (1/3)*(-1/2*t + W(t))^3

MH>  I’m just not seeing how it is not dZ = 3W(t)dt + (3W(t)^2)dW.  
MH> (The function is “f(x) = x^3,  and Z(t) = (Y(t))^3 = (W(t))^3”).

I may have made some typos previously and also, I couldn't  read the fine print on my own notes.  I've enlarged the font, and can read everything now.  Let's try again:
Using Corollary 1 from 
f(x) = x^3, so f'(x ) = 3*x^2 and f''(x) = 3*2*x.  Then applying the Corollary to Z = W(t)^3, get

    dZ = (1/2)*3*2*W dt + 3*W^2 dW = 3 W dt + 3 W^2 dW

So you are correct above.

MH>  then the integral of W^2(t)dW(t)-(using this result) is = to 1/3*W^3 – W*t?

SD>  (Some answer which probably has typos)
  
MH> And how does dZ_1 = (-1/2*(Y(t))^3 + (1/2)*(Y(t))^2)dt + (Y(t))^2 dW = (Y(t))^2 dW? 
MH > Did you mistype the exponents?

Let's try again: If we guess Z_1 = \int_0^t W^2(s) dW = (1/3)*W^3(t), then try to differentiate with Ito's formula we would get 
     dZ_1 = W dt + W^2 dW,
Then we have the extra W dt term in there.   However, we can turn this around and integrate to get
    \int_0^t W^2 dW = (1/3) W^3 - \int_0^t W(s) ds
Then using the idea in the second link below, you can calculate this integral  \int_0^t W(s) ds with some "tricks". 

For more explanation, see 
and

-- Steve Dunbar


From: Marc Hapward [mhapward@comcast.net]
Sent: Wednesday, May 15, 2013 12:49 PM
To: Steven Dunbar
Subject: RE: math finance

Thank you Sir!  You state…“Then dZ = (3/2)*(W(t))^2 dt + (W(t))^2 dW”  …could you identify the first and second derivatives …I’m sure your right with your Theorem 1 on Ito’s formula, but I’m just not seeing how it is not dZ = 3W(t)dt + (3W(t)^2)dW.  (The function is “f(x) = x^3,  and Z(t) = (Y(t))^3 = (W(t))^3”).

 

And how does dZ_1 = (-1/2*(Y(t))^3 + (1/2)*(Y(t))^2)dt + (Y(t))^2 dW = (Y(t))^2 dW? Did you mistype the exponents?

 

I haven’t had my coffee, so I have to review this again!  Thanks for your time. –Marc

 

Oh yes, I downloaded the Maple SDE software.  Originally I could not “read” it, but a professor from Germany helped me out.  Although I am quite the novice, and it was “frustrating” at first, it seems very good.  It seems like all the MATLAB stuff is purely numerical routines. Thank you, I will check out the R software, even though I’m not familiar with R.  Take care.

 

 

 

 

From: Steven Dunbar [mailto:sdunbar1@unl.edu]
Sent: Wednesday, May 15, 2013 11:42 AM
To: Marc Hapward
Subject: RE: math finance

 

Marc --

Thanks for the nice words about my class notes. 

As for solutions to the 7 problems at the end of the section:  Attached are solutions to what are currently problems 6 and 7 in spite of the filenames.  I don't post the solutions anymore, so I haven't updated the files.
These are general enough that they should answer problems 2-5.

> Y(t)=W^3(t), is dY(t) = 3W(t)dt + (3W(t)^2)dW and then the integral of W^2(t)dW(t)-(using this result) is = to 1/3*W^3 – W*t?


No.  Use Theorem 1, as I have it in the Ito's formula section or equivalently Corollary 1.  For what you consider, in the notation of Theorem 1:
Y(t) = 0*t + 1*W(t), so r = 0, sigma = 1 and f(x) = x^3,  and Z(t) = (Y(t))^3 = (W(t))^3

Then dZ = (3/2)*(W(t))^2 dt + (W(t))^2 dW

Then using the technique of guessing correctly, to evaluate
Z_1(t) = \int_0^t W(t)^2 dW, we would guess that we need a drift process Y(t) = -1/2*t + W(t), and Z_1 (t) = (1/3)*(Y(t))^3, so that
dZ_1 = (-1/2*(Y(t))^3 + (1/2)*(Y(t))^2)dt + (Y(t))^2 dW = (Y(t))^2 dW
works out correctly.
That is, \int_0^t (W(t))^2 dW = (1/3)*(-1/2*t + W(t))^3


> is there any SDE or stochastic calculus software, say within Maple, MATLAB, or something else? 

There is an SDE package for Maple.  You can download it from the Maple Application Center or whatever they call it.  I've only tried it a little bit, but when I did, I did not have much good luck with using it.  There may be an SDE package for MATLAB, but I haven't looked.  There is a nice book by Stephen Iacus, 2005 that has some routines in R for SDE.  I have only looked at it briefly, don't have the exact title right now, but it seems to be the best available that I am aware of.

Steve Dunbar
Department of Mathematics, UN-L


From: Marc Hapward [mhapward@comcast.net]
Sent: Saturday, May 11, 2013 2:44 PM
To: sdunbar@unl.edu
Subject: math finance

Hi Professor Dunbar,

 

I like math finance, and am just trying to do some learning on my own.  In a google search, I found your website.  Your notes for your math finance/stochastic processes class are fantastic.  Cogent and for the most part- understandable- even for me!   Thanks for posting your notes.

 

I was just wondering if you had the answers to your 7 exercises at the end of your Ito formula section.  No problem if you don’t/can’t get back to me.  I know I’m not a Nebraska U. student.  (from NJ). 

 

But if impossible, for #1 with process Y(t)=W^3(t), is dY(t) = 3W(t)dt + (3W(t)^2)dW and then the integral of W^2(t)dW(t)-(using this result) is = to 1/3*W^3 – W*t?

 

Lastly, is there any SDE or stochastic calculus software, say within Maple, MATLAB, or something else?  I have Maple and MATLAB student version still on my computer- doesn’t seem to be able to handle SDE or stochastic integrals.

 

Great notes!  (also the transform of BS pde).  Why are some books so bad? J

 

Enjoy the spring/summer.

 

Marc Hapward