|
From: Luigi B. <lui...@gm...> - 2010-11-30 14:59:30
|
On Mon, 2010-11-29 at 20:15 +0100, Andreas Spengler wrote: > Am 29.11.2010 17:16, schrieb Luigi Ballabio: > > > Hmm. I'm not sure I would do that. For one thing, even when using the > > Black-Scholes model, one might want to use a different curve for the > > discount; asking the process for the risk-free rate would prevent that. > > Furthermore, I'm not sure that a riskFreeRate method belongs to the > > generic StochasticProcess interface. > > I second that, however I found another problem with using the > GeometricBrownianMotionProcess as is: it inherits an otherwise empty > time(const Date&) method from StochasticProcess which simply QL_FAILs... Right---the date/time conversion. Hmm. For the time being, you might have the process take a DayCounter and a referenceDate, and implement time() in terms of those. Sigh. We'll have to rethink this stuff one day... Luigi -- Better to have an approximate answer to the right question than a precise answer to the wrong question. -- John Tukey as quoted by John Chambers |