Re: Multi-asset options
Posted by Ferdinando M. Ametrano-3 on
URL: http://quantlib.414.s1.nabble.com/Multi-asset-options-tp2771p2780.html
Hi Wujiang
>template<class D, int N>
>class Payoff
>{
>public:
> virtual ~Payoff() {}
> virtual double operator()(D t, const State<N> & s) const = 0;
> virtual double operator()(D t, const Path<D, N>& p) const = 0;
in the current QuantLib design Payoff just encapsulate max(S-K, 0),
max(K-S,0), etc
The operator()(D t, const Path<D, N>& p) is similar to the PathPricer
interface double operator()(Path), and I wouldn't favour the mixing of the
payoff/pathpricer concept until I understand which benefit we would obtain.
In the current framework a PathPricer takes care to calculate for each Path
(single or multi-asset) the double referenceValue that Payoff::operator()
requires as input
ciao -- Nando