finmath / finmath-lib

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

AnalyticalModel: No curve wrapping in getDiscountCurve() method #26

Closed NiklasRodi closed 7 years ago

NiklasRodi commented 7 years ago

What is this PR for?

What type of PR is it?

Improvement

Questions:

Is it problematic for others user to have this more strict behaviour of AnalyticalModel::getDiscountCurve()?

cfries commented 7 years ago

Looks very good to me. The wrapping should be done outside (calibrated curves, etc.), if needed. I will think a little if this could break anything... (but UnitTests are OK).

NiklasRodi commented 7 years ago

It depends what you call break. There is e.g. a fallback-behaviour in SwapLeg::getValue() where the forward can also be calculated from a discountCurve. However, I removed this Feature in the parallel pull-request as I think that this implicit behaviour is dangerous