riskless in analyticdividendeuropeanengine.cpp

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

riskless in analyticdividendeuropeanengine.cpp

Xavier.Abulker

Hello,
I'd like to have access to "riskless" defined in analyticdividendeuropeanengine.cpp:

for (i=0; i<arguments_.dividends.size(); i++)
            if (arguments_.dividendDates[i] >= settlementDate)
                riskless += arguments_.dividends[i] *
                    process->riskFreeRate()
                    ->discount(arguments_.dividendDates[i]);

but I don't know how to do that.
I was thinking to create a new class in dividendvanillaoption.hpp but I'm getting lost.
Could you please help me and tell what you be the fastest way?
Regards

Xavier
Reply | Threaded
Open this post in threaded view
|

Re: riskless in analyticdividendeuropeanengine.cpp

Ferdinando M. Ametrano-3
Hi Xavier

>I'd like to have access to "riskless" defined in
>analyticdividendeuropeanengine.cpp:
>
>for (i=0; i<arguments_.dividends.size(); i++)
>             if (arguments_.dividendDates[i] >= settlementDate)
>                 riskless += arguments_.dividends[i] *
>                     process->riskFreeRate()
>                     ->discount(arguments_.dividendDates[i]);
>
>but I don't know how to do that.

I don't have time enough to check the actual code, but I would probably
augment the results with a discountedDividends variable (along with delta,
gamma, etc), and would set it in the engine with the "riskless" value.

ciao -- Nando