Re: Adding a payoff function
Posted by
Nicolas Magnette on
URL: http://quantlib.414.s1.nabble.com/Adding-a-payoff-function-tp2939p2950.html
Actually not as I do not have any use for it.
En réponse à Luigi Ballabio
<
[hidden email]>:
> On 2004.05.19 11:20, Nicolas Magnette wrote:
> > Here is my modified payoff. I had to add a
> > funstion "eval" as I need the calculation of the
> > payoff to take more than one argument and this is
> > impossible with the operator which is standard for
all
> > payoffs.
> >
> > class MyPayoff : public StrikedTypePayoff {
> > public:
> > MyPayoff(...)
> > : ... {}
> > double operator()(double price) const;
> > double eval(double price, Time
time_elapsed) const;
> > ...
> > private:
> > ...
> > };
> >
> > inline double MyPayoff::eval(double price, Time
> > time_elapsed) const {
> > ...
> > }
>
> Nicolas,
> besides declaring it, did you actually define
operator()
> somewhere?
>
> Later,
> Luigi
>