Skip to content

Instantly share code, notes, and snippets.

@tlmaloney
Created August 12, 2012 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlmaloney/3328258 to your computer and use it in GitHub Desktop.
Save tlmaloney/3328258 to your computer and use it in GitHub Desktop.
DateMeasure class
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