-
Notifications
You must be signed in to change notification settings - Fork 970
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
repeat() function #68
Comments
Sounds good. One thought might be "mode" supporting a "calendar" parameter instead? We could make it just support a calendar day and work day calendar for now, but later could be for example an NYSE calendar or others? |
Agreed, just specifying the calendar would work and simplify |
should probably take this GsCalendar as second param? |
Makes sense. |
We should reuse as much of the I can see two potential implementations:
2 seems like a better approach but we need to carefully consider the naming of the function to make it self-explaining. |
I'd lean towards It can always be the final optional parameter too, so everyone doesn't have to specify. Agree on having some constants too for the calendars (though constructor should take a string too, as likely don't want to make code changes for each new calendar). |
Describe the problem.
Provide a
repeat()
function that repeats the last available values in a timeseries for missing date.Describe the solution you'd like
repeat(x, mode)
function takes a timeseries and a mode argument. The mode argument can be either CALENDAR_DAYS and it then repeats values on all calendar days or WORK_DAYS and then skips Saturdays and Sundays.Describe alternatives you've considered
We considered having a UNION mode that would align the series with the date of another series and fill the missing values but that would be redundant as the
align()
already supports that use case.Are you willing to contribute
Yes
The text was updated successfully, but these errors were encountered: