-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
175 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,27 +2,23 @@ | |
|
||
.. currentmodule:: tushare | ||
|
||
.. highlightlang:: python | ||
|
||
前言 | ||
==== | ||
|
||
大概一年以前,几个朋友和同事偶尔跟我聊到股票的数据问题,因为大多是搞开发的,所以希望能从技术的角度获取一些数据并加以分析,看是否能通过数据的量化分析发现一些影响股价涨跌的"蛛丝马迹"。从那以后,我收集整理了一些数据接口,正好那段时间因个人兴趣正在学习数据分析,利用python | ||
pandas包做了一些实践,由于个人比较喜欢pandas这个工具,通过DataFrame结构化的数据配合Python语言本身的编程功能很容易实现处理和分析,所以近来把之前收集来的股票等财经数据接口都封装成函数实现了便捷抓取,返回的数据基本都是DataFrame格式,非常便于用pandas/NumPy/Matplotlib进行数据分析和可视化。 | ||
**TuShare是一个免费、开源的python财经数据接口包。**\ 主要实现对股票等金融数据从\ **数据采集**\ 、\ **清洗加工** | ||
到 | ||
**数据存储**\ 的过程,能够为金融分析人员提供快速、整洁、和多样的便于分析的数据。考虑到python | ||
pandas包在金融量化分析中体现出的优势,TuShare返回的绝大部分的数据格式都是pandas | ||
DataFrame类型,非常便于用pandas/NumPy/Matplotlib进行数据分析和可视化。 | ||
|
||
TuShare不是一个有多么高大上的东西,也没有多少技术含量,实现相对简单,当前版本只是提供经过初步处理的数据,调用和使用非常非常简单,目的就是为做金融分析的人提供便捷、干净的数据,仅此而已。所有的数据都来自各大门户网站,尤其是sina财经,所以特别感谢新浪。如果在使用过程碰到数据源地址发生变更或者数据结构变化造成错误,请自行查找和修改,或者通过**Email:[email protected] | ||
TuShare的数据主要来源于新浪财经、凤凰财经等各大门户网站,如果在使用过程碰到数据源地址发生变更或者数据结构变化造成错误,请自行查找和修改,或者通过\ **Email:[email protected] | ||
QQ:52799046** | ||
联系我,如果有什么好的建议和意见,也请及时联系我,在此谢过。 | ||
|
||
对于后期的愿景,其实TuShare也是向往着走向“高大上”的^\_^,比如把期货等金融数据也纳入进来,另外,最关键是要做一些**数据模型** | ||
,为做量化分析的朋友,为怀揣着金融梦想立志成为Quant的朋友提供一些帮助。所以,欢迎有着同样兴趣的朋友加入进来,一起做点“让数据产生价值”的事,一起让自己的想法变成有着实际载体的具体实现。 | ||
|
||
如果您精于业务勤于研究,却对程序编码和获取其他重要数据无暇顾及,欢迎随时联系。TEL:138-1140-5077 | ||
|
||
用途 | ||
---- | ||
|
||
TuShare主要完成了对股票等金融数据从\ **数据采集**\ 、\ **数据清洗和加工** | ||
到 | ||
`数据存储 <#id33>`__\ 的过程,满足金融量化分析师和学习数据分析的人在数据获取方面的需求。 | ||
TuShare的产生完全是本人业余兴趣和学习新鲜事物的结果,以免费和开源的形式分享出来,希望对有需求的人有所帮助。如果您觉得TuShare好用,在\ `GitHub <https://github.com/waditu/tushare>`__\ 里对TuShare点一下\ **Star**\ 来就算是对她的支持,如果您也想参与其中,欢迎Fork和提交Pull | ||
Requests. | ||
|
||
.. figure:: _static/main_pic_min.png | ||
:alt: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# -*- coding:utf-8 -*- | ||
|
||
import tushare as ts | ||
import tushare.stock.classifying as ts | ||
|
||
if __name__ == '__main__': | ||
# print ts.get_area_classifyed() | ||
# print ts.get_gem_classifyed() | ||
# print ts.get_sme_classifyed() | ||
print ts.get_st_classifyed() | ||
# print ts.get_industry_classifyed() | ||
# print ts.get_concept_classifyed() | ||
# print ts.get_area_classified() | ||
# print ts.get_gem_classified() | ||
# print ts.get_sme_classified() | ||
# print ts.get_st_classified() | ||
# print ts.get_industry_classified() | ||
print ts.get_concept_classified() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,6 +207,4 @@ def get_sz50s(): | |
return df | ||
except Exception as er: | ||
print str(er) | ||
|
||
if __name__ == '__main__': | ||
print get_sz50s() | ||
|
Oops, something went wrong.