Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

Real QuantLib::GeneralizedBlackScholesProcess::drift ( Time  t,
Real  x 
) const [virtual, inherited]
Todo:
revise extrapolation

Implements QuantLib::StochasticProcess1D.

Reimplemented in QuantLib::ExtendedBlackScholesMertonProcess.

Definition at line 51 of file blackscholesprocess.cpp.

References QuantLib::Continuous, QuantLib::GeneralizedBlackScholesProcess::diffusion(), and QuantLib::NoFrequency.

                                                                   {
        Real sigma = diffusion(t,x);
        // we could be more anticipatory if we know the right dt
        // for which the drift will be used
        Time t1 = t + 0.0001;
        return riskFreeRate_->forwardRate(t,t1,Continuous,NoFrequency,true)
             - dividendYield_->forwardRate(t,t1,Continuous,NoFrequency,true)
             - 0.5 * sigma * sigma;
    }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index