A question on BlackProcess' constructor x0 argument
Posted by Lisa Ann on
URL: http://quantlib.414.s1.nabble.com/A-question-on-BlackProcess-constructor-x0-argument-tp16034.html
Hi all,
I am currently using BlackProcess to price options (both ITM and OTM) and I have a doubt about the x0 argument of the constructor: I've figured out it's the forward price of the security, because Black's model uses that to take into account e.g. implied dividend yield and in the end it uses risk free term structure to discount options' prices.
This is my snippet:
__________________________________________________________________
// ...
// Exercise
boost::shared_ptr< Exercise > europeanExercise(
new EuropeanExercise(maturity));
// Select underlying price according to maturity date
boost::shared_ptr< Quote > underlyingQ;
for(int i = 0; i < maturityArray_.size(); i++)
{
if(maturity == maturityArray_[i])
{
underlyingQ.reset(new SimpleQuote(forwardPrices[i]));
break;
}
}
if (!underlyingQ)
return -1.0; // Error?
Handle< Quote > underlyingH(underlyingQ);
// Bootstrap interest rates curve
Handle< YieldTermStructure > riskFreeTSH(riskFreeTS);
// Payoff
boost::shared_ptr< StrikedTypePayoff > payoff(
new PlainVanillaPayoff(type, strike));
// Process
boost::shared_ptr< BlackProcess > blackProcess(
new BlackProcess(underlyingH, riskFreeTSH, Handle< BlackVolTermStructure >(forwardVolSurface_)));
// Options
VanillaOption europeanOption(payoff, europeanExercise);
europeanOption.setPricingEngine(boost::shared_ptr< PricingEngine >(
new AnalyticEuropeanEngine(blackProcess)));
//...
__________________________________________________________________
maturityArray_ and forwardPrices are arrays of the same length that have forward dates and forward prices inside.
As you can see, underlyingQ is chosen from an array of forward prices by matching maturity date from maturityArray_ array, and then used in BlackProcess constructor as x0: is this correct? Or is x0 supposed to be the underlying spot price?