Login  Register

Black-Scholes theoretical value

Posted by Jack Jones-2 on May 09, 2007; 9:44pm
URL: http://quantlib.414.s1.nabble.com/Black-Scholes-theoretical-value-tp823.html

I'd like to calculate the Black-Scholes theoretical value of an option.
I'm new to QuantLib and kind-of new to quantitative finance.  I'm using
EquityOption.cpp as a base for my code.

Here is the relevant setup (questions at bottom):

//==========================

// Underlying price
shared_ptr<SimpleQuote>
    underlyingPrice(new SimpleQuote(stockPrice));

// Dividend term structure
shared_ptr<YieldTermStructure>
    dividendTS(new FlatForward(expiryDate,
                   dividend,
                   Actual360()));

// Interest rate term structure
shared_ptr<YieldTermStructure>
    interestTS(new FlatForward(expiryDate,
                   interest,
                   Actual360()));

// Historical volatility term structure
shared_ptr<BlackVolTermStructure>
    volatilityTS(new BlackConstantVol(expiryDate,
                      historicalVolitility,
                      Actual360()));

shared_ptr<StrikedTypePayoff>
    payoff(new PlainVanillaPayoff(type, strikePrice));

shared_ptr<Exercise>
    exercise(new AmericanExercise(Date::todaysDate(), expiryDate));

shared_ptr<QuantLib::GeneralizedBlackScholesProcess>
    stochasticProcess(new
    QuantLib::GeneralizedBlackScholesProcess(
        Handle<Quote>(underlyingPrice),
        Handle<YieldTermStructure>(dividendTS),
        Handle<YieldTermStructure>(interestTS),
        Handle<BlackVolTermStructure>(volatilityTS)));

shared_ptr<PricingEngine>
    engine(new BinomialVanillaEngine<CoxRossRubinstein>(150));

VanillaOption option(stochasticProcess, payoff, exercise, engine);

//==========================
 
I have two questions:

1. what does the "price" argument to option.impliedVolatility()
   represent?

2. now that I have this object infrastructure built up, what is the
   actual method call to get the theoretical value of the option?

Thanks for your help!


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users