Posted by
Sadruddin Rejeb-3 on
Jun 11, 2002; 3:43pm
URL: http://quantlib.414.s1.nabble.com/Some-questions-tp10105.html
Hello guys,
Since there's a big refactoring going on, I'd like to share a few ideas that
have occured to me this afternoon in the train, while browsing the source.
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.
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.
3)
Define a generic MarketPricingEngine that just returns the value of a market
element.
4)
How do we know in which currency the NPV is given? Instruments should have a
currency method...
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?
Thanks for reading all this,
Sad.
--
---\ Sadruddin Rejeb \-----
----\ +4179 200 58 36 \----
-----\
[hidden email] \---