# Confusion about second partial derivative term in Ito's lemma with a constraint on the variables

Currently I am getting stuck with the stochastic process followed by forward stock prices:

Here's the rough background:

If we assume $S$ is a ito process satisfies that

$$dS = \mu S dt + \sigma SdW_{t}$$

where $S$ stands for the stock price and $W_t$ is the wiener process.

And we define $f$ with

$$f(S,t)=Se^{r(T-t)}$$

According to the Ito's lemma:

$$df=\frac{\partial f}{\partial t} dt+ \frac{\partial f}{\partial S} dS+\frac{1}{2}\frac{\partial^2 f}{\partial S^2} {(dS)}^2$$

So to get the $df$, we need $$\frac{\partial f}{\partial t} , \quad \frac{\partial f}{\partial S} \quad and\quad \frac{\partial^2 f}{\partial S^2}$$

Let us consider the term $$\frac{\partial f}{\partial S}$$

According to the content on page-23 in textbook (thanks to @m_gnacik),

$$\frac{\partial f}{\partial S} = e^{r(T-t)}$$

which implies that $S$ is independent to $t$ and that textbook solves this partial derivative with considering $S$ as a constant number relative to $t$.

But in my opinion, due to the assumption that

$$dS = \mu S dt + \sigma SdW_{t}$$

there's obvious some connection between $S$ and $t$, so there should be a function to describe this relation. So at least

$$S \quad is \quad independent \quad of \quad t$$

is not that intuitive to me...

I am so confused... Am I missing something here?

LAST UPDATE:

This question is similar to this one

• Clearly, $(S_t)$ is a stochastic process collection of random variables. For a fixed $t$, $S_t$ is a random variable it clearly depends on $t$. However, to apply Ito's lemma we take any $C^2$ function of two variables $g(x,t)$ (as written below) and then we use the formula at the end evaluating the derivatives at $(S_t, t)$. Is that clear now? I never wrote that $S_t$ is independent of $t$, you are clearly confused. Try to read everything once again. – m_gnacik Apr 26 '17 at 14:48

I will try to explain what have you missed. Let me start with a notation given a differentiable function of two variables, e.g. $f(x,t)$, the notation $$\frac{\partial f}{\partial t}(x_0, t_0) \ \ \mbox{ for some } x_0 \mbox{ and } t_0$$ stands for the partial derivative of $f$ with respect to $t$ evaluated at the point $(x_0, t_0)$.

Given your Ito process $$dS_t = \mu S_t dt + \sigma S_t dW_t,$$ you consider a nice smooth function of two variables $f(x,t) = xe^{r(T-t)}$, where $T \geq 0$ and $r \in \mathbb{R}$. In order to apply Ito's lemma you need to find $$\frac{\partial f}{\partial t}, \ \frac{\partial f}{\partial x}, \ \frac{\partial^2 f}{\partial x^2}.$$ After you find those then you apply Ito's lemma, that is, $$df(S_t, t) = \frac{\partial f}{\partial t}(S_t, t)dt + \frac{\partial f}{\partial x}(S_t,t)dS_t + \frac{1}{2}\frac{\partial^2 f}{\partial x^2}(S_t, t)(dS_t)^2.$$

Since, we know the term $dS_t$ and from Ito's table we have that $(dS_t)^2 = \sigma^2 S_t^2 dt$ we obtain that

\begin{align*} df(S_t, t) =& \frac{\partial f}{\partial t}(S_t, t)dt + \frac{\partial f}{\partial x}(S_t,t)\left( \mu S_t dt + \sigma S_t dW_t\right) + \frac{1}{2}\frac{\partial^2 f}{\partial x^2}(S_t, t)\sigma^2 S_t^2 dt, \\ df(S_t, t) =& \left(\frac{\partial f}{\partial t}(S_t, t) + \mu S_t\frac{\partial f}{\partial x}(S_t,t)+ \frac{1}{2}\sigma^2S_t^2\frac{\partial^2 f}{\partial x^2}(S_t, t) \right) dt + \sigma S_t \frac{\partial f}{\partial x}(S_t,t)dW_t. \end{align*}

Therefore, because you evaluate partial derivatives at fixed point $(S_t(\omega), t)$ (for our convenience we often abuse the notation, that is, $S_t$ stands for $S_t(\omega)$ ), then there is no dependence on $t$ while you differentiate with respect to $x$. Sometimes you can find the expression $\frac{\partial f}{\partial S}$ which is the notation for $\frac{\partial f}{\partial x}(S_t,t)$, but as you noticed it may be confusing.

The last thing: $$\frac{\partial f}{\partial t} (x,t)= -rxe^{r(T-t)}$$ not $e^{r(T-t)}$.

Update. It appeared that the confusion of the author of the question came from lack of understanding partial derivatives rather than stochastic tools used in Ito's calculus. There are some examples in the below comments in which I tried to explain @AoSun doubts about partial differentiation.

• Again, in your question there is no relation, this is why I used letter $x$ to picture it. Example take a function of two variables $g(x,t)=xt$, there is no dependence between $t$ and $x$ so now you can differentiate it with respect to any variable that you want to. Say $\frac{\partial g}{\partial t}(x,t) =x$, now we can take a sample path of $(S_t)$ at time $t$, say $S_t$ and evaluate this derivative at point $(S_t, t)$ to obtain $\frac{\partial g}{\partial t}(S_t,t) =S_t$. Writing $\frac{\partial S_t}{\partial t}$ does not make sense, BM $(W_t)$ is not differentiable at any point. – m_gnacik Apr 26 '17 at 14:43
• Take a simple example, define $g(x,t) = xt$ now differentiate it with respect to $t$, $\frac{\partial g}{\partial t}(x,t) = x$. Now take a function of $t$ say $h(t) = t^2+5$ then $\frac{\partial g}{\partial t}(h(t),t) = t^2+5$. Does this contradict to you as well? The same idea is used in the Ito's lemma you have a function of two variables (not one) then you differentiate it an evaluate at the end. – m_gnacik Apr 26 '17 at 15:00
• No, you are not correct. First we differentiate $g$ with respect to $t$ and then we evaluate at a fixed point. So $\frac{\partial g}{\partial t} (x,t)= x$, right? now fix a point $t_0$ and take a function $h(t) = t^2+5$. We have already done the differentiation, now we want to just evaluate it at the point $(h(t_0), t_0)$, so $\frac{\partial g}{\partial t}(h(t_0), t_0) = h(t_0)$. This is why you are confused, it is the notation problem. – m_gnacik Apr 26 '17 at 15:09
• Another example, say that we would like to evaluate our derivative at a point $(4,3)$ then we have $\frac{\partial g}{\partial t} (4,3) = \left.x \right|_{x=4, t=3} = 4$, according to your reasoning we would get $0$. Notation $\frac{\partial g}{\partial t} (x_0, t_0) = g_t(x_0, t_0)$ if you familiar with the latter one. – m_gnacik Apr 26 '17 at 15:18
• Do you know what evaluating means? I really recommend to come back to ordinary calculus, before starting the stochastic one, and I'm not being mean. The example above is independent from the previous one there was no $h$. Another example take $z(s,t) = s^2 + t$ then $\frac{\partial z}{\partial s} (s,t) = 2s$ in different notation $z_s (s,t) = 2s$. Now we would like to evaluate this derivative at point $(3,2)$ then $\frac{\partial z}{\partial s} (3,2) = z_s(3,2) = 6$. – m_gnacik Apr 26 '17 at 15:30