# 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. – S_H Feb 7 '11 at 17:17

1
@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

## 3 Answers

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:

• modeling your distribution accurately
• being able to randomly sample your distribution over the simulation in such as way as to have uniformly sampled on its cumulative probability function
• having a good random N dimensional number generator with period > total # of samples
• various tricks to reduce the required sample space
-

You can use Monte Carlo methods to generate paths.

-

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.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.948081910610199, "perplexity_flag": "head"}