Skip to content
All library documents

Simulating Conditional Expectations Along a Stochastic Process

Article Quant Q&A · Author: Grzenio

Summary

The document considers a diffusion process and the conditional expectation of a terminal payoff given the process’s current state. The goal is to simulate this expectation along sample paths so that its path can be checked for a barrier crossing. The question contrasts solving a Feynman–Kac equation numerically with regression methods associated with Longstaff–Schwartz, and points out that nested Monte Carlo at every path and time step may be expensive.

The accepted answer proposes estimating the conditional expectation at a given state by simulating independent realizations of the process from that state to the terminal time and averaging the resulting payoffs. It invokes the law of large numbers for convergence and the central limit theorem for confidence intervals. This is a general estimator, especially relevant in high dimensions, but it does not remove the cost of repeated simulations. The answer also does not address how estimation error affects the timing of barrier hits along a discretized path.

Key ideas

  • The target process is a conditional expectation of a terminal payoff given the current state.
  • Independent terminal simulations from the current state can estimate that expectation by averaging payoffs.
  • The law of large numbers supports convergence of the Monte Carlo estimate.
  • The central limit theorem can be used to form a confidence interval.
  • Repeated nested simulations can be costly, and barrier timing remains sensitive to estimation and time-step error.

Tags

Full text
# Simulating conditional expectations


# Simulating conditional expectations












There is a multidimensional process X defined via its SDE (we can assume that its a diffusion type process), and lets define another process by $g_t = E[G(X_T)|X_t]$ for $t\leq T$.

I would like to simulate process $g_t$, i.e. discretize to use in a Monte-Carlo simulation. What is the best way to do it?

The two approaches I can think of is (i) use Feynman-Kac and Finite Differeces to get $g_t$ as a function of $X$ and $t$, simulate $X_t$ and calculate $g_t$ (ii) use some form of Longstaff-Schwarz algorithm

Is there any better/simpler method?

EDIT: I think I was not clear enough with my question. I am trying to estimate a stopping time when the process $g_t$ hits a given barrier $b$, so in order to do that I need to simulate the whole path of $g_t$. It is easy to simulate $X_t$ for any time t, but then to get $g_t|X_t$ I would need to run another monte carlo (within the monte carlo) for every path and every time step of the original monte carlo, which is probably going to take too much time. Longstaff-Schwarz algorithm is used for american options exactly because of this reason - to use a quick heuristic instead of nested monte carlo simulations...

EDIT 2: Let me include some pseudo-code

```
for(int i=0; i<NoRuns; ++i)
{
  X_t = initial value;
  g_t = g(0, X_t); //TODO - how to calculate g_t?
  t=0;
  for(int j=0; j<NoSteps; ++j)
  {
    t+=dt;
    X_t = move X_t by dt, using e.g. Euler scheme
    g_t = g(t, X_t); //TODO - how to calculate g_t?
    if (g_t<= barrier) report(t, X_t, g_t);
  }
}
```

The bits I am not sure how to implement are the lines:

```
g_t = g(0, X_t); //TODO - how to calculate g_t?
```

## Answer by TheBridge (score 5, accepted)

https://quant.stackexchange.com/a/2637

If you can simulate $N$ times independent realisations of $X_T|X_t$ then SLLN says that : $\tilde{g}^N_t=\sum_{i=1}^N\frac{1}{N}G(X_T)|X_t\to \mathbb{E}[G(X_T)|X_t]$ almost surely this is classical and often the only way to get $\mathbb{E}[G(X_T)|X_t]$ for high dimensional process $X$. You can even use CLT to get a confidence interval for $\tilde{g}_t$

Regards

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.