|
From: Sadruddin R. <sad...@gm...> - 2002-06-13 09:38:46
|
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-van= illa option in my portfolio, I may want that its NPV is directly linked to som= e 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 t= he >>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 |