Login  Register

Re: Some questions

Posted by Luigi Ballabio-4 on Jun 12, 2002; 3:05pm
URL: http://quantlib.414.s1.nabble.com/Some-questions-tp10105p10106.html

Hi Sad,

At 1:44 AM +0200 6/12/02, Sadruddin Rejeb wrote:
>1)
>In vanilla option:
>we should not input a volatility. It should be the pricer that has a Black
>model (a volatility) as an input... the volatility is part of the model, not
>of  the instrument, IMHO.

Kind of makes sense. Even though only exercise date, strike and type
are really part of the instrument---the yield term structure could be
considered part of the model too, and the current underlying price is
a market datum. People?

Also,
s/a volatility/a volatility term structure/
(and let's see how many people blink at the above :)


>2)
>Why not have a single instrument class, that would be nearly the same as the
>present Option class? Stocks and swaps could then be priced with appropriate
>pricing engines (see 3))... A swap, for example, could be priced on two
>different term structures (Andre had to add a method to do this), or priced
>with finite-difference methods for didactical purposes.

Good thinking. We can just give Instrument::performCalculation the
implementation currently in Option.


>3)
>Define a generic MarketPricingEngine that just returns the value of a market
>element.

If it's for the sake of pricing stocks, we can just override
performCalculations in the Stock class to short-circuit the pricing
engine.


>4)
>How do we know in which currency the NPV is given? Instruments should have a
>currency method...

Or maybe a Money structure could be returned with an amount and a currency.
The same could hold for nominals and prices. But I'm not sure about this.
Anyway, I agree that the problem exists.


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

Bye for now,
                Luigi