finmath / finmath-lib

Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.
Apache License 2.0
488 stars 168 forks source link

General overhaul of forward curves #20

Closed NiklasRodi closed 7 years ago

cfries commented 7 years ago

The only addition I see in this pull request is the following: Make it possible to get the "underlying discount curve" if the curve implementing ForwardCurveInterface is of type ForwardCurveFromDiscountCurve. I would suggest the following changes:

String referencedDiscountCurveName = null;   // if null, forwardCurve is not derived from a discountCruve
if(forwardCurve instanceOf ForwardCurveFromDiscountCurve) {
  referencedDiscountCurveName = ((ForwardCurveFromDiscountCurve)forwardCurve)).get ReferencedDiscountCurveName()
}
cfries commented 7 years ago

Remark: I see that even if a forward curve is a ForwardCurveFromDiscountCurve it could have another associated discount curve for the forward index. So in case of ForwardCurveFromDiscountCurve it maybe makes sense to allow for two discount curve names:

So far I have only considered cases where the two curves agree (e.g. OIS curve). The general case was not required because the ForwardCurve allows for a pseudo-df-like interpolation scheme. But if you need this... it would be OK for me. But this is then possible via an isolated change of ForwardCurveFromDiscountCurve - yes?

NiklasRodi commented 7 years ago

I will Close this pull-request and start a new one incorporating all concerns

finmath commented 7 years ago

Thx

Am 12.05.2017 um 15:59 schrieb NiklasRodi notifications@github.com:

I will Close this pull-request and start a new one incorporating all concerns

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/finmath/finmath-lib/pull/20#issuecomment-301084200, or mute the thread https://github.com/notifications/unsubscribe-auth/ADpJQeOVce44nZ8_rt6v2OyIB1agMeumks5r5GXKgaJpZM4NTKIH.