code: def retype(value, index_column=None):
          
          if index_column is None:
              index_column = 'date'
  
          if isinstance(value, pd.DataFrame):
              # use all lower case for column name
              value.columns = map(lambda c: c.lower(), value.columns)
  
              if index_column in value.columns:
                  value.set_index(index_column, inplace=True)
              value = StockDataFrame(value)
          return value
docs: if the input is a `DataFrame`, convert it to this class.
  
          :param index_column: the column that will be used as index,
                               default to `date`
          :param value: value to convert
          :return: this extended class