stefan-jansen / zipline-reloaded

Zipline, a Pythonic Algorithmic Trading Library
https://zipline.ml4trading.io
Apache License 2.0
1.03k stars 199 forks source link

Zipline run_algorithm function does not works. #228

Open gaacevedof opened 9 months ago

gaacevedof commented 9 months ago

Dear Zipline Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

* Operating System: Windows 10 * Python Version: 3.11.5 * Python Bitness: `$ python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'` * How did you install Zipline: pip install zipline-reloaded * Python packages: * # Name Version Build Channel _anaconda_depends 2023.09 py311_mkl_1 abseil-cpp 20211102.0 hd77b12b_0 absl-py 2.0.0 pypi_0 pypi aiobotocore 2.5.0 py311haa95532_0 aiofiles 22.1.0 py311haa95532_0 aiohttp 3.8.5 py311h2bbff1b_0 aioitertools 0.7.1 pyhd3eb1b0_0 aiosignal 1.2.0 pyhd3eb1b0_0 aiosqlite 0.18.0 py311haa95532_0 alabaster 0.7.12 pyhd3eb1b0_0 alembic 1.12.0 pypi_0 pypi anaconda-anon-usage 0.4.2 py311hfc23b7f_0 anaconda-catalogs 0.2.0 py311haa95532_0 anaconda-client 1.12.1 py311haa95532_0 anaconda-cloud-auth 0.1.3 py311haa95532_0 anaconda-navigator 2.5.0 py311haa95532_0 anaconda-project 0.11.1 py311haa95532_0 anyio 3.5.0 py311haa95532_0 aom 3.6.0 hd77b12b_0 appdirs 1.4.4 pyhd3eb1b0_0 argon2-cffi 21.3.0 pyhd3eb1b0_0 argon2-cffi-bindings 21.2.0 py311h2bbff1b_0 arrow 1.2.3 py311haa95532_1 arrow-cpp 11.0.0 ha81ea56_2 astor 0.8.1 pypi_0 pypi astroid 2.14.2 py311haa95532_0 astropy 5.1 py311h5bb9823_0 asttokens 2.0.5 pyhd3eb1b0_0 astunparse 1.6.3 pypi_0 pypi async-timeout 4.0.2 py311haa95532_0 atomicwrites 1.4.0 py_0 attrs 22.1.0 py311haa95532_0 automat 20.2.0 py_0 autopep8 1.6.0 pyhd3eb1b0_1 aws-c-common 0.6.8 h2bbff1b_1 aws-c-event-stream 0.1.6 hd77b12b_6 aws-checksums 0.1.11 h2bbff1b_2 aws-sdk-cpp 1.8.185 hd77b12b_1 babel 2.11.0 py311haa95532_0 backcall 0.2.0 pyhd3eb1b0_0 backports 1.1 pyhd3eb1b0_0 backports.functools_lru_cache 1.6.4 pyhd3eb1b0_0 backports.tempfile 1.0 pyhd3eb1b0_1 backports.weakref 1.0.post1 py_1 backtrader 1.9.78.123 pypi_0 pypi bcolz-zipline 1.2.6 pypi_0 pypi bcrypt 3.2.0 py311h2bbff1b_1 beautifulsoup4 4.12.2 py311haa95532_0 binaryornot 0.4.4 pyhd3eb1b0_1 black 23.3.0 py311haa95532_0 blas 1.0 mkl bleach 4.1.0 pyhd3eb1b0_0 blosc 1.21.3 h6c2663c_0 blosc2 2.0.0 pypi_0 pypi bokeh 3.2.1 py311h746a85d_0 boltons 23.0.0 py311haa95532_0 boost-cpp 1.82.0 h59b6b97_1 botocore 1.29.76 py311haa95532_0 bottleneck 1.3.5 py311h5bb9823_0 brotli 1.0.9 h2bbff1b_7 brotli-bin 1.0.9 h2bbff1b_7 brotlipy 0.7.0 py311h2bbff1b_1002 bzip2 1.0.8 he774522_0 c-ares 1.19.1 h2bbff1b_0 c-blosc2 2.8.0 hd77b12b_0 ca-certificates 2023.7.22 h56e8100_0 conda-forge cachetools 5.3.1 pypi_0 pypi certifi 2023.7.22 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py311h2bbff1b_3 cfitsio 3.470 h2bbff1b_7 chardet 4.0.0 py311haa95532_1003 charls 2.2.0 h6c2663c_0 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.0.4 py311haa95532_0 cloudpickle 2.2.1 py311haa95532_0 clyent 1.2.2 py311haa95532_1 colorama 0.4.6 py311haa95532_0 colorcet 3.0.1 py311haa95532_0 comm 0.1.2 py311haa95532_0 conda 23.9.0 py311h1ea47a8_0 conda-forge conda-build 3.26.1 py311haa95532_0 conda-content-trust 0.2.0 py311haa95532_0 conda-index 0.3.0 py311haa95532_0 conda-libmamba-solver 23.7.0 py311haa95532_0 conda-pack 0.6.0 pyhd3eb1b0_0 conda-package-handling 2.2.0 py311haa95532_0 conda-package-streaming 0.9.0 py311haa95532_0 conda-repo-cli 1.0.75 py311haa95532_0 conda-token 0.4.0 pyhd3eb1b0_0 conda-verify 3.4.2 py_1 console_shortcut 0.1.1 4 constantly 15.1.0 py311haa95532_0 contourpy 1.0.5 py311h59b6b97_0 cookiecutter 1.7.3 pyhd3eb1b0_0 cryptography 41.0.3 py311h89fc84f_0 cssselect 1.1.0 pyhd3eb1b0_0 curl 8.1.1 h2bbff1b_0 cycler 0.11.0 pyhd3eb1b0_0 cython 3.0.3 pypi_0 pypi cytoolz 0.12.0 py311h2bbff1b_0 daal4py 2023.1.1 py311h30df693_0 dal 2023.1.1 h59b6b97_48681 dask 2023.6.0 py311haa95532_0 dask-core 2023.6.0 py311haa95532_0 datasets 2.12.0 py311haa95532_0 datashader 0.15.2 py311haa95532_0 datashape 0.5.4 py311haa95532_1 dav1d 1.2.1 h2bbff1b_0 debugpy 1.6.7 py311hd77b12b_0 decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 diff-match-patch 20200713 pyhd3eb1b0_0 dill 0.3.6 py311haa95532_0 distributed 2023.6.0 py311haa95532_0 docstring-to-markdown 0.11 py311haa95532_0 docutils 0.18.1 py311haa95532_3 empyrical 0.5.5 pypi_0 pypi empyrical-reloaded 0.5.9 pypi_0 pypi entrypoints 0.4 py311haa95532_0 et_xmlfile 1.1.0 py311haa95532_0 exchange-calendars 4.5 pypi_0 pypi executing 0.8.3 pyhd3eb1b0_0 filelock 3.9.0 py311haa95532_0 flake8 6.0.0 py311haa95532_0 flask 2.2.2 py311haa95532_0 flatbuffers 23.5.26 pypi_0 pypi fmt 9.1.0 h6d14046_0 fonttools 4.25.0 pyhd3eb1b0_0 formulaic 0.6.6 pypi_0 pypi freetype 2.12.1 ha860e81_0 frozendict 2.3.8 pypi_0 pypi frozenlist 1.3.3 py311h2bbff1b_0 fsspec 2023.4.0 py311haa95532_0 future 0.18.3 py311haa95532_0 gast 0.5.4 pypi_0 pypi gensim 4.3.0 py311heda8569_0 gflags 2.2.2 ha925a31_0 giflib 5.2.1 h8cc25b3_3 glib 2.69.1 h5dc1a3c_2 glob2 0.7 pyhd3eb1b0_0 glog 0.5.0 hd77b12b_0 google-auth 2.23.3 pypi_0 pypi google-auth-oauthlib 1.0.0 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi greenlet 2.0.1 py311hd77b12b_0 grpc-cpp 1.48.2 hfe90ff0_1 grpcio 1.59.0 pypi_0 pypi h5py 3.9.0 py311h4e0e482_0 hdf5 1.12.1 h51c971a_3 heapdict 1.0.1 pyhd3eb1b0_0 holoviews 1.17.1 py311haa95532_0 html5lib 1.1 pypi_0 pypi huggingface_hub 0.15.1 py311haa95532_0 hvplot 0.8.4 py311haa95532_0 hyperlink 21.0.0 pyhd3eb1b0_0 icc_rt 2022.1.0 h6049295_2 icu 58.2 ha925a31_3 idna 3.4 py311haa95532_0 imagecodecs 2023.1.23 py311he6ff3c7_0 imageio 2.26.0 py311haa95532_0 imagesize 1.4.1 py311haa95532_0 imbalanced-learn 0.10.1 py311haa95532_1 importlib-metadata 6.0.0 py311haa95532_0 importlib_metadata 6.0.0 hd3eb1b0_0 incremental 21.3.0 pyhd3eb1b0_0 inflection 0.5.1 py311haa95532_0 iniconfig 1.1.1 pyhd3eb1b0_0 intake 0.6.8 py311haa95532_0 intel-openmp 2023.1.0 h59b6b97_46319 interface-meta 1.3.0 pypi_0 pypi intervaltree 3.1.0 pyhd3eb1b0_0 ipykernel 6.25.0 py311h746a85d_0 ipython 8.15.0 py311haa95532_0 ipython_genutils 0.2.0 pyhd3eb1b0_1 ipywidgets 8.0.4 py311haa95532_0 iso3166 2.1.1 pypi_0 pypi iso4217 1.11.20220401 pypi_0 pypi isort 5.9.3 pyhd3eb1b0_0 itemadapter 0.3.0 pyhd3eb1b0_0 itemloaders 1.0.4 pyhd3eb1b0_1 itsdangerous 2.0.1 pyhd3eb1b0_0 jaraco.classes 3.2.1 pyhd3eb1b0_0 jedi 0.18.1 py311haa95532_1 jellyfish 1.0.1 py311h36a85e1_0 jinja2 3.1.2 py311haa95532_0 jinja2-time 0.2.0 pyhd3eb1b0_3 jmespath 0.10.0 pyhd3eb1b0_0 joblib 1.2.0 py311haa95532_0 jpeg 9e h2bbff1b_1 jq 1.6 haa95532_1 json5 0.9.6 pyhd3eb1b0_0 jsonpatch 1.32 pyhd3eb1b0_0 jsonpointer 2.1 pyhd3eb1b0_0 jsonschema 4.17.3 py311haa95532_0 jupyter 1.0.0 py311haa95532_8 jupyter_client 7.4.9 py311haa95532_0 jupyter_console 6.6.3 py311haa95532_0 jupyter_core 5.3.0 py311haa95532_0 jupyter_events 0.6.3 py311haa95532_0 jupyter_server 1.23.4 py311haa95532_0 jupyter_server_fileid 0.9.0 py311haa95532_0 jupyter_server_ydoc 0.8.0 py311haa95532_1 jupyter_ydoc 0.2.4 py311haa95532_0 jupyterlab 3.6.3 py311haa95532_0 jupyterlab_pygments 0.1.2 py_0 jupyterlab_server 2.22.0 py311haa95532_0 jupyterlab_widgets 3.0.5 py311haa95532_0 kaleido-core 0.2.1 h2bbff1b_0 keras 2.14.0 pypi_0 pypi keyring 23.13.1 py311haa95532_0 kiwisolver 1.4.4 py311hd77b12b_0 korean-lunar-calendar 0.3.1 pypi_0 pypi krb5 1.20.1 h5b6d351_0 lazy-object-proxy 1.6.0 py311h2bbff1b_0 lazy_loader 0.2 py311haa95532_0 lcms2 2.12 h83e58a3_0 lerc 3.0 hd77b12b_0 libaec 1.0.4 h33f27b4_1 libarchive 3.6.2 hb62f4d4_2 libavif 0.11.1 h2bbff1b_0 libboost 1.82.0 hae598e9_1 libbrotlicommon 1.0.9 h2bbff1b_7 libbrotlidec 1.0.9 h2bbff1b_7 libbrotlienc 1.0.9 h2bbff1b_7 libclang 16.0.6 pypi_0 pypi libclang13 14.0.6 default_h8e68704_1 libcurl 8.1.1 h86230a5_0 libdeflate 1.17 h2bbff1b_0 libevent 2.1.12 h56d1f94_1 libffi 3.4.4 hd77b12b_0 libiconv 1.16 h2bbff1b_2 liblief 0.12.3 hd77b12b_0 libmamba 1.5.1 hcd6fe79_0 libmambapy 1.5.1 py311h77c03ed_0 libpng 1.6.39 h8cc25b3_0 libpq 12.15 h906ac69_1 libprotobuf 3.20.3 h23ce68f_0 libsodium 1.0.18 h62dcd97_0 libsolv 0.7.24 h23ce68f_0 libspatialindex 1.9.3 h6c2663c_0 libssh2 1.10.0 he2ea4bf_2 libta-lib 0.4.0 he774522_0 conda-forge libthrift 0.15.0 h4364b78_2 libtiff 4.5.1 hd77b12b_0 libwebp 1.3.2 hbc33d0d_0 libwebp-base 1.3.2 h2bbff1b_0 libxml2 2.10.4 h0ad7f3c_1 libxslt 1.1.37 h2bbff1b_1 libzopfli 1.0.3 ha925a31_0 linearmodels 5.3 pypi_0 pypi linkify-it-py 2.0.0 py311haa95532_0 llvmlite 0.40.0 py311hf2fb9eb_0 locket 1.0.0 py311haa95532_0 logbook 1.7.0 pypi_0 pypi lru-dict 1.2.0 pypi_0 pypi lxml 4.9.3 py311h09808a7_0 lz4 4.3.2 py311h2bbff1b_0 lz4-c 1.9.4 h2bbff1b_0 lzo 2.10 he774522_2 m2-msys2-runtime 2.5.0.17080.65c939c 3 m2-patch 2.7.5 2 m2w64-libwinpthread-git 5.0.0.4634.697f757 2 mako 1.2.4 pypi_0 pypi markdown 3.4.1 py311haa95532_0 markdown-it-py 2.2.0 py311haa95532_1 markupsafe 2.1.1 py311h2bbff1b_0 mathjax 2.7.5 haa95532_0 matplotlib 3.7.2 py311haa95532_0 matplotlib-base 3.7.2 py311hf62ec03_0 matplotlib-inline 0.1.6 py311haa95532_0 mccabe 0.7.0 pyhd3eb1b0_0 mdit-py-plugins 0.3.0 py311haa95532_0 mdurl 0.1.0 py311haa95532_0 menuinst 1.4.19 py311h59b6b97_1 mistune 0.8.4 py311h2bbff1b_1000 mkl 2023.1.0 h6b88ed4_46357 mkl-service 2.4.0 py311h2bbff1b_1 mkl_fft 1.3.8 py311h2bbff1b_0 mkl_random 1.2.4 py311h59b6b97_0 ml-dtypes 0.2.0 pypi_0 pypi more-itertools 8.12.0 pyhd3eb1b0_0 mpmath 1.3.0 py311haa95532_0 msgpack-python 1.0.3 py311h59b6b97_0 msys2-conda-epoch 20160418 1 multidict 6.0.2 py311h2bbff1b_0 multipledispatch 0.6.0 py311haa95532_0 multiprocess 0.70.14 py311haa95532_0 multitasking 0.0.11 pypi_0 pypi munkres 1.1.4 py_0 mypy_extensions 1.0.0 py311haa95532_0 navigator-updater 0.4.0 py311haa95532_1 nbclassic 0.5.5 py311haa95532_0 nbclient 0.5.13 py311haa95532_0 nbconvert 6.5.4 py311haa95532_0 nbformat 5.9.2 py311haa95532_0 nest-asyncio 1.5.6 py311haa95532_0 networkx 3.1 py311haa95532_0 nltk 3.8.1 py311haa95532_0 notebook 6.5.4 py311haa95532_1 notebook-shim 0.2.2 py311haa95532_0 numba 0.57.1 py311hf62ec03_0 numexpr 2.8.4 py311h1fcbade_1 numpy 1.24.3 py311hdab7c0b_1 numpy-base 1.24.3 py311hd01c5d8_1 numpydoc 1.5.0 py311haa95532_0 oauthlib 3.2.2 pypi_0 pypi openjpeg 2.4.0 h4fc8c34_0 openpyxl 3.0.10 py311h2bbff1b_0 openssl 3.0.11 h2bbff1b_2 opt-einsum 3.3.0 pypi_0 pypi orc 1.7.4 h623e30f_1 packaging 23.1 py311haa95532_0 pandas 2.0.3 py311hf62ec03_0 pandas-datareader 0.10.0 pypi_0 pypi pandocfilters 1.5.0 pyhd3eb1b0_0 panel 1.2.3 py311haa95532_0 param 1.13.0 py311haa95532_0 paramiko 2.8.1 pyhd3eb1b0_0 parsel 1.6.0 py311haa95532_0 parso 0.8.3 pyhd3eb1b0_0 partd 1.4.0 py311haa95532_0 pathlib 1.0.1 pyhd3eb1b0_1 pathspec 0.10.3 py311haa95532_0 patsy 0.5.3 py311haa95532_0 pcre 8.45 hd77b12b_0 pcre2 10.42 h0ff8eda_0 peewee 3.16.3 pypi_0 pypi pep8 1.7.1 py311haa95532_1 pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 9.4.0 py311hd77b12b_1 pip 23.2.1 py311haa95532_0 pkce 1.0.3 py311haa95532_0 pkginfo 1.9.6 py311haa95532_0 platformdirs 3.10.0 py311haa95532_0 plotly 5.9.0 py311haa95532_0 pluggy 1.0.0 py311haa95532_1 ply 3.11 py311haa95532_0 powershell_shortcut 0.0.1 3 poyo 0.5.0 pyhd3eb1b0_0 prometheus_client 0.14.1 py311haa95532_0 prompt-toolkit 3.0.36 py311haa95532_0 prompt_toolkit 3.0.36 hd3eb1b0_0 protego 0.1.16 py_0 protobuf 4.24.4 pypi_0 pypi psutil 5.9.0 py311h2bbff1b_0 ptyprocess 0.7.0 pyhd3eb1b0_2 pure_eval 0.2.2 pyhd3eb1b0_0 py-cpuinfo 8.0.0 pyhd3eb1b0_1 py-lief 0.12.3 py311hd77b12b_0 pyarrow 11.0.0 py311h8a3a540_1 pyasn1 0.4.8 pyhd3eb1b0_0 pyasn1-modules 0.2.8 py_0 pybind11-abi 4 hd3eb1b0_1 pycodestyle 2.10.0 py311haa95532_0 pycosat 0.6.4 py311h2bbff1b_0 pycparser 2.21 pyhd3eb1b0_0 pyct 0.5.0 py311haa95532_0 pycurl 7.45.2 py311he2ea4bf_1 pydantic 1.10.8 py311h2bbff1b_0 pydispatcher 2.0.5 py311haa95532_2 pydocstyle 6.3.0 py311haa95532_0 pyerfa 2.0.0 py311h2bbff1b_0 pyflakes 3.0.1 py311haa95532_0 pyfolio 0.9.2 pypi_0 pypi pygments 2.15.1 py311haa95532_1 pyhdfe 0.2.0 pypi_0 pypi pyjwt 2.4.0 py311haa95532_0 pylint 2.16.2 py311haa95532_0 pylint-venv 2.3.0 py311haa95532_0 pyls-spyder 0.4.0 pyhd3eb1b0_0 pyluach 2.2.0 pypi_0 pypi pynacl 1.5.0 py311h8cc25b3_0 pyodbc 4.0.34 py311hd77b12b_0 pyopenssl 23.2.0 py311haa95532_0 pyparsing 3.0.9 py311haa95532_0 pyqt 5.15.7 py311hd77b12b_0 pyqt5-sip 12.11.0 py311hd77b12b_0 pyqtwebengine 5.15.7 py311hd77b12b_0 pyrsistent 0.18.0 py311h2bbff1b_0 pysocks 1.7.1 py311haa95532_0 pytables 3.8.0 py311h4671533_3 pytest 7.4.0 py311haa95532_0 python 3.11.5 he1021f5_0 python-dateutil 2.8.2 pyhd3eb1b0_0 python-dotenv 0.21.0 py311haa95532_0 python-fastjsonschema 2.16.2 py311haa95532_0 python-interface 1.6.1 pypi_0 pypi python-json-logger 2.0.7 py311haa95532_0 python-kaleido 0.2.1 py311haa95532_0 python-libarchive-c 2.9 pyhd3eb1b0_1 python-lmdb 1.4.1 py311hd77b12b_0 python-lsp-black 1.2.1 py311haa95532_0 python-lsp-jsonrpc 1.0.0 pyhd3eb1b0_0 python-lsp-server 1.7.2 py311haa95532_0 python-slugify 5.0.2 pyhd3eb1b0_0 python-snappy 0.6.1 py311hd77b12b_0 python-tzdata 2023.3 pyhd3eb1b0_0 python-xxhash 2.0.2 py311h2bbff1b_1 python_abi 3.11 2_cp311 conda-forge pytoolconfig 1.2.5 py311haa95532_1 pytz 2023.3.post1 py311haa95532_0 pyviz_comms 2.3.0 py311haa95532_0 pywavelets 1.4.1 py311h2bbff1b_0 pywin32 305 py311h2bbff1b_0 pywin32-ctypes 0.2.0 py311haa95532_1000 pywinpty 2.0.10 py311h5da7b33_0 pyyaml 6.0 py311h2bbff1b_1 pyzmq 23.2.0 py311hd77b12b_0 qdarkstyle 3.0.2 pyhd3eb1b0_0 qstylizer 0.2.2 py311haa95532_0 qt-main 5.15.2 h879a1e9_9 qt-webengine 5.15.9 h5bd16bc_7 qtawesome 1.2.2 py311haa95532_0 qtconsole 5.4.2 py311haa95532_0 qtpy 2.2.0 py311haa95532_0 qtwebkit 5.212 h2bbfb41_5 quandl 3.7.0 pypi_0 pypi queuelib 1.5.0 py311haa95532_0 re2 2022.04.01 hd77b12b_0 regex 2022.7.9 py311h2bbff1b_0 reproc 14.2.4 hd77b12b_1 reproc-cpp 14.2.4 hd77b12b_1 requests 2.31.0 py311haa95532_0 requests-file 1.5.1 pyhd3eb1b0_0 requests-oauthlib 1.3.1 pypi_0 pypi requests-toolbelt 1.0.0 py311haa95532_0 responses 0.13.3 pyhd3eb1b0_0 rfc3339-validator 0.1.4 py311haa95532_0 rfc3986-validator 0.1.1 py311haa95532_0 rope 1.7.0 py311haa95532_0 rsa 4.9 pypi_0 pypi rtree 1.0.1 py311h2eaa2aa_0 ruamel.yaml 0.17.21 py311h2bbff1b_0 ruamel_yaml 0.17.21 py311h2bbff1b_0 s3fs 2023.4.0 py311haa95532_0 safetensors 0.3.2 py311h062c2fa_0 scikit-image 0.20.0 py311h3513d60_0 scikit-learn 1.3.0 py311hf62ec03_0 scikit-learn-intelex 2023.1.1 py311haa95532_0 scipy 1.11.1 py311hc1ccb85_0 scrapy 2.8.0 py311haa95532_0 seaborn 0.12.2 py311haa95532_0 send2trash 1.8.0 pyhd3eb1b0_1 service_identity 18.1.0 pyhd3eb1b0_1 setuptools 68.0.0 py311haa95532_0 setuptools-scm 7.1.0 pypi_0 pypi sip 6.6.2 py311hd77b12b_0 six 1.16.0 pyhd3eb1b0_1 smart_open 5.2.1 py311haa95532_0 snappy 1.1.9 h6c2663c_0 sniffio 1.2.0 py311haa95532_1 snowballstemmer 2.2.0 pyhd3eb1b0_0 sortedcontainers 2.4.0 pyhd3eb1b0_0 soupsieve 2.4 py311haa95532_0 sphinx 5.0.2 py311haa95532_0 sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0 sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0 sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0 sphinxcontrib-serializinghtml 1.1.5 pyhd3eb1b0_0 spyder 5.4.3 py311haa95532_1 spyder-kernels 2.4.4 py311haa95532_0 sqlalchemy 2.0.22 pypi_0 pypi sqlite 3.41.2 h2bbff1b_0 stack_data 0.2.0 pyhd3eb1b0_0 statsmodels 0.14.0 py311hd7041d2_0 sympy 1.11.1 py311haa95532_0 ta-lib 0.4.28 pypi_0 pypi tabulate 0.8.10 py311haa95532_0 tbb 2021.8.0 h59b6b97_0 tbb4py 2021.8.0 py311h59b6b97_0 tblib 1.7.0 pyhd3eb1b0_0 tenacity 8.2.2 py311haa95532_0 tensorboard 2.14.1 pypi_0 pypi tensorboard-data-server 0.7.1 pypi_0 pypi tensorflow 2.14.0 pypi_0 pypi tensorflow-estimator 2.14.0 pypi_0 pypi tensorflow-intel 2.14.0 pypi_0 pypi tensorflow-io-gcs-filesystem 0.31.0 pypi_0 pypi termcolor 2.3.0 pypi_0 pypi terminado 0.17.1 py311haa95532_0 text-unidecode 1.3 pyhd3eb1b0_0 textdistance 4.2.1 pyhd3eb1b0_0 threadpoolctl 2.2.0 pyh0d69192_0 three-merge 0.1.1 pyhd3eb1b0_0 tifffile 2023.4.12 py311haa95532_0 tinycss2 1.2.1 py311haa95532_0 tk 8.6.12 h2bbff1b_0 tldextract 3.2.0 pyhd3eb1b0_0 tokenizers 0.13.2 py311h49fca51_1 toml 0.10.2 pyhd3eb1b0_0 tomlkit 0.11.1 py311haa95532_0 toolz 0.12.0 py311haa95532_0 tornado 6.3.2 py311h2bbff1b_0 tqdm 4.65.0 py311h746a85d_0 trading-calendars 2.1.1 pypi_0 pypi traitlets 5.7.1 py311haa95532_0 transformers 4.32.1 py311haa95532_0 truststore 0.8.0 pyhd8ed1ab_0 conda-forge twisted 22.10.0 py311h2bbff1b_0 twisted-iocpsupport 1.0.2 py311h2bbff1b_0 typing-extensions 4.7.1 py311haa95532_0 typing_extensions 4.7.1 py311haa95532_0 tzdata 2023c h04d1e81_0 uc-micro-py 1.0.1 py311haa95532_0 ujson 5.4.0 py311hd77b12b_0 unidecode 1.2.0 pyhd3eb1b0_0 urllib3 1.26.16 py311haa95532_0 utf8proc 2.6.1 h2bbff1b_0 vc 14.2 h21ff451_1 vs2015_runtime 14.27.29016 h5e58377_2 w3lib 1.21.0 pyhd3eb1b0_0 watchdog 2.1.6 py311haa95532_0 wcwidth 0.2.5 pyhd3eb1b0_0 webencodings 0.5.1 py311haa95532_1 websocket-client 0.58.0 py311haa95532_4 werkzeug 2.2.3 py311haa95532_0 whatthepatch 1.0.2 py311haa95532_0 wheel 0.38.4 py311haa95532_0 widgetsnbextension 4.0.5 py311haa95532_0 win_inet_pton 1.1.0 py311haa95532_0 winpty 0.4.3 4 wrapt 1.14.1 py311h2bbff1b_0 xarray 2023.6.0 py311haa95532_0 xlwings 0.29.1 py311haa95532_0 xxhash 0.8.0 h2bbff1b_3 xyzservices 2022.9.0 py311haa95532_1 xz 5.4.2 h8cc25b3_0 y-py 0.5.9 py311hb6bf4ef_0 yaml 0.2.5 he774522_0 yaml-cpp 0.7.0 hd77b12b_1 yapf 0.31.0 pyhd3eb1b0_0 yarl 1.8.1 py311h2bbff1b_0 yellowbrick 1.5 pypi_0 pypi yfinance 0.2.31 pypi_0 pypi ypy-websocket 0.8.2 py311haa95532_0 zeromq 4.3.4 hd77b12b_0 zfp 1.0.0 hd77b12b_0 zict 2.2.0 py311haa95532_0 zipline-reloaded 3.0.3 pypi_0 pypi zipp 3.11.0 py311haa95532_0 zlib 1.2.13 h8cc25b3_0 zlib-ng 2.0.7 h2bbff1b_0 zope 1.0 py311haa95532_1 zope.interface 5.4.0 py311h2bbff1b_0 zstandard 0.19.0 py311h2bbff1b_0 zstd 1.5.5 hd43e919_0

