Least Square Monte Carlo

Posted by Neil P Firth on
URL: http://quantlib.414.s1.nabble.com/Least-Square-Monte-Carlo-tp2617.html

Hi,

I've done a first cut for a one dimensional least squares monte carlo
implementation and have a few questions before checking anything in:

1. I cannot see an implementation of the overloaded operator std::cout <<
for the Matrix class. dataformatters.cpp has the overload for Array, but
Matrix is in ql/Math/ leading to the unpleasant include ql/math/matrix.hpp
Are there any other formatter utilities. Does anyone strongly object to
checking it in as is?

2. To implement the Singular Value Decomposition (SVD) for the least
squares I have adapted the TNT / JAMA library
http://math.nist.gov/tnt/
which is in the public domain. Any objections to checking this in?

3. For the function abs() there is QL_FABS in qldefines.hpp. What is the
recommend macro, etc for max and min?

4. I am going to add an AmericanOption example to the source tree.

Let me know what you think.

Cheers,
Neil

---------------------------------------------------
  Neil Firth
  Brasenose College Oxford OX1 4AJ United Kingdom
  Office: 01865 280616
  [hidden email]
  http://www.maths.ox.ac.uk/~firth
---------------------------------------------------