Posted by
Luigi Ballabio-4 on
Jun 13, 2002; 4:10am
URL: http://quantlib.414.s1.nabble.com/Some-questions-tp10105p10112.html
At 11:37 AM 6/13/02 +0000, Sadruddin Rejeb wrote:
> > If it's for the sake of pricing stocks, we can just override
> > performCalculations in the Stock class to short-circuit the pricing
> > engine.
>Sure, but I was thinking of a generic pricer that would apply to all
>instruments directly quoted as prices. If for example, I have a plain-vanilla
>option in my portfolio, I may want that its NPV is directly linked to some
>market price.
Oh, ok, I see that. I agree.
> >>5)
> >>I would like some way to pass a Stock instance or one of its attributes as
> >>the underlying, in the construction of a VanillaOption instance.
> >>Of course, we could define the underlying to be an Instrument, but if the
> >>option is in fact an FX option, what do we do? Do we define Cash/Money to
> >> be an instrument?
> >
> >I'm not getting this, but then again, it's 11pm.
>
>What I meant is:
>If I have a Stock instance, and I want to define an option on it, how can I
>do this if I don't have access to the MarketElement linked to the stock
> price? What I was thinking is that we may want the underlying to be an
> instrument instead of a MarketElement.
And then call NPV() instead of value(). Yes, I agree.
>Then, I have other questions. Does the VanillaOption class refer to
>stock-options only, or is it supposed to include FX vanilla-options?
>And are we going to define another class for american options?
As for the American, one just has to pass an American engine to the
VanillaOption.
As for FX options, VanillaOption could be used if they take the same
parameters. However, I'm not sure that it wouldn't be better to
differentiate the two just for ease of understanding.
Thoughts?
Luigi