Add a generic methodology for generating risk reports. Add the first of these, DeltaGamma, which produces a report of Delta and Gamma for all the underlyings of a pricer.
In terms of implementation, I have changed the bump method of Bumpable to allow the save parameter to be optional. This is because the most efficient way to calculate a symmetric delta is to bump first up then down, without restoring in between. This means the down bump does not need to save its old state. This change was very difficult -- there seems to be a lack of support in Rust for Option. For example, Option is not cloneable, which means it is very hard to avoid borrow problems.
Add a generic methodology for generating risk reports. Add the first of these, DeltaGamma, which produces a report of Delta and Gamma for all the underlyings of a pricer.
In terms of implementation, I have changed the bump method of Bumpable to allow the save parameter to be optional. This is because the most efficient way to calculate a symmetric delta is to bump first up then down, without restoring in between. This means the down bump does not need to save its old state. This change was very difficult -- there seems to be a lack of support in Rust for Option. For example, Option is not cloneable, which means it is very hard to avoid borrow problems.