yam-cn / pyalgotrade-cn Goto Github PK
View Code? Open in Web Editor NEWpyalgotrade tailored for Chinese stock market
License: Other
pyalgotrade tailored for Chinese stock market
License: Other
这个是都好了吗?怎么好像很久没更新了
请教下,本项目支持Py3吗?
5分钟的K线数据能回测吗??
CTPAPi中
from vnctptd import TdApi
from pyalgotrade.Xtrader.utils.logger import future_srv_logger as logger
from pyalgotrade.Xtrader.futureServer.api.ctpDataType import defineDict
我系统 win7 64
报错缺少 vnctptd 和 pyalgotrade.Xtrader ,求大神,应该怎么解决
Windows 10 64bit,
Anaconda2-2.4.1-Windows 36bit
Python 2.7.11 |Anaconda 2.4.1 (32-bit)| (default, Dec 7 2015, 14:13:17) [MSC v.1500 32 bit (Intel)] on win32
运行测试代码thrSMA.py,显示如下错误,是不是我配置有问题。
C:\Users\Ting\pyalgotrade-cn>python C:\Users\Ting\pyalgotrade-cn\stratlib\thrSMA.py Traceback (most recent call last): File "C:\Users\Ting\pyalgotrade-cn\stratlib\thrSMA.py", line 166, in <module> testStrategy() File "C:\Users\Ting\pyalgotrade-cn\stratlib\thrSMA.py", line 123, in testStrategy barfeed.loadBars(instrument, market, fromDate, toDate, filepath) File "build\bdist.win32\egg\pyalgotrade\cn\csvfeed.py", line 37, in loadBars File "C:\Anaconda2\lib\site-packages\pandas\io\parsers.py", line 498, in parser_f return _read(filepath_or_buffer, kwds) File "C:\Anaconda2\lib\site-packages\pandas\io\parsers.py", line 275, in _read parser = TextFileReader(filepath_or_buffer, **kwds) File "C:\Anaconda2\lib\site-packages\pandas\io\parsers.py", line 590, in __init__ self._make_engine(self.engine) File "C:\Anaconda2\lib\site-packages\pandas\io\parsers.py", line 731, in _make_engine self._engine = CParserWrapper(self.f, **self.options) File "C:\Anaconda2\lib\site-packages\pandas\io\parsers.py", line 1103, in __init__ self._reader = _parser.TextReader(src, **kwds) File "pandas\parser.pyx", line 353, in pandas.parser.TextReader.__cinit__ (pandas\parser.c:3246) File "pandas\parser.pyx", line 591, in pandas.parser.TextReader._setup_parser_source (pandas\parser.c:6111) IOError: File ..\histdata\minute\600288SH.csv does not exist
在运行setup.py 安装后运行示例策略报错:import Feed 问题。
在setup.py 文件的packages中加入pyalgotrade.cn ,重新运行setup.py 即可
看到day数据的样品里有600288,600289两只,里面有bought_amount和sold_amount,也看到tick数据里也是这两支样品。所以day数据是从tick里面抽取出来的吗?项目里有发布抽取函数吗?
另外setup.py的版本号依然是0.17,而且需要在package里加一句 'pyalgotrade.cn'才可以。
if is_holiday(today): # do nothing if holiday
return
elif datetime.date.today().weekday() in [5, 0]:
return
此处的[5,0] 应该是[5,6]吧?
When I run thrSMA.py, the error ImportError: No module named cn.csvfeed occurs.
终于找到提问的地方了。。。
试试好不好
我看现在策略实例里面都是回测单只股票的例子,但实际我们交易的时候,更多的情况下要管理多只股票的组合。 所以组合的回测更重要,不知道pyalgotrade-cn能否实现这个功能? 有示例代码?
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
请教 stratlib目录下的演示doubleMA.py如何设置初始资金
为什么原作者的commits全部消除掉了,能不能加上去,这样对比能看出你改了哪些地方,代码好看点
请教 Pyalgotrade 有没有设置合约大小(整点价格)的地方,就是碰到 有杠杆的品种 比如国内的商品期货 有的是1:10杠杆 有的1:5 , 股指是1:300
目前框架中有处理卖出时印花税的问题吗?在哪里实现的呢?我没有找到,请讲解下,谢谢 Orz !
各位兄弟们,我在原版的pyalgotrade底下提了个issue,但不知道有没有理我。
大家有没有知道这个问题的解决方案,或者什么原因机制要做成必须用下一根Bar的价格成交?
希望给解释一下,谢谢。
https://github.com/gbeced/pyalgotrade/issues/77
建一个wiki,添加一些利用A股数据写的策略
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.