Serving the Quantitative Finance Community

 
User avatar
list1
Posts: 827
Joined: July 22nd, 2015, 2:12 pm

Re: Expected first passage time for GBM

February 9th, 2017, 2:09 pm

Cool, thank you, took me a moment to figure out. Can you guide me as to what the steps to solving the following integral are?

[$]-\frac{1}{2\sqrt{2\pi}}\int^T_0 \frac{(b-\alpha t)}{\sqrt{t}}e^{-\frac{1}{2}(\frac{b-\alpha t}{\sqrt{t}})^2}dt[$]

Appreciate your help.

Best
Ralf
initially, you asked about GBM and your last formula probably relates to other process. it might be better to present your original question with equation for GBM.
 
User avatar
Alan
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Expected first passage time for GBM

February 9th, 2017, 6:39 pm

Cool, thank you, took me a moment to figure out. Can you guide me as to what the steps to solving the following integral are?

[$]-\frac{1}{2\sqrt{2\pi}}\int^T_0 \frac{(b-\alpha t)}{\sqrt{t}}e^{-\frac{1}{2}(\frac{b-\alpha t}{\sqrt{t}})^2}dt[$]

Appreciate your help.

Best
Ralf
Step 1. Navigate to Wolfram store.
Step 2. Buy home edition of Mathematica.
Step 3. Review my previous post.

Am serious!
 
User avatar
ralfbuesser
Topic Author
Posts: 8
Joined: September 1st, 2011, 2:30 pm

Re: Expected first passage time for GBM

February 9th, 2017, 8:15 pm

Ok.

Let's assume I have a GBM without drift, i.e. [$]dS_t = \sigma S_t dW_t[$]. Assume some level [$]B>S_{t_0}[$]. Define [$]M^+=max_{0\leq s \leq t} S_t[$]. With the help of some textbook, I could figure out that  [$]E(\tau<t) = P(M^+ \geq B) = 1 + e^{2\alpha b} N(\frac{-b-\alpha t}{\sqrt{t}}) - N(\frac{b-\alpha t}{\sqrt{t}}) [$], where [$]\tau[$] is the first passage time, [$]b = log(B/S_{t_0})/\sigma[$] and [$]\alpha = -0.5 \sigma[$].

Next, following the advise from Alan, I take the derivative of [$]E(\tau<t)[$] w.r.t. to [$]t[$] and compute [$]\int_0^T t f(t) dt[$].

To simplify matters, I have looked at the term [$]N(\frac{b-\alpha t}{\sqrt{t}})[$] in isolation. Using differentiation under the integral sign, I obtained [$]g(t) =\frac{d N(\frac{b-\alpha t}{\sqrt{t}})}{dt} =  -\frac{(b-\alpha t)}{2 \sqrt{2\pi} t \sqrt{t}} e^{-0.5 \frac{(b-\alpha t)^2}{t}}[$]. The equation I have put previously is simply the integral over the product [$]t g(t)[$].

@ Alan: I guess I could e.g. also use the 'sym' toolbox of Matlab. I don't think though I'd learn anything that way.
 
User avatar
list1
Posts: 827
Joined: July 22nd, 2015, 2:12 pm

Re: Expected first passage time for GBM

February 9th, 2017, 8:50 pm

Ok.

Let's assume I have a GBM without drift, i.e. [$]dS_t = \sigma S_t dW_t[$]. Assume some level [$]B>S_{t_0}[$]. Define [$]M^+=max_{0\leq s \leq t} S_t[$]. With the help of some textbook, I could figure out that  [$]E(\tau<t) = P(M^+ \geq B) = 1 + e^{2\alpha b} N(\frac{-b-\alpha t}{\sqrt{t}}) - N(\frac{b-\alpha t}{\sqrt{t}}) [$], where [$]\tau[$] is the first passage time, [$]b = log(B/S_{t_0})/\sigma[$] and [$]\alpha = -0.5 \sigma[$].

Next, following the advise from Alan, I take the derivative of [$]E(\tau<t)[$] w.r.t. to [$]t[$] and compute [$]\int_0^T t f(t) dt[$].

To simplify matters, I have looked at the term [$]N(\frac{b-\alpha t}{\sqrt{t}})[$] in isolation. Using differentiation under the integral sign, I obtained [$]g(t) =\frac{d N(\frac{b-\alpha t}{\sqrt{t}})}{dt} =  -\frac{(b-\alpha t)}{2 \sqrt{2\pi} t \sqrt{t}} e^{-0.5 \frac{(b-\alpha t)^2}{t}}[$]. The equation I have put previously is simply the integral over the product [$]t g(t)[$].

