zipline

Can't install TA-lib python issue with Microsoft Visual Studio

让人想犯罪 __ 提交于 2021-02-08 11:15:42
问题 Trying to do a simple pip install TA-lib but am getting errors, in install Microsoft visual studios 14 but still the problem persists. error code http://pastebin.com/h4jHWd1m I tried to install it manually but get this: setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail. warnings.warn('Cannot find ta-lib library, installation may fail.') running install running build running build_py running build_ext building 'talib.common' extension C:\Program Files (x86)\Microsoft

Can't install TA-lib python issue with Microsoft Visual Studio

烂漫一生 提交于 2021-02-08 11:15:32
问题 Trying to do a simple pip install TA-lib but am getting errors, in install Microsoft visual studios 14 but still the problem persists. error code http://pastebin.com/h4jHWd1m I tried to install it manually but get this: setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail. warnings.warn('Cannot find ta-lib library, installation may fail.') running install running build running build_py running build_ext building 'talib.common' extension C:\Program Files (x86)\Microsoft

初学量化交易环境搭建和问题解决

南楼画角 提交于 2020-09-29 21:42:18
前言 目前Python的版本已经到了3.8.5,但是在实际的开发中并木有太多的使用者,或者说很的多包和插件都还不支持。(我java猿一枚)目前自己属于一个量化的初学者,对python生态还不是很了解。全程靠着伸手党的本事,在搜索引擎的海洋里打怪升级,今天在这里记录下升级的心酸。 基础 Python3.6 (不要选高了,我开始就用的3.8.5,基本上和用java14一个道理) PyCharm (编码工具) Anaconda3(包及其依赖项和环境的管理工具) 安装Python 教程地址: 传送门 PyCharm安装 这个怪,你的自己打。也可选择别的怪,不强求。 Anaconda3 简介 : 包及其依赖项和环境的管理工具 资料: anaconda官网:https://www.anaconda.com/ miniconda官网:https://docs.conda.io/en/latest/miniconda.html 外国语大学:https://mirrors.bfsu.edu.cn/help/anaconda/ 清华大学的:https://mirror.tuna.tsinghua.edu.cn/help/anaconda/ 创建配置量化的环境 Anaconda3创建环境 打开Anaconda3 Prompt 创建pydev环境: conda create -n pydev python

Getting JSONDecodeError: Expecting value: line 1 column 1 (char 0) with Python + Zipline + Docker + Jupyter

强颜欢笑 提交于 2020-08-03 06:00:54
问题 I installed Zipline and Jupyter using Docker: https://github.com/quantopian/zipline/blob/master/Dockerfile I am now trying to run the following Zipline code under Jupyter %%zipline --bundle quantopian-quantl --start 2008-1-1 --end 2012-1-1 -o strat.pickle from zipline.api import symbol, order, record def initialize(context): pass def handle_data(context, data): order(symbol('AAPL'), 10) record(AAPL=data[symbol('AAPL')].price) The error message I am getting is: **JSONDecodeError: Expecting

Converting a pandas MultiIndex DataFrame from rows-wise to column-wise

时光毁灭记忆、已成空白 提交于 2019-12-21 04:17:12
问题 I'm working in zipline and pandas and have converted a pandas.Panel to a pandas.DataFrame using the to_frame() method. This is the resulting pandas.DataFrame which as you can see is multi-indexed: price major minor 2008-01-03 00:00:00+00:00 SPY 129.93 KO 26.38 PEP 64.78 2008-01-04 00:00:00+00:00 SPY 126.74 KO 26.43 PEP 64.59 2008-01-07 00:00:00+00:00 SPY 126.63 KO 27.05 PEP 66.10 2008-01-08 00:00:00+00:00 SPY 124.59 KO 27.16 PEP 66.63 I need to convert this frame to look like this: SPY KO PEP

pip install gives error: Unable to find vcvarsall.bat

我只是一个虾纸丫 提交于 2019-12-17 04:16:27
问题 Using pip install zipline on Windows 8 with Python 2.7 gives me the error: Downloading/unpacking six (from python-dateutil==2.1->delorean->zipline[all]) Running setup.py egg_info for package six Installing collected packages: blist, pytz, requests, python-dateutil, six Running setup.py install for blist building '_blist' extension error: Unable to find vcvarsall.bat Complete output from command C:\Python27\python.exe -c "import setuptools;__ file__='c:\\users\\ThatsMe\\appdata\\local\\temp\

Zipline import error. No module named zipline.transforms

大城市里の小女人 提交于 2019-12-12 08:58:46
问题 I am not able to import the zipline.transforms module >>> from zipline.transforms import batch_transform Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'zipline.transforms' 回答1: Disclaimer: I'm currently a maintainer of Zipline. I'm guessing the reason you're seeing this error is because that particular module was removed a while back (assuming you're using zipline 1.0.0 or later). If you want to do things similar to transforms you'll need

iPython magic for Zipline cannot find data bundle

狂风中的少年 提交于 2019-12-10 18:18:18
问题 I have a Python 2.7 script that runs Zipline fine on the command prompt, using --bundle=myBundle to load the custom data bundle myBundle which I have registered using extension.py . zipline run -f myAlgo.py --bundle=myBundle --start 2016-6-1 --end 2016-7-1 --data-frequency=minute Problem: However when I try to use the %zipline IPython magic to run the algorithm, the bundle argument --bundle seems to have difficulty finding myBundle . %zipline --bundle=myBundle--start 2016-6-1 --end 2016-7-1 -

Python: issue with zipline trading calendar/history

杀马特。学长 韩版系。学妹 提交于 2019-12-08 03:45:40
问题 I have an unstable/weird result with Zipline trading calendar. On one machine with Python 3.4.2x64 and Zipline 0.7.42 I can run the following code: trading.environment = TradingEnvironment(bm_symbol='^FTSE', exchange_tz='Europe/London') Holidays = list(set(tradingcalendar_lse.non_trading_days)-set(data.index)) trading.environment.trading_days = pd.date_range(start=trading.environment.trading_days[0], end=trading.environment.trading_days[-1], freq=pd.tseries.offsets.CDay(holidays=Holidays))

How to use a custom calendar in a custom zipline bundle?

限于喜欢 提交于 2019-12-05 02:54:24
问题 I have the following code in my viacsv.py file that aims to allow a custom bundle to be ingested: # # Ingest stock csv files to create a zipline data bundle import os import numpy as np import pandas as pd import datetime boDebug=True # Set True to get trace messages from zipline.utils.cli import maybe_show_progress def viacsv(symbols,start=None,end=None): # strict this in memory so that we can reiterate over it. # (Because it could be a generator and they live only once) tuSymbols = tuple