last day (15 days later) » 

6:01 AM
4
A: Stochastic Calculus : Dangers of Incorrectly Calculating Derivatives

daisiesThere are a few issues at hand. First, your code doesn't match your post: where you wrote dXt_3 <- mu * dt + (sigma / Bt) * dBt - 0.5 * (sigma / (t)) * dt I think you probably meant dXt_3 <- mu * dt + (sigma / Bt) * dBt - 0.5 * (sigma / (Bt ^ 2)) * dt. In which case the absolute difference betw...

 
thank you so much for your answer! I really appreciate it! I will read it in full detail in the morning!
OP here, some comments I wanted to make
1) I was not sure about how to evaluate (Bt)^2 . I don't think that for a stochastic process, (Bt)^2 is simply Bt*Bt. I figured that the expected value of E[ B(t)^2 ] = t .... this is why I replaced (Bt)^2 by t.
 
No, $B_t^2$ is quite literally $B_t \cdot B_t$; is there a reference for why it should be the variance? Also, note that $\log(B_t)$ is not well-defined for a standard Brownian motion $B_t$ since $B_t$ is not strictly positive and no matter where you start it $\log(B_t)$ goes to $-\infty$ in finite time, so things become kind of tricky. One could work up to a stopping time, but I think that this might just obfuscate the original point.
If you would like, I can transcribe how to compute the derivative in the case of $X_t = \log(B_t)$, $B_0 = 1$ and we work only on $t < T$ where $T = \min\{ t \mid B_t = 0 \}$. It turns out that a local version of Ito holds anyway.
 
sorry - I reverted it back to Geometric Brownian Motion. "Bt <- exp(cumsum(rnorm(n, 0, sqrt(dt))))" is simulating a geometric Brownian motion, correct?
re: Bt^2 = BtBt ... I thought there is something called "quadratic variation of a brownian motion" which is shows us how to calculate Bt^2 ... and Bt^2 is not simply BtBt. I guess my understanding is wrong? Bt^2 = Bt*Bt ?
 
Yes, cumsum(...) is a Brownian motion, and taking an exponential gives a geometric Brownian motion. See en.wikipedia.org/wiki/Geometric_Brownian_motion
 
thank you for all your help!
So Bt^2 = BtBt ? This is correct?
 
6:02 AM
Right, so there is a quadratic variation of a Brownian motion, we write it usually as $\langle B \rangle_t$, and in fact it is true that $\langle B \rangle_t = t$. Of course, other processes have more complicated QV's, e.g. $\exp(W_t)$ has QV $\exp(2W_t)$.
Yes, $B_t^2 = B_t * B_t$. Note that this arises because literally we are taking the second derivative of $\log(x)$, which is just $1/x^2$ and plugging in $B_t$.
Also you should be careful: it is not generally true that $\Var(X_t) = \langle X \rangle_t$. In fact, if $X_t = \mu_t dt + \sigma_t dW_t$, then $\langle X \rangle_t$ is actually given by $\int_0^t \sigma_s^2 ds$.
 
Thank you so much!
If you have time, can you please elaborate on this? "If you would like, I can transcribe how to compute the derivative in the case of Xt=log(Bt)
, B0=1
and we work only on t<T
where T=min{t∣Bt=0}
. It turns out that a local version of Ito holds anyway."
 
Also re: another question in the post, the reason that Ito's lemma has the second derivative in it is because of the nonzero quadratic variation of Brownian motion. See the middle part of the answer that goes "As an aside..."
 
Can you please show me how to compute the derivative of " Xt=log(Bt)"?
 
Also I suppose we should be careful: when we say we are "computing the derivative" we aren't really computing a derivative. Everything is formalized as integrals, but d is shorter to type than $\int$ and you don't have to carry starting values, etc. so often we use the differential notation out of convience.
Yeah, if $f(x) = \log(x)$, then $f'(x) = 1/x$ and $f''(x) = -1/x^2$, so a modification of Ito's lemma gives that for $t < T$, $dX_t = f'(B_t)dB_t + 0.5 * f''(B_t)d \langle B \rangle_t = (1 / B_t) dB_t - (1 / 2 & B_t^2) dt$
The computation that you did was right: the issue is that you have to be careful to stop before $B_t = 0$ so you avoid taking $\log(0)$ and also to not mistake $B_t^2 = E[B_t^2] = \langle B \rangle_t = t$. The first quality is wrong, and the latter two are only true for Brownian motion.
This is the slight modification of Ito I mean, by the way.
Compare to the usual statement, which looks something like
Oh, also, there is another issue in your simulation that I probably should've fixed, but doesn't really matter for the purposes of the question: your indices are off by one: $dBt[1] = 0$, but it should be $Bt[1] - Bt[0] \neq 0$, yeah? If you fix this the difference between approaches 1 and 3 should be much smaller
In fact, they should be very close, since Ito is just a Taylor approximation in disguise: the proof of Ito is just to look at approach 1, take a Taylor expansion, and then take a limit. So 1 and 3 should be similar in numerical approximation.
Though not exactly the same, since the limit actually does change a decent amount.
 
6:31 AM
thank you so much for all this information! i really appreciate it!
I just keep struggling to understand the difference between the quadratic variation <Bt> and Bt^2 . Why is Bt^2 = Bt*Bt? can you please help me understand the difference?
 
B_t^2 is literally B_t * B_t, just like 5^2 = 5 * 5, or X^2 = X * X, or whatever. The quadratic variation is not related to B_t^2 directly, but rather (omitting some technical details) is $<B>_t = \sum_{i=1}^n (B_{t(i + 1)/n} - B_{ti / n})^2$.
Bt^2 arises from evaluating f''(x) = 1/x^2 at f''(B_t). So literally it should be B_t * B_t just as x^2 is x * x.
And similarly for whatever function you like: for example, log(Bt) is literally the logarithm, which is why it's not well defined when Bt = 0.
 
when does <Bt> come up? for example, suppose I am working on a derivative of a stochastic function or working on a stochastic integral. in what kinds of situations does the quadratic variation <Bt> arise?
 
The quadratic variation (QV) actually shows up everywhere. In particular, it shows up in Ito's lemma, but it is more fundamental than that
For now, lets look at Ito:
Ito states that the following is true (up to technical conditions)
so the part that is different from "standard calculus" is the part that involves the quadratic variation, d<X>_t
like, in standard calculus we would write something like the above but with the d<X>_t term omitted, right?
Morally speaking, for a semimartingale, the QV is like the gas in a car: the QV is constant exactly when the continuous martingale is constant.
And if you take any continuous martingale X_t and compute its QV, then B_{<X>_t}, e.g. a Brownian motion run at the time given by the quadratic variation, then B_{<X>_t} is identical in law to X_t
 
thank you so much! I think I finally understand it! Bt^2 is simply Bt*Bt ... whereas the QV (quadratic variation) is a complete different concept that is related to the square of consecutive differences of a Brownian Motion?
 
Yes.
 
6:45 AM
Nice analogy about the gas car! It reminds me of a joke: I need Monet to buy Degas to make the Van Goh!
 
Ok, good luck with the material; if you have more questions I can try to answer them later, but I'm off to do things that are not math.se for now :)
 
thank you so much! I was going to ask you about this new concept you just brought up ... semimartingales . I know martingales, but not semi-martingale
 
Semimartingales are (roughly) just a martingale + something of bounded variation (e.g. something smoother than martingales). X_t = mu * t + B_t is a semimartingale: the B_t is a martingale and mu * t is the other thing.
So semimartingales are just martingales + drift
They are not much harder to deal with than martingales, usually.
 

last day (15 days later) »