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

create a fixed daycount notation for datetime ranges #12

Open
wilsonfreitas opened this issue Jun 30, 2015 · 0 comments
Open

create a fixed daycount notation for datetime ranges #12

wilsonfreitas opened this issue Jun 30, 2015 · 0 comments

Comments

@wilsonfreitas
Copy link
Owner

I need to create a daycount to specify fixed datetime intervals.
For example, a spot rate is valid between 2 dates.
So it depends on a calendar, but daycount doesn't refer to a calendar.
What to do?

Suggestion:

as.daycount('fixed/2015-06-12:2015-07-12')

and use spotrate's calendar.

The problem is how to compute timefactor and dib that usually returns the number after /.
One possible solution is: dib and timefactor methods have an optional argument for calendar.

dib(dc, calendar=NULL)
timefactor(dc, term, calendar=NULL)

and daycount could inform it has a datetime interval with a method has_daterange, that method would be used in dib, timefactor simply passes through.
So, every time a curve use timefactor it should pass a calendar.

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

1 participant