implied blows up for binary option

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

implied blows up for binary option

Dirk Eddelbuettel
Playing with binaries, I noticed that implied Vol calculations abort:

edd@homebud:~/misc> cat binary_abrt.cc

#include <ql/quantlib.hpp>

int main(int argc, char* argv[])
{
  using namespace QuantLib;

  using QuantLib::Pricers::BinaryOption;

  try {
    double underlying = 102;
    double strike = 100;
    Spread dividendYield = 0.01;
    Rate riskFreeRate = 0.05;
    Time maturity = 1.0;
    double volatility = 0.60;
    BinaryOption BO = BinaryOption(Option::Call, underlying, strike,
                                   dividendYield, riskFreeRate, maturity,
                                   volatility);
    cout << "value is " << BO.value() << endl;
    double impliedVol = BO.impliedVolatility(1.1*BO.value());
    cout << "implied is " << impliedVol << endl;

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

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

  exit (0);
}
edd@homebud:~/misc> ./binary_abrt
value is 0.400098
root not bracketed: f[0.0001000000,4.0000000000] -> [0.20004910384016516556,0.20004910384016516556]

I don't understand why. Should somebody comment?

This is on Debian with the 0.3.0a5-20020120 packages.

Dirk

--
Good judgement comes from experience; experience comes from bad judgement.
                                                            -- Fred Brooks


Reply | Threaded
Open this post in threaded view
|

Re: implied blows up for binary option

Luigi Ballabio-4
At 09:25 PM 2/25/02 -0600, Dirk Eddelbuettel wrote:
>Playing with binaries, I noticed that implied Vol calculations abort:
>I don't understand why. Should somebody comment?

Well, between you and me and the other developers, BinaryOption is _so_
smart (not) that it caches its value and doesn't change it even though its
volatility is changed. Of course this makes it kind of difficult to solve
for its implied volatility...

I'm going to fix it this morning. Thanks for the report.

Bye,
         Luigi



Reply | Threaded
Open this post in threaded view
|

Re: implied blows up for binary option

Ferdinando M. Ametrano-2
Two more warnings:
1) impliedVol usually fails when the option's value is not attainable with
any volatility value (e.g. a value less than the intrinsic value for an
american option)
2) even if a root exists with binary options you're not guaranteed
impliedVol will find it. This is because contracts with a gamma that
changes sign have values that are not monotonic in the volatility.

I'm going to add these 2 warning to the Doxygen documentation

ciao -- Nando


At 09:48 AM 2/26/02 +0000, Luigi Ballabio wrote:

>At 09:25 PM 2/25/02 -0600, Dirk Eddelbuettel wrote:
>>Playing with binaries, I noticed that implied Vol calculations abort:
>>I don't understand why. Should somebody comment?
>
>Well, between you and me and the other developers, BinaryOption is _so_
>smart (not) that it caches its value and doesn't change it even though its
>volatility is changed. Of course this makes it kind of difficult to solve
>for its implied volatility...
>
>I'm going to fix it this morning. Thanks for the report.
>
>Bye,
>         Luigi
>
>
>_______________________________________________
>Quantlib-dev mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/quantlib-dev