Login  Register

RE: Question about Black Formula results

Posted by David Palmer-2 on Jul 26, 2005; 6:42am
URL: http://quantlib.414.s1.nabble.com/Question-about-Black-Formula-results-tp3942p3944.html

Discount factor seems high. If it is, then the drift of the asset price
due to an increased rate will imply a higher delta.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
Benjamin Janson
Sent: Tuesday, July 26, 2005 2:21 AM
To: [hidden email]
Subject: [Quantlib-users] Question about Black Formula results

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;
     }
}
-------------------------


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Quantlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

The information contained in and accompanying this communication is for your information only. Such information is strictly confidential and is intended solely for the use of the intended recipient (s) - recipient. If you are not the intended recipient (s) of this communication, please delete and destroy all copies immediately. This is not an offer or solicitation with respect to the purchase or sale of any security. The information is based upon information that TANSTAAFL Research & Trading, L.L.C believes to be reliable. TANSTAAFL Research & Trading, L.L.C does not accept responsibility to update any opinions or other information contained in this communication.