[R-SIG-Finance] Financial Basket Options
Moshe Olshansky
m_olshansky at yahoo.com
Mon Jan 28 12:24:36 CET 2008
Hi everyone,
As promised I am enclosing my implementation of
Longstaff-Schwartz algorithm for valuation of
(American) Basket option by Monte Carlo.
Let me note that this is a very preliminary attempt
and I am posting this just in case it may be useful to
some people. It is in no way even close to production
quality code.
I do not check for error conditions; polynomial
regression is implemented using all degree 3
polynomials in all the variables etc.
Feel free to ask me any question about the code (but
do not expect me to defend it...).
The code consists of 4 files (3 of which could have
been united into one file): AmericanBasket.R (code for
American Basket option), EuropeanBasket.R (code for
European Basket option), SomePayoffs.R (an example of
two simplest payoffs) and Read.Me (some explanations).
Let me note that current implementation is not
suitable for path-dependent options.
Best regards,
Moshe.
--- Moshe Olshansky <m_olshansky at yahoo.com> wrote:
> Hi Michel,
>
> European option (either put or call) is a much
> easier
> task than the American one since the optimal
> strategy
> is known (and trivial).
> Are any dividends expected before maturity? Are they
> fixed amount (usually the case when the maturity
> date
> is not too far away) or a known dividend yield?
> If you wish I can send you this code as well.
>
> I will try to slightly clean up my code during the
> weekend and then I will send it to anyone
> interested.
>
> Regards,
>
> Moshe.
>
> --- MAB <MichelBeck at sbcglobal.Net> wrote:
>
> > Moshe Olshansky <m_olshansky <at> yahoo.com>
> writes:
> >
> > >
> > > Hi Michel,
> > >
> > > I wrote an R code implementing
> Longstaff-Schwartz
> > > algorithm for pricing American put Basket option
> > (on
> > > the portfolio value). This code can be easily
> > changed
> > > to value call option (I intend to allow for
> "any"
> > > payoff function in the future).
> > > I can send you this code. It is in a very
> > preliminary
> > > state, so even though I did some basic testing I
> > can
> > > not guarantee it to be correct.
> > >
> > > Regards,
> > >
> > > Moshe.
> > >
> > > --- MAB <MichelBeck <at> sbcglobal.Net> wrote:
> > >
> >
> > >
> > >
> > Hi Moshe,
> >
> > Thanks for your reply.
> >
> > Yes, I would appreciate getting the code, although
> > I'm not sure I am able to
> > convert it to valuing call options (European call
> is
> > what I'm looking at).
> >
> > Regards,
> >
> > Michel
> >
> > _______________________________________________
> > R-SIG-Finance at stat.math.ethz.ch mailing list
> >
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
> >
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AmericanBasket.R
Type: application/octet-stream
Size: 1704 bytes
Desc: 735043657-AmericanBasket.R
Url : https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080128/b719483a/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EuropeanBasket.R
Type: application/octet-stream
Size: 1333 bytes
Desc: 1099661355-EuropeanBasket.R
Url : https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080128/b719483a/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SomePayoffs.R
Type: application/octet-stream
Size: 121 bytes
Desc: 583653873-SomePayoffs.R
Url : https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080128/b719483a/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Read.Me
Type: application/octet-stream
Size: 1524 bytes
Desc: 3319012510-Read.Me
Url : https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20080128/b719483a/attachment-0003.obj
More information about the R-SIG-Finance
mailing list