Login  Register

Re: Option does not decay in time

Posted by Luigi Ballabio on Mar 23, 2011; 7:52am
URL: http://quantlib.414.s1.nabble.com/Option-does-not-decay-in-time-tp8219p8220.html


Dan,
        you probably gave a fixed reference date to your curves.  Use the
constructors taking a calendar and a number of settlement days instead.

Luigi


On Tue, 2011-03-22 at 23:42 -0500, Dan Krop wrote:

> Hello Quantlibbers,
>    I am having a problem approximating theta because it seems the
> option I have has constant NPV over time for a given underlying
> price.  
>
>
> Here is a test function,
>
>
> Real approximateTheta(VanillaOption & option)
> {
> DayCounter dc = Actual365Fixed();
>
>
> Date today = Settings::instance().evaluationDate();
> Time dT = dc.yearFraction(today-5,today+5);
>
>
> std::cout<<"today="<<today<<"  dT="<<dT<<std::endl;
>
> Settings::instance().evaluationDate()=today-5;
> Real value_m=option.NPV();
>
> Settings::instance().evaluationDate()=today+5;
> Real value_p=option.NPV();
>
>
> Settings::instance().evaluationDate()=today;
> std::cout<<"m="<<value_m<<" p="<<value_p<<std::endl;
>
>
> Real theta=(value_p - value_m)/dT;
> return theta;
> }
>
>
> When I run this, I get that value_p=value_m. The option uses the
> AnalyticEuropeanEngine. I thought that options registered with the
> evaluationDate, so simply moving the date should be enough to get them
> to decay. I must be doing something wrong. I can provide a more
> complete example if it will help.
>
>
> Thanks in advance,
>      Dan
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users

--

There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the
other way is to make it so complicated that there are no obvious
deficiencies.
-- C. A. R. Hoare



------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users