A question on BlackProcess' constructor x0 argument

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

A question on BlackProcess' constructor x0 argument

Lisa Ann
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?
Reply | Threaded
Open this post in threaded view
|

Re: A question on BlackProcess' constructor x0 argument

Luigi Ballabio
Hi,
    just for reference: the question took a while to get to the mailing list, so it was already answered here: <http://quant.stackexchange.com/questions/15477/blackprocess-constructor-x-0-argument-in-quantlib/>.

Luigi


On Fri, Nov 14, 2014 at 7:25 PM, Lisa Ann <[hidden email]> wrote:
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?



--
View this message in context: http://quantlib.10058.n7.nabble.com/A-question-on-BlackProcess-constructor-x0-argument-tp16034.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



--

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users