Cython: _assets.pyx

Generated by Cython 3.1.8

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: _assets.c

    +001: # cython: embedsignature=True

      __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     002: #

     003: # Copyright 2015 Quantopian, Inc.

     004: #

     005: # Licensed under the Apache License, Version 2.0 (the "License");

     006: # you may not use this file except in compliance with the License.

     007: # You may obtain a copy of the License at

     008: #

     009: #     http://www.apache.org/licenses/LICENSE-2.0

     010: #

     011: # Unless required by applicable law or agreed to in writing, software

     012: # distributed under the License is distributed on an "AS IS" BASIS,

     013: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

     014: # See the License for the specific language governing permissions and

     015: # limitations under the License.

     016:

     017: """

     018: Cythonized Asset object.

     019: """

     020: cimport cython

     021: from cpython.number cimport PyNumber_Index

     022: from cpython.object cimport (

     023:     Py_EQ,

     024:     Py_NE,

     025:     Py_GE,

     026:     Py_LE,

     027:     Py_GT,

     028:     Py_LT,

     029: )

     030: from cpython cimport bool

     031:

    +032: import numpy as np

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_numpy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_np, __pyx_t_2) < (0)) __PYX_ERR(0, 32, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     033: from numpy cimport int64_t

    +034: import warnings

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_warnings, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     035: cimport numpy as np

     036:

     037:

    +038: from zipline.utils.calendar_utils import get_calendar

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_get_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_zipline_utils_calendar_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_calendar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_calendar, __pyx_t_2) < (0)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     039:

     040:

     041: # Users don't construct instances of this object, and embedding the signature

     042: # in the docstring seems to confuse Sphinx, so disable it for now.

    +043: @cython.embedsignature(False)

    struct __pyx_vtabstruct_7zipline_6assets_7_assets_Asset {
      PyObject *(*__pyx___reduce__)(struct __pyx_obj_7zipline_6assets_7_assets_Asset *, int __pyx_skip_dispatch);
      PyObject *(*to_dict)(struct __pyx_obj_7zipline_6assets_7_assets_Asset *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_7zipline_6assets_7_assets_Asset *__pyx_vtabptr_7zipline_6assets_7_assets_Asset;

     044: cdef class Asset:

     045:     """

     046:     Base class for entities that can be owned by a trading algorithm.

     047:

     048:     Attributes

     049:     ----------

     050:     sid : int

     051:         Persistent unique identifier assigned to the asset.

     052:     symbol : str

     053:         Most recent ticker under which the asset traded. This field can change

     054:         without warning if the asset changes tickers. Use ``sid`` if you need a

     055:         persistent identifier.

     056:     asset_name : str

     057:         Full name of the asset.

     058:     exchange : str

     059:         Canonical short name of the exchange on which the asset trades (e.g.,

     060:         'NYSE').

     061:     exchange_full : str

     062:         Full name of the exchange on which the asset trades (e.g., 'NEW YORK

     063:         STOCK EXCHANGE').

     064:     exchange_info : zipline.assets.ExchangeInfo

     065:         Information about the exchange this asset is listed on.

     066:     country_code : str

     067:         Two character code indicating the country in which the asset trades.

     068:     start_date : pd.Timestamp

     069:         Date on which the asset first traded.

     070:     end_date : pd.Timestamp

     071:         Last date on which the asset traded. On Quantopian, this value is set

     072:         to the current (real time) date for assets that are still trading.

     073:     tick_size : float

     074:         Minimum amount that the price can change for this asset.

     075:     auto_close_date : pd.Timestamp

     076:         Date on which positions in this asset will be automatically liquidated

     077:         to cash during a simulation. By default, this is three days after

     078:         ``end_date``.

     079:     """

     080:

    +081:     _kwargnames = frozenset({

      __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sid) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_symbol) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_asset_name) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_start_date) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_end_date) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_first_traded) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_auto_close_date) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tick_size) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_multiplier) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_exchange_info) < (0)) __PYX_ERR(0, 82, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyFrozenSet_New(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_kwargnames, __pyx_t_2) < (0)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     082:         'sid',

     083:         'symbol',

     084:         'asset_name',

     085:         'start_date',

     086:         'end_date',

     087:         'first_traded',

     088:         'auto_close_date',

     089:         'tick_size',

     090:         'multiplier',

     091:         'exchange_info',

     092:     })

     093:

    +094:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_6assets_7_assets_5Asset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_6assets_7_assets_5Asset_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      __pyx_t_5numpy_int64_t __pyx_v_sid;
      PyObject *__pyx_v_exchange_info = 0;
      PyObject *__pyx_v_symbol = 0;
      PyObject *__pyx_v_asset_name = 0;
      PyObject *__pyx_v_start_date = 0;
      PyObject *__pyx_v_end_date = 0;
      PyObject *__pyx_v_first_traded = 0;
      PyObject *__pyx_v_auto_close_date = 0;
      PyObject *__pyx_v_tick_size = 0;
      float __pyx_v_multiplier;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sid,&__pyx_mstate_global->__pyx_n_u_exchange_info,&__pyx_mstate_global->__pyx_n_u_symbol,&__pyx_mstate_global->__pyx_n_u_asset_name,&__pyx_mstate_global->__pyx_n_u_start_date,&__pyx_mstate_global->__pyx_n_u_end_date,&__pyx_mstate_global->__pyx_n_u_first_traded,&__pyx_mstate_global->__pyx_n_u_auto_close_date,&__pyx_mstate_global->__pyx_n_u_tick_size,&__pyx_mstate_global->__pyx_n_u_multiplier,0};
      PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 94, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case 10:
            values[9] = __Pyx_ArgRef_VARARGS(__pyx_args, 9);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  9:
            values[8] = __Pyx_ArgRef_VARARGS(__pyx_args, 8);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  8:
            values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  7:
            values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 94, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
    /* … */
      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_6assets_7_assets_5Asset___init__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_sid, PyObject *__pyx_v_exchange_info, PyObject *__pyx_v_symbol, PyObject *__pyx_v_asset_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_first_traded, PyObject *__pyx_v_auto_close_date, PyObject *__pyx_v_tick_size, float __pyx_v_multiplier) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 94, 0, 0, 0, __PYX_ERR(0, 94, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 94, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 94, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     095:                  int64_t sid, # sid is required

     096:                  object exchange_info, # exchange is required

     097:                  object symbol="",

     098:                  object asset_name="",

    +099:                  object start_date=None,

          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None));

    +100:                  object end_date=None,

          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));

    +101:                  object first_traded=None,

          if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));

    +102:                  object auto_close_date=None,

          if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_0_01));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 10, i); __PYX_ERR(0, 94, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case 10:
            values[9] = __Pyx_ArgRef_VARARGS(__pyx_args, 9);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  9:
            values[8] = __Pyx_ArgRef_VARARGS(__pyx_args, 8);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  8:
            values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  7:
            values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 94, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 94, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 94, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
    /* … */
          if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_0_01));
        }
        __pyx_v_sid = __Pyx_PyLong_As_npy_int64(values[0]); if (unlikely((__pyx_v_sid == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L3_error)
        __pyx_v_exchange_info = values[1];
        __pyx_v_symbol = values[2];
        __pyx_v_asset_name = values[3];
        __pyx_v_start_date = values[4];
        __pyx_v_end_date = values[5];
        __pyx_v_first_traded = values[6];
        __pyx_v_auto_close_date = values[7];
        __pyx_v_tick_size = values[8];
        if (values[9]) {
          __pyx_v_multiplier = __Pyx_PyFloat_AsFloat(values[9]); if (unlikely((__pyx_v_multiplier == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L3_error)
        } else {
          __pyx_v_multiplier = ((float)1.0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 10, __pyx_nargs); __PYX_ERR(0, 94, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset___init__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self), __pyx_v_sid, __pyx_v_exchange_info, __pyx_v_symbol, __pyx_v_asset_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_first_traded, __pyx_v_auto_close_date, __pyx_v_tick_size, __pyx_v_multiplier);

     103:                  object tick_size=0.01,

     104:                  float multiplier=1.0):

     105:

    +106:         self.sid = sid

      __pyx_v_self->sid = __pyx_v_sid;

    +107:         self.symbol = symbol

      __Pyx_INCREF(__pyx_v_symbol);
      __Pyx_GIVEREF(__pyx_v_symbol);
      __Pyx_GOTREF(__pyx_v_self->symbol);
      __Pyx_DECREF(__pyx_v_self->symbol);
      __pyx_v_self->symbol = __pyx_v_symbol;

    +108:         self.asset_name = asset_name

      __Pyx_INCREF(__pyx_v_asset_name);
      __Pyx_GIVEREF(__pyx_v_asset_name);
      __Pyx_GOTREF(__pyx_v_self->asset_name);
      __Pyx_DECREF(__pyx_v_self->asset_name);
      __pyx_v_self->asset_name = __pyx_v_asset_name;

    +109:         self.exchange_info = exchange_info

      __Pyx_INCREF(__pyx_v_exchange_info);
      __Pyx_GIVEREF(__pyx_v_exchange_info);
      __Pyx_GOTREF(__pyx_v_self->exchange_info);
      __Pyx_DECREF(__pyx_v_self->exchange_info);
      __pyx_v_self->exchange_info = __pyx_v_exchange_info;

    +110:         self.start_date = start_date

      __Pyx_INCREF(__pyx_v_start_date);
      __Pyx_GIVEREF(__pyx_v_start_date);
      __Pyx_GOTREF(__pyx_v_self->start_date);
      __Pyx_DECREF(__pyx_v_self->start_date);
      __pyx_v_self->start_date = __pyx_v_start_date;

    +111:         self.end_date = end_date

      __Pyx_INCREF(__pyx_v_end_date);
      __Pyx_GIVEREF(__pyx_v_end_date);
      __Pyx_GOTREF(__pyx_v_self->end_date);
      __Pyx_DECREF(__pyx_v_self->end_date);
      __pyx_v_self->end_date = __pyx_v_end_date;

    +112:         self.first_traded = first_traded

      __Pyx_INCREF(__pyx_v_first_traded);
      __Pyx_GIVEREF(__pyx_v_first_traded);
      __Pyx_GOTREF(__pyx_v_self->first_traded);
      __Pyx_DECREF(__pyx_v_self->first_traded);
      __pyx_v_self->first_traded = __pyx_v_first_traded;

    +113:         self.auto_close_date = auto_close_date

      __Pyx_INCREF(__pyx_v_auto_close_date);
      __Pyx_GIVEREF(__pyx_v_auto_close_date);
      __Pyx_GOTREF(__pyx_v_self->auto_close_date);
      __Pyx_DECREF(__pyx_v_self->auto_close_date);
      __pyx_v_self->auto_close_date = __pyx_v_auto_close_date;

    +114:         self.tick_size = tick_size

      __Pyx_INCREF(__pyx_v_tick_size);
      __Pyx_GIVEREF(__pyx_v_tick_size);
      __Pyx_GOTREF(__pyx_v_self->tick_size);
      __Pyx_DECREF(__pyx_v_self->tick_size);
      __pyx_v_self->tick_size = __pyx_v_tick_size;

    +115:         self.price_multiplier = multiplier

      __pyx_v_self->price_multiplier = __pyx_v_multiplier;

     116:

    +117:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_8exchange_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_8exchange_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_8exchange___get__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_8exchange___get__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40]))
      __Pyx_TraceStartFunc("__get__", __pyx_f[0], 117, 0, 0, 0, __PYX_ERR(0, 117, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 117, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.exchange.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     118:     def exchange(self):

    +119:         return self.exchange_info.canonical_name

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->exchange_info, __pyx_mstate_global->__pyx_n_u_canonical_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 119, __pyx_L1_error));
      goto __pyx_L0;

     120:

    +121:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_13exchange_full_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_13exchange_full_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_13exchange_full___get__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_13exchange_full___get__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41]))
      __Pyx_TraceStartFunc("__get__", __pyx_f[0], 121, 0, 0, 0, __PYX_ERR(0, 121, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 121, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.exchange_full.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     122:     def exchange_full(self):

    +123:         return self.exchange_info.name

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->exchange_info, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 123, __pyx_L1_error));
      goto __pyx_L0;

     124:

    +125:     @property

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_12country_code_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_12country_code_1__get__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_12country_code___get__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_12country_code___get__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42]))
      __Pyx_TraceStartFunc("__get__", __pyx_f[0], 125, 0, 0, 0, __PYX_ERR(0, 125, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 125, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.country_code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     126:     def country_code(self):

    +127:         return self.exchange_info.country_code

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->exchange_info, __pyx_mstate_global->__pyx_n_u_country_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 127, __pyx_L1_error));
      goto __pyx_L0;

     128:

    +129:     def __int__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_3__int__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_3__int__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_2__int__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_2__int__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43]))
      __Pyx_TraceStartFunc("__int__", __pyx_f[0], 129, 0, 0, 0, __PYX_ERR(0, 129, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 129, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +130:         return self.sid

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 130, __pyx_L1_error));
      goto __pyx_L0;

     131:

    +132:     def __index__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_5__index__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_5__index__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__index__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_4__index__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_4__index__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44]))
      __Pyx_TraceStartFunc("__index__", __pyx_f[0], 132, 0, 0, 0, __PYX_ERR(0, 132, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 132, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__index__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +133:         return self.sid

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->sid); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 133, __pyx_L1_error));
      goto __pyx_L0;

     134:

    +135:     def __hash__(self):

    /* Python wrapper */
    static Py_hash_t __pyx_pw_7zipline_6assets_7_assets_5Asset_7__hash__(PyObject *__pyx_v_self); /*proto*/
    static Py_hash_t __pyx_pw_7zipline_6assets_7_assets_5Asset_7__hash__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_hash_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_6__hash__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static Py_hash_t __pyx_pf_7zipline_6assets_7_assets_5Asset_6__hash__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      Py_hash_t __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45]))
      __Pyx_TraceStartFunc("__hash__", __pyx_f[0], 135, 0, 0, 0, __PYX_ERR(0, 135, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 135, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
      __Pyx_PyMonitoring_ExitScope(0);
      return __pyx_r;
    }

    +136:         return self.sid

      __pyx_r = __pyx_v_self->sid;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_PyLong_FromHash_t, 1, 0, __PYX_ERR(0, 136, __pyx_L1_error));
      goto __pyx_L0;

     137:

    +138:     def __richcmp__(x, y, int op):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_9__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_9__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_8__richcmp__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_x), ((PyObject *)__pyx_v_y), ((int)__pyx_v_op));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_8__richcmp__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) {
      __pyx_t_5numpy_int64_t __pyx_v_x_as_int;
      __pyx_t_5numpy_int64_t __pyx_v_y_as_int;
      __pyx_t_5numpy_int64_t __pyx_v_compared;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46]))
      __Pyx_TraceStartFunc("__richcmp__", __pyx_f[0], 138, 0, 0, 0, __PYX_ERR(0, 138, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 138, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     139:         """

     140:         Cython rich comparison method.  This is used in place of various

     141:         equality checkers in pure python.

     142:         """

     143:         cdef int64_t x_as_int, y_as_int

     144:

    +145:         try:

      {
        /*try:*/ {
    /* … */
        }
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L8_try_end;
        __pyx_L3_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_TraceException(__pyx_lineno, 0, 0);
    /* … */
        __pyx_L5_except_error:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L1_error;
        __pyx_L6_except_return:;
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        goto __pyx_L0;
        __pyx_L8_try_end:;
      }

    +146:             x_as_int = PyNumber_Index(x)

          __pyx_t_4 = PyNumber_Index(((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyLong_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_x_as_int = __pyx_t_5;

    +147:         except (TypeError, OverflowError):

        __pyx_t_6 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_OverflowError);
        if (__pyx_t_6) {
          __Pyx_AddTraceback("zipline.assets._assets.Asset.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_TraceExceptionHandled(0);
          __Pyx_ErrRestore(0,0,0);
          __Pyx_TraceExceptionDone();

    +148:             return NotImplemented

          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_builtin_NotImplemented);
          __pyx_r = __pyx_builtin_NotImplemented;
          __Pyx_TraceReturnValue(__pyx_r, 8, 0, __PYX_ERR(0, 148, __pyx_L5_except_error));
          goto __pyx_L6_except_return;
        }
        goto __pyx_L5_except_error;

     149:

    +150:         try:

      {
        /*try:*/ {
    /* … */
        }
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L16_try_end;
        __pyx_L11_error:;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_TraceException(__pyx_lineno, 0, 0);
    /* … */
        __pyx_L13_except_error:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
        goto __pyx_L1_error;
        __pyx_L14_except_return:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_1);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
        goto __pyx_L0;
        __pyx_L16_try_end:;
      }

    +151:             y_as_int = PyNumber_Index(y)

          __pyx_t_4 = PyNumber_Index(__pyx_v_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyLong_As_npy_int64(__pyx_t_4); if (unlikely((__pyx_t_5 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L11_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_v_y_as_int = __pyx_t_5;

    +152:         except (TypeError, OverflowError):

        __pyx_t_6 = __Pyx_PyErr_ExceptionMatches2(__pyx_builtin_TypeError, __pyx_builtin_OverflowError);
        if (__pyx_t_6) {
          __Pyx_AddTraceback("zipline.assets._assets.Asset.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          __Pyx_TraceExceptionHandled(0);
          __Pyx_ErrRestore(0,0,0);
          __Pyx_TraceExceptionDone();

    +153:             return NotImplemented

          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_builtin_NotImplemented);
          __pyx_r = __pyx_builtin_NotImplemented;
          __Pyx_TraceReturnValue(__pyx_r, 17, 0, __PYX_ERR(0, 153, __pyx_L13_except_error));
          goto __pyx_L14_except_return;
        }
        goto __pyx_L13_except_error;

     154:

    +155:         compared = x_as_int - y_as_int

      __pyx_v_compared = (__pyx_v_x_as_int - __pyx_v_y_as_int);

     156:

     157:         # Handle == and != first because they're significantly more common

     158:         # operations.

    +159:         if op == Py_EQ:

      __pyx_t_7 = (__pyx_v_op == Py_EQ);
      if (__pyx_t_7) {
    /* … */
      }

    +160:             return compared == 0

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_compared == 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 27, 0, __PYX_ERR(0, 160, __pyx_L1_error));
        goto __pyx_L0;

    +161:         elif op == Py_NE:

      __pyx_t_7 = (__pyx_v_op == Py_NE);
      if (__pyx_t_7) {
    /* … */
      }

    +162:             return compared != 0

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_compared != 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 34, 0, __PYX_ERR(0, 162, __pyx_L1_error));
        goto __pyx_L0;

    +163:         elif op == Py_LT:

      __pyx_t_7 = (__pyx_v_op == Py_LT);
      if (__pyx_t_7) {
    /* … */
      }

    +164:             return compared < 0

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_compared < 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 41, 0, __PYX_ERR(0, 164, __pyx_L1_error));
        goto __pyx_L0;

    +165:         elif op == Py_LE:

      __pyx_t_7 = (__pyx_v_op == Py_LE);
      if (__pyx_t_7) {
    /* … */
      }

    +166:             return compared <= 0

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_compared <= 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 48, 0, __PYX_ERR(0, 166, __pyx_L1_error));
        goto __pyx_L0;

    +167:         elif op == Py_GT:

      __pyx_t_7 = (__pyx_v_op == Py_GT);
      if (__pyx_t_7) {
    /* … */
      }

    +168:             return compared > 0

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_compared > 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 55, 0, __PYX_ERR(0, 168, __pyx_L1_error));
        goto __pyx_L0;

    +169:         elif op == Py_GE:

      __pyx_t_7 = (__pyx_v_op == Py_GE);
      if (likely(__pyx_t_7)) {
    /* … */
      }

    +170:             return compared >= 0

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_compared >= 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_r = __pyx_t_4;
        __pyx_t_4 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 62, 0, __PYX_ERR(0, 170, __pyx_L1_error));
        goto __pyx_L0;

     171:         else:

    +172:             raise AssertionError('%d is not an operator' % op)

      /*else*/ {
        __pyx_t_8 = NULL;
        __Pyx_INCREF(__pyx_builtin_AssertionError);
        __pyx_t_9 = __pyx_builtin_AssertionError;
        __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_op); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_d_is_not_an_operator, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_12 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 172, __pyx_L1_error)
      }

     173:

    +174:     def __repr__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_11__repr__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_11__repr__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_10__repr__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_10__repr__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47]))
      __Pyx_TraceStartFunc("__repr__", __pyx_f[0], 174, 0, 0, 0, __PYX_ERR(0, 174, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 174, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +175:         if self.symbol:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->symbol); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 175, __pyx_L1_error)
      if (__pyx_t_1) {
    /* … */
      }

    +176:             return '%s(%d [%s])' % (type(self).__name__, self.sid, self.symbol)

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_2), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_self->symbol), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5[0] = __pyx_t_3;
        __pyx_t_5[1] = __pyx_mstate_global->__pyx_kp_u__2;
        __pyx_t_5[2] = __pyx_t_4;
        __pyx_t_5[3] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_5[4] = __pyx_t_2;
        __pyx_t_5[5] = __pyx_mstate_global->__pyx_kp_u__4;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 4, 0, __PYX_ERR(0, 176, __pyx_L1_error));
        goto __pyx_L0;

     177:         else:

    +178:             return '%s(%d)' % (type(self).__name__, self.sid)

      /*else*/ {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->sid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_6), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7[0] = __pyx_t_2;
        __pyx_t_7[1] = __pyx_mstate_global->__pyx_kp_u__2;
        __pyx_t_7[2] = __pyx_t_4;
        __pyx_t_7[3] = __pyx_mstate_global->__pyx_kp_u__5;
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 4, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4));
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        __Pyx_TraceReturnValue(__pyx_r, 14, 0, __PYX_ERR(0, 178, __pyx_L1_error));
        goto __pyx_L0;
      }

     179:

    +180:     cpdef __reduce__(self):

    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_13__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_6assets_7_assets_5Asset___reduce__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 180, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 180, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_6assets_7_assets_5Asset_13__reduce__)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 180, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 180, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_13__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_5Asset_12__reduce__, "\n        Function used by pickle to determine how to serialize/deserialize this\n        class.  Should return a tuple whose first element is self.__class__,\n        and whose second element is a tuple of all the attributes that should\n        be serialized/deserialized during pickling.\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_5Asset_13__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_5Asset_13__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_5Asset_12__reduce__};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_13__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_12__reduce__(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_12__reduce__(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48]))
      __Pyx_TraceStartFunc("__reduce__ (wrapper)", __pyx_f[0], 180, 0, 0, 0, __PYX_ERR(0, 180, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_6assets_7_assets_5Asset___reduce__(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 180, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_5Asset_13__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Asset___reduce, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 180, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     181:         """

     182:         Function used by pickle to determine how to serialize/deserialize this

     183:         class.  Should return a tuple whose first element is self.__class__,

     184:         and whose second element is a tuple of all the attributes that should

     185:         be serialized/deserialized during pickling.

     186:         """

    +187:         return (self.__class__, (self.sid,

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    /* … */
      __pyx_t_3 = PyTuple_New(10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->exchange_info);
      __Pyx_GIVEREF(__pyx_v_self->exchange_info);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->exchange_info) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->symbol);
      __Pyx_GIVEREF(__pyx_v_self->symbol);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->symbol) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->asset_name);
      __Pyx_GIVEREF(__pyx_v_self->asset_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->asset_name) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->start_date);
      __Pyx_GIVEREF(__pyx_v_self->start_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->start_date) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->end_date);
      __Pyx_GIVEREF(__pyx_v_self->end_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->end_date) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->first_traded);
      __Pyx_GIVEREF(__pyx_v_self->first_traded);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->first_traded) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->auto_close_date);
      __Pyx_GIVEREF(__pyx_v_self->auto_close_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->auto_close_date) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->tick_size);
      __Pyx_GIVEREF(__pyx_v_self->tick_size);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->tick_size) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_t_4) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 187, __pyx_L1_error));
      goto __pyx_L0;

     188:                                  self.exchange_info,

     189:                                  self.symbol,

     190:                                  self.asset_name,

     191:                                  self.start_date,

     192:                                  self.end_date,

     193:                                  self.first_traded,

     194:                                  self.auto_close_date,

     195:                                  self.tick_size,

    +196:                                  self.price_multiplier))

      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->price_multiplier); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

     197:

    +198:     cpdef to_dict(self):

    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_15to_dict(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_6assets_7_assets_5Asset_to_dict(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49]))
      __Pyx_TraceStartFunc("to_dict", __pyx_f[0], 198, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 198, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_6assets_7_assets_5Asset_15to_dict)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 198, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 198, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_15to_dict(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_5Asset_14to_dict, "Convert to a python dict containing all attributes of the asset.\n\n        This is often useful for debugging.\n\n        Returns\n        -------\n        as_dict : dict\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_5Asset_15to_dict = {"to_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_5Asset_15to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_5Asset_14to_dict};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_15to_dict(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_dict", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_dict", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_14to_dict(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_14to_dict(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49]))
      __Pyx_TraceStartFunc("to_dict (wrapper)", __pyx_f[0], 198, 0, 0, 0, __PYX_ERR(0, 198, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_6assets_7_assets_5Asset_to_dict(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 198, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_5Asset_15to_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Asset_to_dict, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_to_dict, __pyx_t_2) < (0)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     199:         """Convert to a python dict containing all attributes of the asset.

     200:

     201:         This is often useful for debugging.

     202:

     203:         Returns

     204:         -------

     205:         as_dict : dict

     206:         """

    +207:         return {

      __Pyx_XDECREF(__pyx_r);

    +208:             'sid': self.sid,

      __pyx_t_1 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sid, __pyx_t_2) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +209:             'symbol': self.symbol,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_symbol, __pyx_v_self->symbol) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +210:             'asset_name': self.asset_name,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_asset_name, __pyx_v_self->asset_name) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +211:             'start_date': self.start_date,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_start_date, __pyx_v_self->start_date) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +212:             'end_date': self.end_date,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_end_date, __pyx_v_self->end_date) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +213:             'first_traded': self.first_traded,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_first_traded, __pyx_v_self->first_traded) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +214:             'auto_close_date': self.auto_close_date,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_auto_close_date, __pyx_v_self->auto_close_date) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +215:             'exchange': self.exchange,

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exchange); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exchange, __pyx_t_2) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +216:             'exchange_full': self.exchange_full,

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exchange_full); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exchange_full, __pyx_t_2) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +217:             'tick_size': self.tick_size,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tick_size, __pyx_v_self->tick_size) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)

    +218:             'multiplier': self.price_multiplier,

      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->price_multiplier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_multiplier, __pyx_t_2) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +219:             'exchange_info': self.exchange_info,

      if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exchange_info, __pyx_v_self->exchange_info) < (0)) __PYX_ERR(0, 208, __pyx_L1_error)
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 207, __pyx_L1_error));
      goto __pyx_L0;

     220:         }

     221:

    +222:     @classmethod

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_17from_dict(PyObject *__pyx_v_cls,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_5Asset_16from_dict, "\n        Build an Asset instance from a dict.\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_5Asset_17from_dict = {"from_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_5Asset_17from_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_5Asset_16from_dict};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_17from_dict(PyObject *__pyx_v_cls,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_dict_ = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("from_dict (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dict,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 222, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 222, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "from_dict", 0) < (0)) __PYX_ERR(0, 222, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("from_dict", 1, 1, 1, i); __PYX_ERR(0, 222, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 222, __pyx_L3_error)
        }
        __pyx_v_dict_ = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("from_dict", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 222, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.assets._assets.Asset.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_16from_dict(((PyTypeObject*)__pyx_v_cls), __pyx_v_dict_);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_16from_dict(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_dict_) {
      PyObject *__pyx_7genexpr__pyx_v_k = NULL;
      PyObject *__pyx_7genexpr__pyx_v_v = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50]))
      __Pyx_TraceStartFunc("from_dict", __pyx_f[0], 222, 0, 0, 0, __PYX_ERR(0, 222, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 222, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.from_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k);
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_5Asset_17from_dict, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Asset_from_dict, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_from_dict, __pyx_t_2) < (0)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_from_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_from_dict, __pyx_t_3) < (0)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     223:     def from_dict(cls, dict_):

     224:         """

     225:         Build an Asset instance from a dict.

     226:         """

    +227:         return cls(**{k: v for k, v in dict_.items() if k in cls._kwargnames})

      __Pyx_XDECREF(__pyx_r);
      { /* enter inner scope */
        __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = 0;
        if (unlikely(__pyx_v_dict_ == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
          __PYX_ERR(0, 227, __pyx_L5_error)
        }
        __pyx_t_7 = __Pyx_dict_iterator(__pyx_v_dict_, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 227, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3);
        __pyx_t_3 = __pyx_t_7;
        __pyx_t_7 = 0;
        while (1) {
          __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, &__pyx_t_8, NULL, __pyx_t_6);
          if (unlikely(__pyx_t_9 == 0)) break;
          if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 227, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_7);
          __pyx_t_7 = 0;
          __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_8);
          __pyx_t_8 = 0;
          __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_n_u_kwargnames); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_7genexpr__pyx_v_k, __pyx_t_8, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 227, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (__pyx_t_10) {
            if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_7genexpr__pyx_v_k, (PyObject*)__pyx_7genexpr__pyx_v_v))) __PYX_ERR(0, 227, __pyx_L5_error)
          }
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0;
        goto __pyx_L9_exit_scope;
        __pyx_L5_error:;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0;
        __Pyx_XDECREF(__pyx_7genexpr__pyx_v_v); __pyx_7genexpr__pyx_v_v = 0;
        goto __pyx_L1_error;
        __pyx_L9_exit_scope:;
      } /* exit inner scope */
      #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API
      if (Py_REFCNT(__pyx_t_2) == 1) {
        __pyx_t_1 = __pyx_t_2;
        __pyx_t_2 = 0;
      } else
      #endif
      {
        __pyx_t_1 = PyDict_Copy(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 227, __pyx_L1_error));
      goto __pyx_L0;

     228:

    +229:     def is_alive_for_session(self, session_label):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_19is_alive_for_session(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_5Asset_18is_alive_for_session, "\n        Returns whether the asset is alive at the given dt.\n\n        Parameters\n        ----------\n        session_label: pd.Timestamp\n            The desired session label to check. (midnight UTC)\n\n        Returns\n        -------\n        boolean: whether the asset is alive at the given dt.\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_5Asset_19is_alive_for_session = {"is_alive_for_session", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_5Asset_19is_alive_for_session, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_5Asset_18is_alive_for_session};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_19is_alive_for_session(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_session_label = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_alive_for_session (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_session_label,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 229, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_alive_for_session", 0) < (0)) __PYX_ERR(0, 229, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_alive_for_session", 1, 1, 1, i); __PYX_ERR(0, 229, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 229, __pyx_L3_error)
        }
        __pyx_v_session_label = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_alive_for_session", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 229, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.assets._assets.Asset.is_alive_for_session", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_18is_alive_for_session(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self), __pyx_v_session_label);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_18is_alive_for_session(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self, PyObject *__pyx_v_session_label) {
      __pyx_t_5numpy_int64_t __pyx_v_ref_start;
      __pyx_t_5numpy_int64_t __pyx_v_ref_end;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51]))
      __Pyx_TraceStartFunc("is_alive_for_session", __pyx_f[0], 229, 0, 0, 0, __PYX_ERR(0, 229, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 229, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.is_alive_for_session", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_5Asset_19is_alive_for_session, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Asset_is_alive_for_session, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_is_alive_for_session, __pyx_t_3) < (0)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     230:         """

     231:         Returns whether the asset is alive at the given dt.

     232:

     233:         Parameters

     234:         ----------

     235:         session_label: pd.Timestamp

     236:             The desired session label to check. (midnight UTC)

     237:

     238:         Returns

     239:         -------

     240:         boolean: whether the asset is alive at the given dt.

     241:         """

     242:         cdef int64_t ref_start

     243:         cdef int64_t ref_end

     244:

    +245:         ref_start = self.start_date.value

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->start_date, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyLong_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_ref_start = __pyx_t_2;

    +246:         ref_end = self.end_date.value

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->end_date, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyLong_As_npy_int64(__pyx_t_1); if (unlikely((__pyx_t_2 == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_ref_end = __pyx_t_2;

     247:

    +248:         return ref_start <= session_label.value <= ref_end

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyLong_From_npy_int64(__pyx_v_ref_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_session_label, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
      if (__Pyx_PyObject_IsTrue(__pyx_t_4)) {
        __Pyx_DECREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyLong_From_npy_int64(__pyx_v_ref_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 9, 0, __PYX_ERR(0, 248, __pyx_L1_error));
      goto __pyx_L0;

     249:

    +250:     def is_exchange_open(self, dt_minute):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_21is_exchange_open(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_5Asset_20is_exchange_open, "\n        Parameters\n        ----------\n        dt_minute: pd.Timestamp (UTC, tz-aware)\n            The minute to check.\n\n        Returns\n        -------\n        boolean: whether the asset's exchange is open at the given minute.\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_5Asset_21is_exchange_open = {"is_exchange_open", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_5Asset_21is_exchange_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_5Asset_20is_exchange_open};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_5Asset_21is_exchange_open(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_dt_minute = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("is_exchange_open (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_dt_minute,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 250, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 250, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "is_exchange_open", 0) < (0)) __PYX_ERR(0, 250, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("is_exchange_open", 1, 1, 1, i); __PYX_ERR(0, 250, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 250, __pyx_L3_error)
        }
        __pyx_v_dt_minute = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("is_exchange_open", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 250, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.assets._assets.Asset.is_exchange_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_5Asset_20is_exchange_open(((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)__pyx_v_self), __pyx_v_dt_minute);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_5Asset_20is_exchange_open(struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_self, PyObject *__pyx_v_dt_minute) {
      PyObject *__pyx_v_calendar = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52]))
      __Pyx_TraceStartFunc("is_exchange_open", __pyx_f[0], 250, 0, 0, 0, __PYX_ERR(0, 250, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 250, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Asset.is_exchange_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_calendar);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_5Asset_21is_exchange_open, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Asset_is_exchange_open, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, __pyx_mstate_global->__pyx_n_u_is_exchange_open, __pyx_t_3) < (0)) __PYX_ERR(0, 250, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     251:         """

     252:         Parameters

     253:         ----------

     254:         dt_minute: pd.Timestamp (UTC, tz-aware)

     255:             The minute to check.

     256:

     257:         Returns

     258:         -------

     259:         boolean: whether the asset's exchange is open at the given minute.

     260:         """

    +261:         calendar = get_calendar(self.exchange)

      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exchange); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_calendar = __pyx_t_1;
      __pyx_t_1 = 0;

    +262:         return calendar.is_open_on_minute(dt_minute)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __pyx_v_calendar;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_dt_minute};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_is_open_on_minute, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 6, 0, __PYX_ERR(0, 262, __pyx_L1_error));
      goto __pyx_L0;

     263:

     264:

    +265: @cython.embedsignature(False)

    struct __pyx_vtabstruct_7zipline_6assets_7_assets_Equity {
      struct __pyx_vtabstruct_7zipline_6assets_7_assets_Asset __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_6assets_7_assets_Equity *__pyx_vtabptr_7zipline_6assets_7_assets_Equity;

     266: cdef class Equity(Asset):

     267:     """

     268:     Asset subclass representing partial ownership of a company, trust, or

     269:     partnership.

     270:     """

     271:     pass

     272:

    +273: @cython.embedsignature(False)

    struct __pyx_vtabstruct_7zipline_6assets_7_assets_Future {
      struct __pyx_vtabstruct_7zipline_6assets_7_assets_Asset __pyx_base;
    };
    static struct __pyx_vtabstruct_7zipline_6assets_7_assets_Future *__pyx_vtabptr_7zipline_6assets_7_assets_Future;

     274: cdef class Future(Asset):

     275:     """Asset subclass representing ownership of a futures contract.

     276:     """

    +277:     _kwargnames = frozenset({

      __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sid) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_symbol) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_root_symbol) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_asset_name) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_start_date) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_end_date) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_notice_date) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_expiration_date) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_auto_close_date) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_first_traded) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_exchange_info) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_tick_size) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      if (PySet_Add(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_multiplier) < (0)) __PYX_ERR(0, 278, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyFrozenSet_New(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future, __pyx_mstate_global->__pyx_n_u_kwargnames, __pyx_t_2) < (0)) __PYX_ERR(0, 277, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     278:         'sid',

     279:         'symbol',

     280:         'root_symbol',

     281:         'asset_name',

     282:         'start_date',

     283:         'end_date',

     284:         'notice_date',

     285:         'expiration_date',

     286:         'auto_close_date',

     287:         'first_traded',

     288:         'exchange_info',

     289:         'tick_size',

     290:         'multiplier',

     291:     })

     292:

    +293:     def __init__(self,

    /* Python wrapper */
    static int __pyx_pw_7zipline_6assets_7_assets_6Future_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_7zipline_6assets_7_assets_6Future_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      __pyx_t_5numpy_int64_t __pyx_v_sid;
      PyObject *__pyx_v_exchange_info = 0;
      PyObject *__pyx_v_symbol = 0;
      PyObject *__pyx_v_root_symbol = 0;
      PyObject *__pyx_v_asset_name = 0;
      PyObject *__pyx_v_start_date = 0;
      PyObject *__pyx_v_end_date = 0;
      PyObject *__pyx_v_notice_date = 0;
      PyObject *__pyx_v_expiration_date = 0;
      PyObject *__pyx_v_auto_close_date = 0;
      PyObject *__pyx_v_first_traded = 0;
      PyObject *__pyx_v_tick_size = 0;
      float __pyx_v_multiplier;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sid,&__pyx_mstate_global->__pyx_n_u_exchange_info,&__pyx_mstate_global->__pyx_n_u_symbol,&__pyx_mstate_global->__pyx_n_u_root_symbol,&__pyx_mstate_global->__pyx_n_u_asset_name,&__pyx_mstate_global->__pyx_n_u_start_date,&__pyx_mstate_global->__pyx_n_u_end_date,&__pyx_mstate_global->__pyx_n_u_notice_date,&__pyx_mstate_global->__pyx_n_u_expiration_date,&__pyx_mstate_global->__pyx_n_u_auto_close_date,&__pyx_mstate_global->__pyx_n_u_first_traded,&__pyx_mstate_global->__pyx_n_u_tick_size,&__pyx_mstate_global->__pyx_n_u_multiplier,0};
      PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 293, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case 13:
            values[12] = __Pyx_ArgRef_VARARGS(__pyx_args, 12);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 12:
            values[11] = __Pyx_ArgRef_VARARGS(__pyx_args, 11);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 11:
            values[10] = __Pyx_ArgRef_VARARGS(__pyx_args, 10);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 10:
            values[9] = __Pyx_ArgRef_VARARGS(__pyx_args, 9);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  9:
            values[8] = __Pyx_ArgRef_VARARGS(__pyx_args, 8);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  8:
            values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  7:
            values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 293, __pyx_L3_error)
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
    /* … */
      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_7zipline_6assets_7_assets_6Future___init__(struct __pyx_obj_7zipline_6assets_7_assets_Future *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_sid, PyObject *__pyx_v_exchange_info, PyObject *__pyx_v_symbol, PyObject *__pyx_v_root_symbol, PyObject *__pyx_v_asset_name, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_notice_date, PyObject *__pyx_v_expiration_date, PyObject *__pyx_v_auto_close_date, PyObject *__pyx_v_first_traded, PyObject *__pyx_v_tick_size, float __pyx_v_multiplier) {
      int __pyx_r;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65]))
      __Pyx_TraceStartFunc("__init__", __pyx_f[0], 293, 0, 0, 0, __PYX_ERR(0, 293, __pyx_L1_error));
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_TraceReturnCValue(__pyx_r, __Pyx_Owned_Py_None, 0, 0, __PYX_ERR(0, 293, __pyx_L1_error));
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 293, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Future.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     294:                  int64_t sid, # sid is required

     295:                  object exchange_info, # exchange is required

     296:                  object symbol="",

     297:                  object root_symbol="",

     298:                  object asset_name="",

    +299:                  object start_date=None,

          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None));

    +300:                  object end_date=None,

          if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None));

    +301:                  object notice_date=None,

          if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None));

    +302:                  object expiration_date=None,

          if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None));

    +303:                  object auto_close_date=None,

          if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));
    /* … */
          if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None));

    +304:                  object first_traded=None,

          if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_0_001));
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 13, i); __PYX_ERR(0, 293, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case 13:
            values[12] = __Pyx_ArgRef_VARARGS(__pyx_args, 12);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 12:
            values[11] = __Pyx_ArgRef_VARARGS(__pyx_args, 11);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 11:
            values[10] = __Pyx_ArgRef_VARARGS(__pyx_args, 10);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case 10:
            values[9] = __Pyx_ArgRef_VARARGS(__pyx_args, 9);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  9:
            values[8] = __Pyx_ArgRef_VARARGS(__pyx_args, 8);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  8:
            values[7] = __Pyx_ArgRef_VARARGS(__pyx_args, 7);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  7:
            values[6] = __Pyx_ArgRef_VARARGS(__pyx_args, 6);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  6:
            values[5] = __Pyx_ArgRef_VARARGS(__pyx_args, 5);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  5:
            values[4] = __Pyx_ArgRef_VARARGS(__pyx_args, 4);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  4:
            values[3] = __Pyx_ArgRef_VARARGS(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_VARARGS(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 293, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 293, __pyx_L3_error)
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 293, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
          if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_));
    /* … */
          if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_float_0_001));
        }
        __pyx_v_sid = __Pyx_PyLong_As_npy_int64(values[0]); if (unlikely((__pyx_v_sid == ((npy_int64)-1)) && PyErr_Occurred())) __PYX_ERR(0, 294, __pyx_L3_error)
        __pyx_v_exchange_info = values[1];
        __pyx_v_symbol = values[2];
        __pyx_v_root_symbol = values[3];
        __pyx_v_asset_name = values[4];
        __pyx_v_start_date = values[5];
        __pyx_v_end_date = values[6];
        __pyx_v_notice_date = values[7];
        __pyx_v_expiration_date = values[8];
        __pyx_v_auto_close_date = values[9];
        __pyx_v_first_traded = values[10];
        __pyx_v_tick_size = values[11];
        if (values[12]) {
          __pyx_v_multiplier = __Pyx_PyFloat_AsFloat(values[12]); if (unlikely((__pyx_v_multiplier == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 306, __pyx_L3_error)
        } else {
          __pyx_v_multiplier = ((float)1.0);
        }
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 13, __pyx_nargs); __PYX_ERR(0, 293, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.assets._assets.Future.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_6Future___init__(((struct __pyx_obj_7zipline_6assets_7_assets_Future *)__pyx_v_self), __pyx_v_sid, __pyx_v_exchange_info, __pyx_v_symbol, __pyx_v_root_symbol, __pyx_v_asset_name, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_notice_date, __pyx_v_expiration_date, __pyx_v_auto_close_date, __pyx_v_first_traded, __pyx_v_tick_size, __pyx_v_multiplier);

     305:                  object tick_size=0.001,

     306:                  float multiplier=1.0):

     307:

    +308:         super().__init__(

      __pyx_t_4 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_5 = __pyx_builtin_super;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future), ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_2 = __pyx_t_3;
      __Pyx_INCREF(__pyx_t_2);

    +309:             sid,

      __pyx_t_5 = __Pyx_PyLong_From_npy_int64(__pyx_v_sid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

     310:             exchange_info,

     311:             symbol=symbol,

     312:             asset_name=asset_name,

     313:             start_date=start_date,

     314:             end_date=end_date,

     315:             first_traded=first_traded,

     316:             auto_close_date=auto_close_date,

     317:             tick_size=tick_size,

    +318:             multiplier=multiplier

      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_multiplier); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 318, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 8 : 0)] = {__pyx_t_2, __pyx_t_5, __pyx_v_exchange_info};
        __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 308, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_symbol, __pyx_v_symbol, __pyx_t_7, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_asset_name, __pyx_v_asset_name, __pyx_t_7, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_start_date, __pyx_v_start_date, __pyx_t_7, __pyx_callargs+3, 2) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_end_date, __pyx_v_end_date, __pyx_t_7, __pyx_callargs+3, 3) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_first_traded, __pyx_v_first_traded, __pyx_t_7, __pyx_callargs+3, 4) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_auto_close_date, __pyx_v_auto_close_date, __pyx_t_7, __pyx_callargs+3, 5) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_tick_size, __pyx_v_tick_size, __pyx_t_7, __pyx_callargs+3, 6) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_multiplier, __pyx_t_4, __pyx_t_7, __pyx_callargs+3, 7) < (0)) __PYX_ERR(0, 308, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     319:         )

    +320:         self.root_symbol = root_symbol

      __Pyx_INCREF(__pyx_v_root_symbol);
      __Pyx_GIVEREF(__pyx_v_root_symbol);
      __Pyx_GOTREF(__pyx_v_self->root_symbol);
      __Pyx_DECREF(__pyx_v_self->root_symbol);
      __pyx_v_self->root_symbol = __pyx_v_root_symbol;

    +321:         self.notice_date = notice_date

      __Pyx_INCREF(__pyx_v_notice_date);
      __Pyx_GIVEREF(__pyx_v_notice_date);
      __Pyx_GOTREF(__pyx_v_self->notice_date);
      __Pyx_DECREF(__pyx_v_self->notice_date);
      __pyx_v_self->notice_date = __pyx_v_notice_date;

    +322:         self.expiration_date = expiration_date

      __Pyx_INCREF(__pyx_v_expiration_date);
      __Pyx_GIVEREF(__pyx_v_expiration_date);
      __Pyx_GOTREF(__pyx_v_self->expiration_date);
      __Pyx_DECREF(__pyx_v_self->expiration_date);
      __pyx_v_self->expiration_date = __pyx_v_expiration_date;

     323:

    +324:         if auto_close_date is None:

      __pyx_t_8 = (__pyx_v_auto_close_date == Py_None);
      if (__pyx_t_8) {
    /* … */
      }

    +325:             if notice_date is None:

        __pyx_t_8 = (__pyx_v_notice_date == Py_None);
        if (__pyx_t_8) {
    /* … */
          goto __pyx_L4;
        }

    +326:                 self.auto_close_date = expiration_date

          __Pyx_INCREF(__pyx_v_expiration_date);
          __Pyx_GIVEREF(__pyx_v_expiration_date);
          __Pyx_GOTREF(__pyx_v_self->__pyx_base.auto_close_date);
          __Pyx_DECREF(__pyx_v_self->__pyx_base.auto_close_date);
          __pyx_v_self->__pyx_base.auto_close_date = __pyx_v_expiration_date;

    +327:             elif expiration_date is None:

        __pyx_t_8 = (__pyx_v_expiration_date == Py_None);
        if (__pyx_t_8) {
    /* … */
          goto __pyx_L4;
        }

    +328:                 self.auto_close_date = notice_date

          __Pyx_INCREF(__pyx_v_notice_date);
          __Pyx_GIVEREF(__pyx_v_notice_date);
          __Pyx_GOTREF(__pyx_v_self->__pyx_base.auto_close_date);
          __Pyx_DECREF(__pyx_v_self->__pyx_base.auto_close_date);
          __pyx_v_self->__pyx_base.auto_close_date = __pyx_v_notice_date;

     329:             else:

    +330:                 self.auto_close_date = min(notice_date, expiration_date)

        /*else*/ {
          __Pyx_INCREF(__pyx_v_expiration_date);
          __pyx_t_1 = __pyx_v_expiration_date;
          __Pyx_INCREF(__pyx_v_notice_date);
          __pyx_t_3 = __pyx_v_notice_date;
          __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 330, __pyx_L1_error)
          __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 330, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (__pyx_t_8) {
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_7 = __pyx_t_1;
          } else {
            __Pyx_INCREF(__pyx_t_3);
            __pyx_t_7 = __pyx_t_3;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __pyx_t_7;
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_GIVEREF(__pyx_t_1);
          __Pyx_GOTREF(__pyx_v_self->__pyx_base.auto_close_date);
          __Pyx_DECREF(__pyx_v_self->__pyx_base.auto_close_date);
          __pyx_v_self->__pyx_base.auto_close_date = __pyx_t_1;
          __pyx_t_1 = 0;
        }
        __pyx_L4:;

     331:

    +332:     cpdef __reduce__(self):

    static PyObject *__pyx_pw_7zipline_6assets_7_assets_6Future_3__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_6assets_7_assets_6Future___reduce__(struct __pyx_obj_7zipline_6assets_7_assets_Future *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66]))
      __Pyx_TraceStartFunc("__reduce__", __pyx_f[0], 332, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 332, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_6assets_7_assets_6Future_3__reduce__)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 332, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 332, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Future.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_6Future_3__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_6Future_2__reduce__, "\n        Function used by pickle to determine how to serialize/deserialize this\n        class.  Should return a tuple whose first element is self.__class__,\n        and whose second element is a tuple of all the attributes that should\n        be serialized/deserialized during pickling.\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_6Future_3__reduce__ = {"__reduce__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_6Future_3__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_6Future_2__reduce__};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_6Future_3__reduce__(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce__", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce__", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_6Future_2__reduce__(((struct __pyx_obj_7zipline_6assets_7_assets_Future *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_6Future_2__reduce__(struct __pyx_obj_7zipline_6assets_7_assets_Future *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66]))
      __Pyx_TraceStartFunc("__reduce__ (wrapper)", __pyx_f[0], 332, 0, 0, 0, __PYX_ERR(0, 332, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_6assets_7_assets_6Future___reduce__(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 332, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Future.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_6Future_3__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Future___reduce, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future, __pyx_mstate_global->__pyx_n_u_reduce, __pyx_t_2) < (0)) __PYX_ERR(0, 332, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     333:         """

     334:         Function used by pickle to determine how to serialize/deserialize this

     335:         class.  Should return a tuple whose first element is self.__class__,

     336:         and whose second element is a tuple of all the attributes that should

     337:         be serialized/deserialized during pickling.

     338:         """

    +339:         return (self.__class__, (self.sid,

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyLong_From_npy_int64(__pyx_v_self->__pyx_base.sid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    /* … */
      __pyx_t_3 = PyTuple_New(13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.exchange_info);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.exchange_info);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->__pyx_base.exchange_info) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.symbol);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.symbol);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->__pyx_base.symbol) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->root_symbol);
      __Pyx_GIVEREF(__pyx_v_self->root_symbol);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->root_symbol) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.asset_name);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.asset_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->__pyx_base.asset_name) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.start_date);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.start_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->__pyx_base.start_date) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.end_date);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.end_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->__pyx_base.end_date) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->notice_date);
      __Pyx_GIVEREF(__pyx_v_self->notice_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_self->notice_date) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->expiration_date);
      __Pyx_GIVEREF(__pyx_v_self->expiration_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 8, __pyx_v_self->expiration_date) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.auto_close_date);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.auto_close_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 9, __pyx_v_self->__pyx_base.auto_close_date) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.first_traded);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.first_traded);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 10, __pyx_v_self->__pyx_base.first_traded) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_self->__pyx_base.tick_size);
      __Pyx_GIVEREF(__pyx_v_self->__pyx_base.tick_size);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 11, __pyx_v_self->__pyx_base.tick_size) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 12, __pyx_t_4) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 339, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      __Pyx_TraceReturnValue(__pyx_r, 1, 0, __PYX_ERR(0, 339, __pyx_L1_error));
      goto __pyx_L0;

     340:                                  self.exchange_info,

     341:                                  self.symbol,

     342:                                  self.root_symbol,

     343:                                  self.asset_name,

     344:                                  self.start_date,

     345:                                  self.end_date,

     346:                                  self.notice_date,

     347:                                  self.expiration_date,

     348:                                  self.auto_close_date,

     349:                                  self.first_traded,

     350:                                  self.tick_size,

    +351:                                  self.price_multiplier))

      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->__pyx_base.price_multiplier); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

     352:

    +353:     cpdef to_dict(self):

    static PyObject *__pyx_pw_7zipline_6assets_7_assets_6Future_5to_dict(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyObject *__pyx_f_7zipline_6assets_7_assets_6Future_to_dict(struct __pyx_obj_7zipline_6assets_7_assets_Future *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_v_super_dict = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67]))
      __Pyx_TraceStartFunc("to_dict", __pyx_f[0], 353, 0, 0, __pyx_skip_dispatch, __PYX_ERR(0, 353, __pyx_L1_error));
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
        if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
          PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_to_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_7zipline_6assets_7_assets_6Future_5to_dict)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_r = __pyx_t_2;
            __pyx_t_2 = 0;
            __Pyx_TraceReturnValue(__pyx_r, 0, 0, __PYX_ERR(0, 353, __pyx_L1_error));
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L0;
          }
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
          __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
          if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
            __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
          }
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
        }
        #endif
      }
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 353, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Future.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_super_dict);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_6Future_5to_dict(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_6Future_4to_dict, "\n        Convert to a python dict.\n        ");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_6Future_5to_dict = {"to_dict", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_6Future_5to_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_6Future_4to_dict};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_6Future_5to_dict(PyObject *__pyx_v_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("to_dict (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("to_dict", 1, 0, 0, __pyx_nargs); return NULL; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("to_dict", __pyx_kwds); return NULL;}
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_6Future_4to_dict(((struct __pyx_obj_7zipline_6assets_7_assets_Future *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_6Future_4to_dict(struct __pyx_obj_7zipline_6assets_7_assets_Future *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67]))
      __Pyx_TraceStartFunc("to_dict (wrapper)", __pyx_f[0], 353, 0, 0, 0, __PYX_ERR(0, 353, __pyx_L1_error));
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_7zipline_6assets_7_assets_6Future_to_dict(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_TraceException(__pyx_lineno, 0, 0);
      #if CYTHON_USE_SYS_MONITORING
      __Pyx_TraceExceptionUnwind(0, 0);
      #else
      __Pyx_TraceReturnValue(NULL, 0, 0, __PYX_ERR(0, 353, __pyx_L1_error));
      #endif
      __Pyx_AddTraceback("zipline.assets._assets.Future.to_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_PyMonitoring_ExitScope(0);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_6Future_5to_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Future_to_dict, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future, __pyx_mstate_global->__pyx_n_u_to_dict, __pyx_t_2) < (0)) __PYX_ERR(0, 353, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     354:         """

     355:         Convert to a python dict.

     356:         """

    +357:         super_dict = super(Future, self).to_dict()

      __pyx_t_3 = NULL;
      __Pyx_INCREF(__pyx_builtin_super);
      __pyx_t_6 = __pyx_builtin_super;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Future), ((PyObject *)__pyx_v_self)};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __pyx_t_2 = __pyx_t_4;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_to_dict, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_v_super_dict = __pyx_t_1;
      __pyx_t_1 = 0;

    +358:         super_dict['root_symbol'] = self.root_symbol

      __pyx_t_1 = __pyx_v_self->root_symbol;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely((PyObject_SetItem(__pyx_v_super_dict, __pyx_mstate_global->__pyx_n_u_root_symbol, __pyx_t_1) < 0))) __PYX_ERR(0, 358, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +359:         super_dict['notice_date'] = self.notice_date

      __pyx_t_1 = __pyx_v_self->notice_date;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely((PyObject_SetItem(__pyx_v_super_dict, __pyx_mstate_global->__pyx_n_u_notice_date, __pyx_t_1) < 0))) __PYX_ERR(0, 359, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +360:         super_dict['expiration_date'] = self.expiration_date

      __pyx_t_1 = __pyx_v_self->expiration_date;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely((PyObject_SetItem(__pyx_v_super_dict, __pyx_mstate_global->__pyx_n_u_expiration_date, __pyx_t_1) < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +361:         return super_dict

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_super_dict);
      __pyx_r = __pyx_v_super_dict;
      __Pyx_TraceReturnValue(__pyx_r, 23, 0, __PYX_ERR(0, 361, __pyx_L1_error));
      goto __pyx_L0;

     362:

     363:

    +364: def make_asset_array(int size, Asset asset):

    /* Python wrapper */
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_1make_asset_array(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_7zipline_6assets_7_assets_make_asset_array, "make_asset_array(int size, Asset asset)");
    static PyMethodDef __pyx_mdef_7zipline_6assets_7_assets_1make_asset_array = {"make_asset_array", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7zipline_6assets_7_assets_1make_asset_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7zipline_6assets_7_assets_make_asset_array};
    static PyObject *__pyx_pw_7zipline_6assets_7_assets_1make_asset_array(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      int __pyx_v_size;
      struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_asset = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("make_asset_array (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_asset,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 364, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 364, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 364, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "make_asset_array", 0) < (0)) __PYX_ERR(0, 364, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("make_asset_array", 1, 2, 2, i); __PYX_ERR(0, 364, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 2)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 364, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 364, __pyx_L3_error)
        }
        __pyx_v_size = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L3_error)
        __pyx_v_asset = ((struct __pyx_obj_7zipline_6assets_7_assets_Asset *)values[1]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("make_asset_array", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 364, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("zipline.assets._assets.make_asset_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_asset), __pyx_mstate_global->__pyx_ptype_7zipline_6assets_7_assets_Asset, 1, "asset", 0))) __PYX_ERR(0, 364, __pyx_L1_error)
      __pyx_r = __pyx_pf_7zipline_6assets_7_assets_make_asset_array(__pyx_self, __pyx_v_size, __pyx_v_asset);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_7zipline_6assets_7_assets_make_asset_array(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_size, struct __pyx_obj_7zipline_6assets_7_assets_Asset *__pyx_v_asset) {
      PyArrayObject *__pyx_v_out = 0;
      PyObject *__pyx_r = NULL;
      __Pyx_TraceDeclarationsFunc
      __Pyx_TraceFrameInit(((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71]))
      __Pyx_TraceStartFunc("make_asset_array", __pyx_f[0], 364, 0, 0, 0, __PYX_ERR(0, 364, __pyx_L1_error));
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7zipline_6assets_7_assets_1make_asset_array, 0, __pyx_mstate_global->__pyx_n_u_make_asset_array, NULL, __pyx_mstate_global->__pyx_n_u_zipline_assets__assets, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_make_asset_array, __pyx_t_2) < (0)) __PYX_ERR(0, 364, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +365:     cdef np.ndarray out = np.empty([size], dtype=object)

      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 365, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 365, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_5};
        __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dtype, __pyx_builtin_object, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 365, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 365, __pyx_L1_error)
      __pyx_v_out = ((PyArrayObject *)__pyx_t_1);
      __pyx_t_1 = 0;

    +366:     out.fill(asset)

      __pyx_t_4 = ((PyObject *)__pyx_v_out);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_asset)};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_fill, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +367:     return out

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_out);
      __pyx_r = ((PyObject *)__pyx_v_out);
      __Pyx_TraceReturnValue(__pyx_r, 13, 0, __PYX_ERR(0, 367, __pyx_L1_error));
      goto __pyx_L0;