Open disentchris opened 2 months ago
I will add the 3 simple ones:
ACT/365
(aka ACT/365F or ACT/365 FIXED where actuals / 365, not ACT/ACT ISDA where denominator counts days in/not in leap year)
ACT/360
(actuals / 360)
30E/360
(min d1/d2 to 30, using the classic formula)
https://en.wikipedia.org/wiki/Day_count_convention
Future: should review Wikipedia against packages (like QL or Rateslib) and compare to source docs (eg ISDA spec...)
@Batu4 can you please pull my branch feat-daycounters
I have provided the code, i need you to validate the calculations
Started feat-daycounters-review:
Todo
quantlib
and rateslib
into the test_* files, but obviously they are not dependencies just testing, will
remove them
FYI - coverage/ruff/isort/black all 100% as expected
@Batu4
DO NOT MIX ISSUES
quantlib
as a REFERENCE only, get the exact answer. Then if they do not match I expect a spreadsheet attached with differences 100% attributed and highlighted for discussion. BRL
holidays in both and compare, and attach a spreadsheet of both to fine the exact differencesfeat-daycounters-review
and feat-daycounters
and there is no code change, what is the point of 2 branches (there is nothing to review) if you do the fix in branch where I did, we discussed yesterday, you spawn a new branch, then you do a pull request when complete, issues is not for your daily work reviewfeat-daycounters
against dev
and I can see your code changes (mixed withmine), you have add quantlib
as a dependency to dateroll
, we don't just add 3rd party dependencies to libraries without a face to face discussionrateslib
and quantlib
), they are for bench-marking, expected value should be an exact number, no imports are allowed in dateroll
without a live discussion, I thought this is should be obvious as i said "put the results in expectdcf* variables as expected results as numbers" (emphasis on numbers)feat-daycounters-review
BD252 Issues: testcases report in the spreadsheet and I attached the spreadsheet here
Summary:
In the testcases of spreadsheet, day conventions of act360,act365,30e360 of dateroll matches with the quantlib and excel calculation;however, bd252 with brazilian calendar does not match with quantlib because dateroll holidays did not include carnival,good friday and corpus christi
Testcases include leap year, non leap year scenarios
You are able to compare feat-daycounters-review and feat-daycounters branch now
I would not be able to finish the excel calculation of bd252 in the spreadsheet
Removed 3rd party dependencies from feat-daycounters-review branch
Coverage 100%
Todo:
Summary:
Last time, the dateroll brazilian holidays did not include carnival, good friday and corpus christi whereas quantlib included those holidays. I switched dateroll brazilian holidays to quantlib brazilian holidays. Now all day conventions of act360,act365,30e360 match with excel and quantlib, bd252 match with quantlib. (please see the attached excel file, sheet testcases)
I removed the bd252 excel calculation in the sheet testcases because the holidays of the excel calculation will be coming from quantlib
The branch name is feat-bd252-adjust and I did pull request to dev Day_Count_Complete.xlsx
Is your feature request related to a problem? Please describe. Part of roadmap Describe the solution you'd like In rate curve right now I overage Duration,yf and Duration.just_bds:
Additional context Here's how I use them