@staticmethod
def expression_calculator(inst, start_time, end_time, freq, column_names, spans=None, C=None):
    "\n        Calculate the expressions for one instrument, return a df result.\n        If the expression has been calculated before, load from cache.\n\n        return value: A data frame with index 'datetime' and other data columns.\n\n        "
    if (getattr(ExpressionD, '_provider', None) is None):
        register_all_wrappers()
    obj = dict()
    for field in column_names:
        obj[field] = ExpressionD.expression(inst, field, start_time, end_time, freq)
    data = pd.DataFrame(obj)
    _calendar = Cal.calendar(freq=freq)
    data.index = _calendar[data.index.values.astype(np.int)]
    data.index.names = ['datetime']
    if (spans is None):
        return data
    else:
        mask = np.zeros(len(data), dtype=np.bool)
        for (begin, end) in spans:
            mask |= ((data.index >= begin) & (data.index <= end))
        return data[mask]
Calculate the expressions for one instrument, return a df result.
If the expression has been calculated before, load from cache.

return value: A data frame with index 'datetime' and other data columns.
@staticmethod
def expression_calculator(inst, start_time, end_time, freq, column_names, spans=None, C=None):
    "\n        Calculate the expressions for one instrument, return a df result.\n        If the expression has been calculated before, load from cache.\n\n        return value: A data frame with index 'datetime' and other data columns.\n\n        "
    if (getattr(ExpressionD, '_provider', None) is None):
        register_all_wrappers()
    obj = dict()
    for field in column_names:
        obj[field] = ExpressionD.expression(inst, field, start_time, end_time, freq)
    data = pd.DataFrame(obj)
    _calendar = Cal.calendar(freq=freq)
    data.index = _calendar[data.index.values.astype(np.int)]
    data.index.names = ['datetime']
    if (spans is None):
        return data
    else:
        mask = np.zeros(len(data), dtype=np.bool)
        for (begin, end) in spans:
            mask |= ((data.index >= begin) & (data.index <= end))
        return data[mask]