finmath / finmath-lib

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

Vorschläge für Cashflow und Deposit Klassen #16

Closed BBreiden closed 7 years ago

BBreiden commented 7 years ago

Hallo Herr Fries,

ich habe mir ihre Library angesehen und beim Spielen sind mir zwei Kleinigkeiten aufgefallen. Die Deposit-Klasse verwendet das evalutationTime Argument nicht und eine null-Prüfung in der Cashflow Klasse ist nicht "streng" genug. Vielleicht wollen Sie meine Änderungen übernehmen?

Viele Grüße Boris Breidenbach

cfries commented 7 years ago

There is an issue with this pull requires: The user y27238 made another change: The use of fixing was change the the use of start date. While this is maybe more "interpretation" is see some issues:

Also, I believe that fixing is the better alternative, because start is already used to calculate the period length in a schedule. Using fixing one has an additional degree of freedom to choose the period length.

finmath commented 7 years ago

Hallo Boris.

Ich habe mir die Änderungen angesehen. Die zwei Kleinigkeiten finde ich super und würde sie gerne übernehmen, allerdings versteckt sich in dem Pull-Request noch eine Änderung

Deposit: use start date for payout instead of fixing day dich ich zunächst nicht übernehmen möchte. Ich finde hier fixing besser als start. Das hat mehrere Gründe. Start wird schon in der Berechnung der peirodLength verwendet. Damit man die Berechnung der PeriodLength unabhängig von t und T wählen kann, wäre es also gut, wenn wirklich alle 4 Parameter Fixing, Start, End, Payment genutzt werden und nicht ein Parameter (Start) für zwei Sachen. Würde man start nehmen, so wäre der Parameter fixing unbenutzt. Man kann die Änderung ja auch erreichen in dem man von aussen fixing=start setzt. Ausserdem wurde die Änderung gemacht ohne a) die Routine getRate(..) anzupassen und b) die JavaDoc Doku anzupassen. Ohne diese Änderung würde ich Deine Änderung gerne übernehmen.

Liebe Grüße Christian

Am 04.04.2017 um 21:43 schrieb BBreiden notifications@github.com:

Hallo Herr Fries,

ich habe mir ihre Library angesehen und beim Spielen sind mir zwei Kleinigkeiten aufgefallen. Die Deposit-Klasse verwendet das evalutationTime Argument nicht und eine null-Prüfung in der Cashflow Klasse ist nicht "streng" genug. Vielleicht wollen Sie meine Änderungen übernehmen?

Viele Grüße Boris Breidenbach

You can view, comment on, or merge this pull request online at:

https://github.com/finmath/finmath-lib/pull/16 https://github.com/finmath/finmath-lib/pull/16 Commit Summary

Changes for Java8 and usage of eclipse compiler Changed check for discountCurve in model Deposit: use start date for payout instead of fixing day Fix: Deposit.getValue(evaluationTime, model) ignores evaluationTime Merge remote-tracking branch 'finmath/master' Changeg back to "official version" Changed check for discountCurve in model Merge branch 'master' of https://github.com/BBreiden/finmath-lib File Changes

M src/main/java/net/finmath/marketdata/products/Cashflow.java https://github.com/finmath/finmath-lib/pull/16/files#diff-0 (2) M src/main/java/net/finmath/marketdata/products/Deposit.java https://github.com/finmath/finmath-lib/pull/16/files#diff-1 (21) Patch Links:

https://github.com/finmath/finmath-lib/pull/16.patch https://github.com/finmath/finmath-lib/pull/16.patch https://github.com/finmath/finmath-lib/pull/16.diff https://github.com/finmath/finmath-lib/pull/16.diff — 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/16, or mute the thread https://github.com/notifications/unsubscribe-auth/ADpJQa9D8dd2Fwb0xkjb8uB7la6KMROdks5rsp1KgaJpZM4MzVbH.

BBreiden commented 7 years ago

Ok. I am sorry for the confusion. I should definitely have mentioned the change from fixing to start date. And thanks for pointing it out, I'll have a deeper look at the Deposit class.

I'll close this request and set up separate ones.

Best regards, Boris

finmath commented 7 years ago

Hi Boris.

Just re-submit the other changes - and we can discuss the change to the fixing/start date separately.

C

Am 07.04.2017 um 06:50 schrieb BBreiden notifications@github.com:

Ok. I am sorry for the confusion. I should definitely have mentioned the change from fixing to start date. And thanks for pointing it out, I'll have a deeper look at the Deposit class.

I'll close this request and set up separate ones.

Best regards, Boris

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