Posted by
Ken Anderson-2 on
URL: http://quantlib.414.s1.nabble.com/ImpliedVolatility-bracketing-exception-tp4606p4608.html
Luigi,
Thanks for taking the time. Here's all the initialization:
static DayCounter fixed365 = new Actual365Fixed();
static AnalyticEuropeanEngine engine = new AnalyticEuropeanEngine();
FlatForward flatDividentTS = new FlatForward(todaysDate, 0.0, fixed365);
FlatForward flatTermStructure = new FlatForward(todaysDate, .045,
fixed365);
BlackConstantVol flatVolTS = new BlackConstantVol(todaysDate, .2,
fixed365);
SimpleQuote underlyingQuote = new SimpleQuote
(underlyingCmv.marketValue.doubleValue());
BlackScholesProcess process = new BlackScholesProcess(new QuoteHandle
(underlyingQuote), new YieldTermStructureHandle(flatDividentTS),
new YieldTermStructureHandle(flatTermStructure),
new BlackVolTermStructureHandle(flatVolTS));
Settings.instance().setEvaluationDate(todaysDate);
Date exerciseDate = DateConverter.dateForTimestamp
(optionPeriod.endTradingDateTime());
EuropeanExercise exercise = new EuropeanExercise(exerciseDate);
The evaluation date was March 13th - as was the settlement date.
Expiration was Nov 14th.
All the values are straight off the Nymex for WTI, which is why it's
so strange that the numbers could be that wrong.
Ken
On Mar 17, 2006, at 9:48 AM, Luigi Ballabio wrote:
>
> On 03/15/2006 07:36:21 PM, Ken Anderson wrote:
>> I'm trying to use the impliedVolatility method on a VanillaOption
>> and I'm getting the following exception:
>> Underlying:66.900000
>> Strike 61.500000 Call Price 7.750000 Expires:November 14th, 2006
>> java.lang.RuntimeException: root not bracketed: f[0.0001,4] ->
>> [6.792459e-02,5.274040e+01]
>> The strange thing is, this one works fine:
>> Strike 62.000000 Call Price 7.460000 Volatility 0.09146919793826723
>
> It seems that for the 61.5 call the quoted price is too low, and it
> cannot be reached by the formula no matter how low the volatility is.
> What were your other parameters? (risk-free rate and such)
>
> Later,
> Luigi
>
>
> ----------------------------------------
>
> The doctrine of human equality reposes on this: that there is no man
> really clever who has not found that he is stupid.
> -- Gilbert K. Chesterson