Using SVD Least Squares in Longstaff–Schwartz Regression
Summary
The document concerns a numerical issue in the Longstaff–Schwartz least-squares Monte Carlo method for valuing early-exercise options. At each exercise date, the continuation value is estimated by regressing future cash flows on basis functions using only paths that are in the money. The question describes forming regression coefficients with the normal-equation expression involving the inverse of the design matrix cross-product. When too few paths are in the money, that matrix can be singular, so the inverse does not exist.
The answer recommends solving the linear least-squares problem with singular value decomposition (SVD), citing a standard numerical least-squares routine as an example. SVD handles rank-deficient or underdetermined systems more robustly than explicitly inverting the cross-product matrix. The post does not compare alternative basis choices, regularization, or fallback rules when there is only one in-the-money path, so it offers a numerical remedy rather than a full policy for sparse regression samples.
Key ideas
- Longstaff–Schwartz estimates continuation values by regression on in-the-money paths.
- The normal-equation inverse can fail when the regression matrix is singular.
- SVD provides a least-squares solution without directly inverting the cross-product matrix.
- Sparse in-the-money samples can leave basis selection and regression reliability unresolved.
- The answer offers a numerical technique but no worked example or comparison of alternatives.
Tags
Full text
# Least Square Monte Carlo Longstaff-Schwartz method implementation problem
# Least Square Monte Carlo Longstaff-Schwartz method implementation problem
While trying to implement the Least Square Monte Carlo (LSMC) method by Longstaff-Schwartz I came across an error I am not quite sure how to fix.
The method uses a regression method (be it Multiple linear or Polynomial regression) to find the continuation value. In my solution I use matrix multiplication to find the coefficients with which to find the continuation value for all the paths in the money. However I discovered that if only 1 or 2 paths are in the money and since we only use the paths in the money to find the coefficients for the continuation values then my method can not find the coefficients. This is because I would get matrix's which have a determinant of 0. And the formula for finding the coefficients is: \begin{equation} b = (X'X)^{-1} X'Y. \end{equation} And since a matrix with a determinant of 0 can't have an inverse, my implementation won't work.
$\textbf{The solution I found in case of 2 paths:}$
In my multiple linear regression I used $(1, x, x^2)$ as my $X$ matrix and in order to fix the problem I went from 3 variables to two which meant that my $X$ matrix now consisted of $(1,x)$.
$\textbf{The problem}$
What do I do when only a single path is in the money? How do I find a continuation value?
## Answer by Antoine Conze (score 0, accepted)
https://quant.stackexchange.com/a/63615
Use Singular Value Decomposition to solve for the linear least squares problem in the regression. See for instance numpy.linalg.lstsq in python.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.