Re: Barrier option greeks
Posted by Luigi Ballabio on Jun 24, 2005; 4:53am
URL: http://quantlib.414.s1.nabble.com/Barrier-option-greeks-tp3857p3859.html
On 06/23/2005 06:55:26 PM, Daniel J. Duffy wrote:
> Maybe you could modify Quantlib FDM schemes to handle greeks. It's
> fairly easy. Just take divided diference of price to get delta. I
> have done it and its OK.
That is a possibility---and indeed, delta and gamma are calculated in
this way in all finite-difference engines---but one would have to write
a FD engine for Barrier options first, which is missing at this time.
As to the current analytic engine, one could write down the implemented
formula and derive it; it's a bit of tedious work, but possible. After
one's done that, one'd just assign the corresponding variable, as in:
results_.value = C(1,1) + E(1); // an existing switch case
results_.delta = (the expression one found);
in every switch and if clause.
Alternatively, a numerical estimate can be obtained by calculating the
analytic prices P1 and P2 for underlying prices (u0 - du) and (u0 +
du), respectively, where du is a small increment and approximate delta
as (P2-P1)/(2*du). (Daniel, was this what you were suggesting?)
Later,
Luigi
----------------------------------------
Prediction is very difficult, especially if it's about the future.
-- Niels Bohr