Ejemplo n.º 1
0
    def _get_roll_calendar_without_checking(self, instrument_code):

        try:
            filename = self._filename_given_instrument_code(instrument_code)
            roll_calendar = pd_readcsv(filename,
                                       date_index_name=DATE_INDEX_NAME)
        except OSError:
            self.log.warning("Can't find roll calendar file %s" % filename)
            return rollCalendar.create_empty()

        return roll_calendar
Ejemplo n.º 2
0
 def get_roll_calendar(self, instrument_code):
     if self.is_code_in_data(instrument_code):
         return self._get_roll_calendar_without_checking(instrument_code)
     else:
         return rollCalendar.create_empty()