# Solving Path Integral Problem in Quantitative Finance using Computer

I've asked this question here at Physics SE, but I figured that some parts would be more appropriate to ask here. So I'm rephrasing the question again.

We know that for option value calculation, path integral is one way to solve it. But the solution I get from the Black-Scholes formula (derived from the above question):

$$\begin{array}{rcl}\mathbb{E}\left[ F(e^{x_T})|x(t)=x \right] & = & \int_{-\infty}^{+\infty} F(e^{x_T}) p(x_T|x(t)=x) dx_T \\ & = & \int_{-\infty}^{+\infty} F(e^{x_T}) \int_{\tilde{x}(t)=x}^{\tilde{x}(T)=x_T} p(x_T|\tilde{x}(\tilde{t})) p(\tilde{x}(\tilde{t})|x(t)=x) d\tilde{x}(\tilde{t}) dx_T \end{array}$$

is very cryptic and simply unusable on a computer.

My question is, how can we program this solution? Or more generally, how can we devise computer algorithms to solve path integral problem in quantitative finance?

• Not to disregard this question as unrelated, but I'd suggest that you could find answer on how to code this on stackoverflow.com. Just a suggestion. – user98 Feb 7 '11 at 17:17
• @Harpreet, not to sure whether it's suitable for SO. The current form of solution of path integral, as it stands, is not codable on a computer. – Graviton Feb 8 '11 at 0:30

There are many numerical approaches to solving stochastic integrals such as the above. Assuming that there is no closed form slight-of-hand, the easiest approach is the Monte Carlo approach. I would recommend referring to Glasserman's excellent "Monte Carlo Methods in Financial Engineering"

If you are not familiar with MC, think of it as evaluating millions of possible paths in N dimensional space (the space of your random variable x time) and computing the expectation from a probability weighted average.

Making MC work for you involves:

It seems to me that you are making the problem more complicated than it is in fact. What is the process $X_t$ and what is the motivation to find this expectation as a path integral? If you would like to find the value of integral on the trajectory of the diffusion process I think it is undefined.