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?