Posted by
Neil P Firth on
URL: http://quantlib.414.s1.nabble.com/Adding-a-payoff-function-tp2939p2944.html
On Wed, 26 May 2004, Luigi Ballabio wrote:
> On 2004.05.19 14:50, Daniel J. Duffy wrote:
> > I am not familiar with pattern Path; it is not a GOF pattern.
>
On the subject of patterns I'd recommend Pattern-Oriented Software
Architecture vols I and II and www.eaipatterns.com is worth a look too.
> Hi,
> I think he meant that since payoffs can be path-dependent,
> Payoff::operator() should be allowed to take a path, too.
> At ths time, our take is that e.g., instead of writing
>
> AveragePricePayoff payoff(Call, strike);
> p = payoff(path);
>
> one is probably better off writing
>
> PlainVanillaPayoff payoff(Call, strike);
> p = payoff(averagePrice(path));
>
> which has the merit of separating the two concerns of averaging and
> calculating the payoff.
>
This is what I have been doing in the basket option payoffs that I have
been working on.
> The fact that a payoff could be intrinsically dependent on time is
> another matter, though. Maybe we should augment the signature of
> Payoff::operator() to take a time argument as well...
>
In Monte Carlo regression methods to calculate American option prices it
is necessary to regress on time dependent basis functions. e.g.
\psi_{i} (X_i) where i indicates time, X_i represents the d asset
prices at time i, and \psi_{i} is a function from R^d -> R.
One thing that I have been thinking about is how to cleanly design MC
algorithms that follow the pattern:
: Generate paths forward through time
: Regress rolling backwards through time (e.g. LSMC estimator)
: Generate independent paths
: Generate low and high biased estimates proceeding forwards through time
Any ideas welcome!
Neil