questions about pricing American Option in MC method

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

questions about pricing American Option in MC method

kangyin ye
Hi guys,


I found that the QuantLib MCAmericanEngine implement has a little different from the reference paper 
"Valuing American Options by Simulation: A Simple Least-Squares Approach". 

In AmericanPathPricer constructor, except the parabolic function a+bX+cX*X, the payoff function is also 
incorperated into basis function. I guess the author assume the additional one improves the accuracy of 
fitting the conditional expectation. 

Can anyone give more info about the consideration of adding payoff function. Thanks in advance!
ky


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: questions about pricing American Option in MC method

Kakhkhor Abdijalilov
The payoff function always included into the basis system, even into
monomial system. Yes, including the payoff might improve the accuracy.
Even if the effect negligible, it doesn't hurt anything. Any
collinearity in the basis is taken care off by SVD.

Note to the developers:
I was looking into the file  longstaffschwartzpathpricer.hpp and
noticed that moving vectors x and out of the for loop will avoid
re-allocation.

//--------------Original Code -----
for (Size i=len-2; i>0; --i) {
    std::vector<Real>      y;
    std::vector<StateType> x;

//------------Replace with this ----
std::vector<Real>      y;
std::vector<StateType> x;
for (Size i=len-2; i>0; --i) {
    y.clear();
    x.clear();
//---------------------------------------

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: questions about pricing American Option in MC method

Luigi Ballabio
On Tue, 2010-09-07 at 14:09 -0500, Kakhkhor Abdijalilov wrote:
> Note to the developers:
> I was looking into the file  longstaffschwartzpathpricer.hpp and
> noticed that moving vectors x and out of the for loop will avoid
> re-allocation.

Right, I'll do that.

Luigi


--

Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users