Login  Register

Re: some questions

Posted by Sadruddin Rejeb-3 on Jun 13, 2002; 3:39am
URL: http://quantlib.414.s1.nabble.com/Some-questions-tp10105p10111.html

Hi Luigi,

> 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.

>>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.
>Would you pseudo-code an example? A couple of constructors, for instance?

Yeah, I agree it's not crystal-clear. It may even be completly naive.
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.

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?

Later,
Sad