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

rename Thirty360Excel to Thirty360US? #9

Open
simonbyrne opened this issue Jan 23, 2019 · 5 comments
Open

rename Thirty360Excel to Thirty360US? #9

simonbyrne opened this issue Jan 23, 2019 · 5 comments

Comments

@simonbyrne
Copy link
Contributor

simonbyrne commented Jan 23, 2019

It matches what Wikipedia calls it "30/360 US":
https://en.wikipedia.org/wiki/Day_count_convention#30/360_US

It's not in the ISDA definition list, and I don't have access to the Mayle reference:

Mayle, Jan (1993), Standard Securities Calculation Methods: Fixed Income Securities Formulas for Price, Yield and Accrued Interest, 1 (3rd ed.), Securities Industry and Financial Markets Association, ISBN 1-882936-01-9.

For reference, OpenGamma Strata calls it "30U/360 EOM".

@EricForgy
Copy link
Member

Similar to

struct ThirtyE360 <: DayCount end
const EurobondBasis = ThirtyE360

How about something like

struct ThirtyU360 <: DayCount end
const ExcelThirty360 = ThirtyU360

?

Let's try to be as internally consistent as possible (will ping on Slack :)).

@EricForgy
Copy link
Member

FYI. I added an Excel module: #10

In principle, we could move the code for DayCounts.Excel.Thirty360 to DayCounts.ThirtyU360 and then

const Excel.Thirty360 = ThirtyU360

What do you think? I may go ahead and push that change to the PR and see what you think there 😊

@EricForgy
Copy link
Member

I went ahead and added that ☝️ to the PR.

So the code that was in Thirty360Excel is now moved to ThirtyU360 and the new Excel module uses ThirtyU360, i.e.

const DayCounts.Excel.Thirty360 = DayCounts.ThirtyU360

@simonbyrne
Copy link
Contributor Author

Is "ThirtyU360" a standard-ish enough name?

@EricForgy
Copy link
Member

I think so. It is the first listed "Other name" on Wikipedia and it is more consistent with our other type ThirtyE360 than Thirty360US.

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

No branches or pull requests

2 participants