十分钟搞定pandas : http://www.cnblogs.com/chaosimple/p/4153083.html
1. 可以通过传递一个list对象来创建一个Series,pandas会默认创建整形索引:
s = pd.Series([1,3,5,np.nan,6,8]) logger.info(s) --------------------------- INIT INFO Interested in stock: 000001.XSHE INIT INFO 0 1 1 3 2 5 3 NaN 4 6 5 8 dtype: float64
=====================
1. 怎样获取所有股票基础数据
2.
Error
==============================================
您的策略异常终止: Traceback (most recent call last): File "/hammer_data/user_strategy/user_strategy.py", line 12, in init dp = get_fundamentals(query(fundamentals.financial_indicator.adjusted_net_profit).filter(fundamentals.stockcode.in_([‘000001.XSHE‘])), ‘2016-08-1‘, ‘4q‘) ValueError: get_fundamentals 传入的查询日期2016-08-01晚于当前的回测日期2016-01-04,禁止传入日期晚于当前回测日期
======================================
INIT INFO **扣非净利润***************************************************** INIT WARN 000001.XSHE 2015-12-31 17754000000 2015-09-30 11591000000 2015-06-30 5637000000 2015-03-30 19841000000 INIT INFO **扣非净利润增长率*********************************************** INIT WARN 000001.XSHE 2015-12-31 13.0036 2015-09-30 14.9331 2015-06-30 11.2932 2015-03-30 30.8255 INIT INFO **营业收入增长率************************************************* INIT WARN 000001.XSHE 2015-12-31 30.1934 2015-09-30 34.0944 2015-06-30 28.3913 2015-03-30 40.6561 INIT INFO **净资产收益率ROE(扣除/平均)************************************* INIT WARN 000001.XSHE 2015-12-31 12.3255 2015-09-30 8.2256 2015-06-30 4.2122 2015-03-30 16.3280 INIT INFO **净资产收益率ROE(扣除/加权)************************************* INIT WARN 000001.XSHE 2015-12-31 12.40 2015-09-30 8.42 2015-06-30 4.21 2015-03-30 16.38 INIT INFO **净资产收益率ROE(扣除/摊薄)************************************* INIT WARN 000001.XSHE 2015-12-31 11.2985 2015-09-30 7.6823 2015-06-30 4.1200 2015-03-30 15.1517 INIT INFO *****************************************************************
时间: 2024-10-11 01:46:24