# What's a good numerical/optimization software package for solving the 2-D optimal stopping problem?

I am looking for a numerical software package to help me solve the 2-dimensional "free boundary" PDEs that arise in optimal stopping problems. In one dimension a standard optimal stopping problem in Economics is when to exercise an expansion option. In the end, solving this problem comes down to solving the following ODE

$$\mu x u' + \frac{1}{2}\sigma^2 x^2 u'' + x k_0= r u$$ such that \begin{eqnarray} u(0) & =& 0 \\ u(\overline{x}) & =& \frac{\overline{x}k_1}{r-\mu} - p\\ u'(\overline{x}) & = & \frac{k_1}{r-\mu}. \end{eqnarray} A solution to this problem is a function $u$ together with the location of the boundary $\overline{x}$ - this is the so called "free boundary". This problem has a closed form solution. In two dimensions, the problem no longer has a closed form solution. The problem I want to solve is $$x k_0 + \mu x \frac{\partial u}{\partial x}+ rw\frac{\partial u}{\partial w} + \frac{1}{2} x^2 \left(\sigma_x^2\frac{\partial^2 u}{\partial x^2} + \sigma_w^2 \frac{\partial^2 u}{\partial w^2} + 2\sigma_x\sigma_w \frac{\partial^2 u}{\partial x\partial w}\right) = r u$$ such that \begin{eqnarray} u(0,w) & = & 0\\ u(\overline{x}(w),w) & = & v(\overline{x}(w),w) - p \\ \frac{\partial}{\partial x}u(\overline{x}(w),w) & = & \frac{\partial}{\partial x}v(\overline{x}(w),w) \\ u(x,0) &= & \ell x \\ \frac{\partial}{\partial w}u(x,\overline{w}) & = & -1 \\ \frac{\partial^2}{\partial w^2}u(x,\overline{w}) & = & 0 \\ \end{eqnarray}

where $v$ is some known function of $x$ and $w$. The solution of this problem will then be a function $u$ together with functions $\overline{x}(w)$ and $\overline{w}(x)$ that give the locations of the boundaries.

Do you know of any software packages that can solve these free boundary problems? If so, can someone point me towards a reference or tutorial that might help?

-

Hi Prof. Glaser, welcome to scicomp, and nice meeting you on the bus to the airport!  I don't think you want OpenFOAM for this, but I'm not actually sure what the appropriate solver is.  I'm going to reframe your question a little so that it gets more attention, feel free to revert or fix any edits I make. – Aron Ahmadia Sep 18 '12 at 18:50
Hi Aron, it was good to meet you too.  Thanks so much for your help with the question! – Barney Hartman-Glaser Sep 19 '12 at 1:11
{"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": 8, "mathjax_display_tex": 2, "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.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "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.8871250152587891, "perplexity_flag": "head"}