andyzsf / tushare Goto Github PK
View Code? Open in Web Editor NEWTuShare是实现对股票/期货等金融数据从数据采集、清洗加工 到 数据存储过程的工具,满足金融量化分析师和学习数据分析的人在数据获取方面的需求,它的特点是数据覆盖范围广,接口调用简单,响应快速。
License: BSD 3-Clause "New" or "Revised" License
TuShare是实现对股票/期货等金融数据从数据采集、清洗加工 到 数据存储过程的工具,满足金融量化分析师和学习数据分析的人在数据获取方面的需求,它的特点是数据覆盖范围广,接口调用简单,响应快速。
License: BSD 3-Clause "New" or "Revised" License
本接口即将停止更新,请尽快使用Pro版接口:https://tushare.pro/document/2
今天运行代码上述提示,请问作者有计划更新吗
深证 399001 和 创业板 399006 都可以,上证(999999)不可以,是不是我的方法不对?
3个期货交易所的日线数据接口好像只有上期还行,其他2个都不通了!!
http://www.czce.com.cn/portal/DFSStaticFiles/Future/2018/20181019/FutureDataDaily.txt
比如日线,周线,通用行情等接口加入获取多少个交易日的参数,比如我要算WR,我要WR28,我现在没找到可以直接获取28天数据的方法,我现在能做的操作是靠交易日历获取最近的,is_open=1的28条日期,然后把它放到end_date里面,这样如果股票有停牌的话就会出问题,我现在只能不加start_date和end_date参数,获取所有数据。我下面举个例子:
df = ts.pro_bar(api=pro, ts_code='600519.SH', adj='qfq', data_len=28)
像这样来获取28天交易数据。
代码是:
df = ts.pro_bar(api=pro, ts_code='600519.SH', adj='qfq')
for i in ['ts_code', 'pct_chg', 'change', 'pre_close', 'vol', 'amount']:
del df[i]
print(df[:28])
我得到的输出是:
trade_date open high low close
0 20200703 1550.0000 1552.5000 1516.8800 1541.7900
1 20200702 1499.0000 1550.9000 1495.0000 1544.0000
2 20200701 1468.0000 1506.1000 1464.0200 1494.2700
3 20200630 1463.1200 1468.9800 1455.1200 1462.8800
4 20200629 1448.0000 1466.0000 1437.0100 1463.1700
5 20200624 1463.6000 1465.7100 1445.0000 1460.0100
6 20200623 1418.5258 1464.9862 1417.0628 1457.5723
7 20200622 1418.6246 1427.3137 1416.7465 1422.4799
8 20200619 1403.6980 1428.6087 1398.8543 1423.3102
9 20200618 1388.7714 1396.9761 1384.0265 1396.7784
10 20200617 1395.6515 1395.6910 1379.0048 1388.8702
11 20200616 1382.4448 1397.7669 1377.1365 1387.7631
12 20200615 1385.9046 1395.3944 1365.1457 1367.1228
13 20200612 1371.2449 1400.1097 1367.4292 1400.1097
14 20200611 1394.8112 1401.7111 1380.9522 1384.3823
15 20200610 1408.6406 1416.8750 1400.7324 1407.3160
16 20200609 1391.8358 1408.6406 1384.5998 1400.2876
17 20200608 1408.6406 1418.5258 1385.9145 1389.9576
18 20200605 1389.1173 1412.4761 1384.9952 1408.6406
19 20200604 1379.9735 1394.8013 1379.9735 1391.8259
20 20200603 1398.7554 1401.2267 1379.7462 1383.2356
21 20200602 1399.7538 1411.5073 1390.5111 1394.5147
22 20200601 1365.1457 1403.7969 1365.1457 1403.2037
23 20200529 1316.8071 1354.2522 1316.8071 1350.9110
24 20200528 1322.6097 1331.4768 1305.9631 1328.5705
25 20200527 1343.3983 1344.3868 1317.6968 1322.6394
26 20200526 1354.1534 1354.2226 1339.4442 1342.4098
27 20200525 1314.7312 1350.8913 1305.8345 1347.2535
贵州茅台(600519.SH)在2020-06-24进行了分红,那一天之前的数据都和时间行情有所出入,麻烦查看一下,试了一下另外一个股票海螺水泥(600585.SH),在2020-06-18也进行了分红,那之前的数据同样出了错
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.