Created
August 12, 2012 00:47
-
-
Save tlmaloney/3328258 to your computer and use it in GitHub Desktop.
DateMeasure class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DateMeasure(object): | |
"""An abstract base class for date measures""" | |
name = None | |
def measure_time(self, date, schedule): | |
'''Returns a measure of time between date and | |
schedule.prev_date(date) | |
Keyword arguments: | |
date -- SerialDate instance | |
schedule -- Schedule instance | |
''' | |
pass | |
def dcf(self, date, schedule): | |
'''Returns the Day Count Factor -- a ratio of the measure between date | |
and schedule.prev_date(date) and some other measure | |
Keyword arguments: | |
date -- SerialDate instance | |
schedule -- Schedule instance | |
''' | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment