Login  Register

Question about Black Formula results

Posted by Benjamin Janson on Jul 26, 2005; 12:22am
URL: http://quantlib.414.s1.nabble.com/Question-about-Black-Formula-results-tp3942.html

Hi,

just to get a feel for the QuandLib I tried to implement a simple call
option with the Black formula. But the results won't make sense to me.

underlying         = 42.5;
vola               = 0.2390;
discount_factor    = 0.99;
strike_price       = 42.5;
settlementDate(8, December, 2005);

Results are:
Black Value: 8.12504
Black Delta: 0.590589
Black Gamma: 0.0184494
Black Vega: 10.1256
Black Rho: 6.55746


First, the option value seems to be too high. I excepted it to be somewhere
aroung 4.70 - 4.90. Second the delta should be pretty exactly 0.5?? Third
isn't it necessary to pass the maturity as an argument to calculate the
black value??

I guess I am using it wrong or something. Any help is appreciated.

Thanks a lot in advance for your help.

Cheers,

Benjamin
------------------------
Here is the code I used:
#include <cstdlib>
#include <string>
#include <stdexcept>
#include <iostream>
#include <ql/quantlib.hpp>

using namespace QuantLib;

int main(int argc, char *argv[])
{
    try
    {
       QL_IO_INIT
             
        Real underlying         = 42.5;
        Real vola               = 0.2390;
        Real discount_factor    = 0.99;
        Real strike_price       = 42.5;
        Date todaysDate(20, July, 2005);
        Settings::instance().evaluationDate() = todaysDate;

        Date settlementDate(8, December, 2005);
        DayCounter dayCounter = Actual365Fixed();
        Time maturity = dayCounter.yearFraction(todaysDate, settlementDate);

   
        Option::Type option_type(Option::Call);
        boost::shared_ptr<StrikedTypePayoff> payoff(
                                             new
PlainVanillaPayoff(option_type,
                                             strike_price));
                                             
        BlackFormula Black(underlying, discount_factor, vola, payoff);
       
        std::cout << "Black Value: " << Black.value() << std::endl;
        std::cout << "Black Delta: " << Black.delta(underlying) <<
std::endl;
        std::cout << "Black Gamma: " << Black.gamma(underlying) <<
std::endl;
        std::cout << "Black Vega: " << Black.vega(maturity) << std::endl;
        std::cout << "Black Rho: " << Black.rho(maturity) << std::endl;
                 
        std::cout <<  std::endl;
        std::cout <<  std::endl;
        return 0;
    }

    catch (std::exception& e) {
        std::cout << e.what() << std::endl;
        return 1;
   
    }

    catch (...) {
        std::cout << "unknown error" << std::endl;
        return 1;
     }
}
-------------------------