Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix #1270 Call price is inconsistent when MCR changed #1324
Fix #1270 Call price is inconsistent when MCR changed #1324
Changes from 34 commits
84c7218
6254076
9b41a92
5308ea0
c912886
469a499
cb7bd0c
0ba6cb1
92a3b71
077f4e0
68c702b
8bcf38d
fd1c091
129e89c
9af57a8
b5e63a3
a56562a
d7306ab
fa6b12e
bf9537f
9f06364
8c0152c
613f414
3aec53d
46e2943
4e2514c
7abf7c5
a2d5fac
8466e19
ece99b6
1aad691
ca1e045
6b22b91
54c4c02
b494609
a22f92e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unconditionally, i. e. always, setting this will simplify the code significantly. I believe the performance penalty will be insignificant since you get rid of a method parameter and several checks at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there are several 128-bit multiplications and divisions in
maintenance_collateralization()
, I thought that it costs more. Anyway we can benchmark it (I haven't done).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is superfluous, since as you say it won't used anymore in the future. Getting rid of this and not tying the hf to a maintenance interval will simplify the PR significantly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concerns:
call_price
are unchanged but new positions' are1
, people may get confused.1
with1
when inserting new data (when creating new positions) so it benefits in the long run with the cost of one-time process.BTW as you've noticed later we need to tie the hf to a maintenance interval anyway.