Now that you know a little about me, let me tell you about the issue I am having:

I was having some problems using the run_algorithm function of the Zipline library. It was giving me some errors so I did some changes in the library.

In algorithm file, line 2284 I add .tz_localize(None) because it was giving me the error KeyError: Timestamp('2017-11-30 00:00:00+0000', tz='UTC')

sim_end_session = self.sim_params.end_session.tz_localize(None)

but now I have a new error

AttributeError Traceback (most recent call last) ~\AppData\Local\Temp\tmp_tovme1s\ipykernel_4732\1562877378.py in ?() 1 start = time() ----> 2 results = run_algorithm(start=start_date, 3 end=end_date, 4 initialize=initialize, 5 before_trading_start=before_trading_start,

~\anaconda3\Lib\site-packages\zipline\utils\run_algo.py in ?(start, end, initialize, capital_base, handle_data, before_trading_start, analyze, data_frequency, bundle, bundle_timestamp, trading_calendar, metrics_set, benchmark_returns, default_extension, extensions, strict_extensions, environ, custom_loader, blotter) 393 load_extensions(default_extension, extensions, strict_extensions, environ) 394 395 benchmark_spec = BenchmarkSpec.from_returns(benchmark_returns) 396 --> 397 return _run( 398 handle_data=handle_data, 399 initialize=initialize, 400 before_trading_start=before_trading_start,

~\anaconda3\Lib\site-packages\zipline\utils\run_algo.py in ?(handle_data, initialize, before_trading_start, analyze, algofile, algotext, defines, data_frequency, capital_base, bundle, bundle_timestamp, start, end, output, trading_calendar, print_algo, metrics_set, local_namespace, environ, blotter, custom_loader, benchmark_spec) 224 "algo_filename": getattr(algofile, "name", ""), 225 "script": algotext, 226 }, 227 ).run() --> 228 except NoBenchmark: 229 raise _RunAlgoError( 230 ( 231 "No benchmark_spec was provided, and"

~\anaconda3\Lib\site-packages\zipline\algorithm.py in ?(self, data_portal) 630 631 self.analyze(daily_stats) 632 finally: 633 self.data_portal = None --> 634 self.metrics_tracker = None 635 636 return daily_stats

~\anaconda3\Lib\site-packages\zipline\gens\tradesimulation.py in ?(self) 239 yield self._get_daily_message(dt, algo, metrics_tracker) 240 elif action == BEFORE_TRADING_START_BAR: 241 self.simulation_dt = dt 242 algo.on_dt_changed(dt) --> 243 algo.before_trading_start(self.current_data) 244 elif action == MINUTE_END: 245 minute_msg = self._get_minute_message( 246 dt,

~\anaconda3\Lib\site-packages\zipline\algorithm.py in ?(self, data) 433 434 with handle_non_market_minutes( 435 data 436 ) if self.data_frequency == "minute" else ExitStack(): --> 437 self._before_trading_start(self, data) 438 439 self._in_before_trading_start = False

~\AppData\Local\Temp\tmp_tovme1s\ipykernel_4732\1025870542.py in ?(context, data) 3 Called every day before market open. 4 """ 5 output = pipeline_output('signals') 6 context.trades = (output['longs'].astype(int) ----> 7 .append(output['shorts'].astype(int).mul(-1)) 8 .reset_index() 9 .drop_duplicates() 10 .set_index('index')

~\anaconda3\Lib\site-packages\pandas\core\generic.py in ?(self, name) 5985 and name not in self._accessors 5986 and self._info_axis._can_hold_identifiers_and_holds_name(name) 5987 ): 5988 return self[name] -> 5989 return object.getattribute(self, name)

AttributeError: 'Series' object has no attribute 'append'

I don´t know what to do here to do it works.

...

Sincerely, Gabriel

gnzsnz commented 8 months ago

it seems to be an issue with pandas API DataFrame.append and Series.append are deprecated, the recommended way forward is to use pandas.concat

if you check your error trace it states ~\AppData\Local\Temp\tmp_tovme1s\ipykernel_4732\1025870542.py in ?(context, data) meaning that the error is in your notebook. replace append by concat in your notebook code