|
From: <fho...@gm...> - 2007-11-05 20:47:26
|
Hi Luigi! I've thought a bit about changing the discretization scheme for a StochasticProcess1D at least. I think one should define a new abstract = class Discretization outside of StochasticProcess(1D) which should carry the framework of a general discretization scheme and could inherit to = derived classes such as a new EulerDiscretization. Also StochasticProcess(1D)::evolve has a very specific form which could be a property of the (Euler)Discretization and not the process itself. As one = can easily see from the code, ::expectation, ::stdDeviation, ::variance only carry over objects from the discretization method which suggests this to = be taken out to a new class which could show a more general behavior = (Milstein, integrating var, predictor corrector, Runge-Kutta, ...). Could that make sense? Regards Frank > -----Urspr=FCngliche Nachricht----- > Von: Luigi Ballabio [mailto:lui...@gm...]=20 > Gesendet: Freitag, 2. November 2007 17:17 > An: fho...@gm... > Cc: qua...@li...;=20 > qua...@li... > Betreff: Re: [Quantlib-users] MakeMCEuropeanEngine<PseudoRandom> >=20 >=20 >=20 > Hi Frank, >=20 > On Thu, 2007-11-01 at 22:12 +0100, Frank H=F6vermann wrote: > > When I change the value which is passed to .withTimeSteps starting=20 > > from 1 to, say, 5 in the case of non-flat vol term=20 > structure (but flat > > skew) which is defined by 5 points on the time scale, the value 1=20 > > results in a plain vanilla call option's value which corresponds to=20 > > the start vol (all else being equal). Increasing the number of time=20 > > steps the option's value seems to approach the value of the closed=20 > > form solution where the speed of convergence depends on the=20 > particular=20 > > shape of the term structure in the neighborhood of maturity. > > =20 > > I would expect, especially in the case of one time step for=20 > this plain=20 > > vanilla call, the vol to be taken as the terminal vol not=20 > the initial=20 > > one. Am I wrong? >=20 > No, you're right. The problem is in the way that the=20 > Black-Scholes stochastic process is discretized. By default,=20 > it uses Euler discretization, which at each step simply takes=20 > the initial value (see > <ql/processes/eulerdiscretization.cpp>.) You can obtain the=20 > behavior you want by defining another discretization (you can=20 > do it by cloning the Euler code and modify it) that takes the=20 > terminal value. Once you have implemented it, you can pass it=20 > to the BlackScholesProcess constructor so that it overrides=20 > the default behavior. If you want, you can implement more=20 > refined behaviors, too (such as integrating the variance, or=20 > using some predictor-corrector algorithm.) >=20 > Luigi >=20 > P.S. If you implement the new class and want to contribute=20 > it, I'll be glad to add it to the library. >=20 >=20 >=20 > --=20 >=20 > The nice thing about standards is that there are so many of them to=20 > choose from.=20 > -- Andrew S. Tanenbaum=20 >=20 |