Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve yield projection #132

Merged
merged 3 commits into from
Mar 17, 2023
Merged

Improve yield projection #132

merged 3 commits into from
Mar 17, 2023

Conversation

fyakubov
Copy link
Contributor

@fyakubov fyakubov commented Mar 17, 2023

Yield settlement uses only past days.

Loan interest days use past days, but not less than 1. A new loan will have 1st day interest still due but the following incomplete days will not be counted. - This is to reduce complexity the previous method of using the ceil of days would create while the yield settlement uses only past days.

Repaying a loan on the same unix day will not reduce pre-settled yield as the loan did not contribute to yield settlement yet.

Reference: Fix-review WP-M1.

* calculate interest only for past days but at least for 1 day

* avoid pre-settled yield reduction for loans repaid on the same day

* patch tests
@fyakubov fyakubov merged commit b60d7db into main Mar 17, 2023
@fyakubov fyakubov deleted the hotfix-yield-projection branch March 17, 2023 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant