# Numerically stable method for estimating $\partial_t \mathbb{E}[f(X_t)]$ where $X_t$ is an n-dim Ito process and $f:\mathbb{R}^n\rightarrow\mathbb{R}$

Assume $$(X_t)_{t\geq 0}$$ follows an SDE of the form: $$dX_t = a(t, X_t) dt + b(t, X_t) dW_t$$ where $$W$$ is a standard $$n$$-dimensional Brownian motion, $$a$$ and $$b$$ are mappings from $$\mathbb{R}_+\times\mathbb{R}^n$$ to respectively $$\mathbb{R}^n$$ and $$\mathcal{M}_{\mathbb{R}}(n,n)$$ with all the usual regularity conditions, and $$X_0=x_0$$ for some deterministic $$x_0\in\mathbb{R}^n$$.

Now let $$f$$ be a mapping from $$\mathbb{R}^n$$ to $$\mathbb{R}$$. Assume we are interested in the sensitivity of $$\mathbb{E}[f(X_t)]$$ with respect to time ($$f$$ could be seen as a European payoff function and $$X_t$$ the value of the risk factors vector at maturity $$t$$), ie we want to compute $$\partial_t \mathbb{E}[f(X_t)]$$.

If we proceed via Monte-Carlo and a time-discretized scheme for our SDE (for example an Euler-Maruyama), how would one estimate the derivative with respect to time in a numerically stable way?

Assume $$(\hat{X}_i)_{i\geq 0}$$ is a time-discretized approximation of $$X$$ at discrete time-steps $$0=t_0 < \dots < t_i = i h < \dots$$ where $$h>0$$ is a constant step size. Then I see the following ways to approximate our differential (assuming $$f$$ is differentiable):

• estimate $$\frac{1}{h}\mathbb{E}[f(\hat{X}_{\lfloor\frac{t}{h}\rfloor})-f(\hat{X}_{\lfloor\frac{t}{h}\rfloor-1})]$$ (ie look at the whole pricing function as a black box);
• or estimate $$\frac{1}{h}\mathbb{E}[(\hat{X}_{\lfloor\frac{t}{h}\rfloor}-\hat{X}_{\lfloor\frac{t}{h}\rfloor-1})^{\top} \nabla f(\hat{X}_{\lfloor\frac{t}{h}\rfloor})]$$ (sort of a path-wise chain rule).

Unfortunately in both cases the resulting Monte-Carlo approximations have extremely high variance (I do use variance reduction techniques like common random numbers and antithetic variables, they only help marginally). Even in basic examples like a call price in a Black-Scholes with modest volatility ($$30\%$$) and even millions of paths, especially for small $$h$$ (I do take care to do everything in double precision to avoid round-off errors in the finite differences), when compared to sensitivities with respect to other diffusion parameters. For instance, the estimator of the sensitivity I get in both cases has a standard deviation that is of the order (or even bigger) of the ground truth value itself, meaning it's literally garbage.

Are there references about the calculation & numerical issues of the sensitivity with respect to time of value/price functions like the one introduced here using a time-discretization scheme for the SDE and Monte-Carlo simulations (no PDE based approaches)?

I would recommend to have a look at: https://www.youtube.com/channel/UC9RbRnYPhO9lpiY-6wWNHWg

It is quite long but worth it. It covers exactly the topic you are looking for.