@ Alan: I guess I could e.g. also use the 'sym' toolbox of Matlab. I don't think though I'd learn anything that way.
It seems that it might make sense to write explicit solution [$] S_t  =  S_0 exp \, ( \sigma\, w_t  - \frac{1}{2} \sigma^2 \,t )[$] and then P ( [$]M^{+}[$] > B ) transform to equivalent one P ( [$]sup_t \, ( w_t  - \gamma t >  B_1 )[$] where [$]B_1[$] is a transformed value B. It seems to me I saw estimate w with drift
 
User avatar
Alan
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Expected first passage time for GBM

February 9th, 2017, 9:17 pm

Ok.

Let's assume I have a GBM without drift, i.e. [$]dS_t = \sigma S_t dW_t[$]. Assume some level [$]B>S_{t_0}[$]. Define [$]M^+=max_{0\leq s \leq t} S_t[$]. With the help of some textbook, I could figure out that  [$]E(\tau<t) = P(M^+ \geq B) = 1 + e^{2\alpha b} N(\frac{-b-\alpha t}{\sqrt{t}}) - N(\frac{b-\alpha t}{\sqrt{t}}) [$], where [$]\tau[$] is the first passage time, [$]b = log(B/S_{t_0})/\sigma[$] and [$]\alpha = -0.5 \sigma[$].

Next, following the advise from Alan, I take the derivative of [$]E(\tau<t)[$] w.r.t. to [$]t[$] and compute [$]\int_0^T t f(t) dt[$].

To simplify matters, I have looked at the term [$]N(\frac{b-\alpha t}{\sqrt{t}})[$] in isolation. Using differentiation under the integral sign, I obtained [$]g(t) =\frac{d N(\frac{b-\alpha t}{\sqrt{t}})}{dt} =  -\frac{(b-\alpha t)}{2 \sqrt{2\pi} t \sqrt{t}} e^{-0.5 \frac{(b-\alpha t)^2}{t}}[$]. The equation I have put previously is simply the integral over the product [$]t g(t)[$].

@ Alan: I guess I could e.g. also use the 'sym' toolbox of Matlab. I don't think though I'd learn anything that way.
-Differentiate and combine both the N( ) terms.

-Expand the quadratic argument of the exponential, extracting the term independent of t from the integral. 

-At this point, I believe you'll find it indeed reduces to exactly the integral I posted. Then, it comes down to evaluating that integral.

If you can't get Matlab to do it, and don't want to buy Mathematica, and can't do it yourself, and nobody on the board will do it for you -- I guess you are stuck.
 
User avatar
list1
Posts: 827
Joined: July 22nd, 2015, 2:12 pm

Re: Expected first passage time for GBM

February 9th, 2017, 10:34 pm

Ok.

Let's assume I have a GBM without drift, i.e. [$]dS_t = \sigma S_t dW_t[$]. Assume some level [$]B>S_{t_0}[$]. Define [$]M^+=max_{0\leq s \leq t} S_t[$]. With the help of some textbook, I could figure out that  [$]E(\tau<t) = P(M^+ \geq B) = 1 + e^{2\alpha b} N(\frac{-b-\alpha t}{\sqrt{t}}) - N(\frac{b-\alpha t}{\sqrt{t}}) [$], where [$]\tau[$] is the first passage time, [$]b = log(B/S_{t_0})/\sigma[$] and [$]\alpha = -0.5 \sigma[$].

Next, following the advise from Alan, I take the derivative of [$]E(\tau<t)[$] w.r.t. to [$]t[$] and compute [$]\int_0^T t f(t) dt[$].

To simplify matters, I have looked at the term [$]N(\frac{b-\alpha t}{\sqrt{t}})[$] in isolation. Using differentiation under the integral sign, I obtained [$]g(t) =\frac{d N(\frac{b-\alpha t}{\sqrt{t}})}{dt} =  -\frac{(b-\alpha t)}{2 \sqrt{2\pi} t \sqrt{t}} e^{-0.5 \frac{(b-\alpha t)^2}{t}}[$]. The equation I have put previously is simply the integral over the product [$]t g(t)[$].

@ Alan: I guess I could e.g. also use the 'sym' toolbox of Matlab. I don't think though I'd learn anything that way.
It seems that it might make sense to write explicit solution [$] S_t  =  S_0 exp \, ( \sigma\, w_t  - \frac{1}{2} \sigma^2 \,t )[$] and then P ( [$]M^{+}[$] > B ) transform to equivalent one P ( [$]sup_t \, ( w_t  - \gamma t >  B_1 )[$] where [$]B_1[$] is a transformed value B. It seems to me I saw estimate w with drift
The book where max estimate w ( t ) with drift is Rose Ann Dana & Monique Jeanblank, Financial Markets in Continuous Time, 2003 and the math proof is looking very good.
 
User avatar
ralfbuesser
Topic Author
Posts: 8
Joined: September 1st, 2011, 2:30 pm

Re: Expected first passage time for GBM

February 10th, 2017, 7:08 am

Thanks Alan, surely one of these options will play out.