loongson/pypi/: akshare-1.16.44 metadata and description

Homepage Simple index

AKShare is an elegant and simple financial data interface library for Python, built for human beings!

author AKFamily
author_email albertandking@gmail.com
classifiers
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
  • License :: OSI Approved :: MIT License
  • Operating System :: OS Independent
description_content_type text/markdown
keywords stock,option,futures,fund,bond,index,air,finance,spider,quant,quantitative,investment,trading,algotrading,data
license MIT
provides_extras qmt
requires_dist
  • beautifulsoup4>=4.9.1
  • lxml>=4.2.1
  • pandas>=0.25
  • requests>=2.22.0
  • html5lib>=1.0.1
  • xlrd>=1.2.0
  • urllib3>=1.25.8
  • tqdm>=4.43.0
  • openpyxl>=3.0.3
  • jsonpath>=0.82
  • tabulate>=0.8.6
  • decorator>=4.4.2
  • mini-racer>=0.12.4; platform_system != "Linux"
  • py-mini-racer>=0.6.0; platform_system == "Linux"
  • akracer[py-mini-racer]>=0.0.13; platform_system == "Linux"
  • akqmt; extra == "full"
  • akqmt; extra == "qmt"
requires_python >=3.8
File Tox results History
akshare-1.16.44-py3-none-any.whl
Size
1016 KB
Type
Python Wheel
Python
3

欢迎加入专注于财经数据和量化投资的知识社区,获取《AKShare-财经数据宝典》,其汇集了财经数据的使用经验和指南,还独家分享了 众多国内外财经数据源的使用和注意事项,请点击了解更多

量化投研视频课程:《PyBroker-入门及实战》已经上架!《PyBroker-进阶及实战》正在更新!

更多视频教程已经发布:《AKShare-初阶-使用教学》、《AKShare-初阶-实战应用》、《AKShare-源码解析》、《开源项目巡礼》, 详情请关注【数据科学实战】公众号,查看更多课程信息!

广告推广:期魔方是一款非常专业本地化期货量化终端,无需部署或搭建环境,可直接调用及时和历史数据做回测实盘, 支持开箱即用的机器学习训练,策略投研、回测均免费,详情请访问期魔方官网

AKShare Logo

PyPI - Python Version PyPI Downloads Documentation Status Ruff akshare Actions Status MIT Licence code style: prettier

Overview

AKShare requires Python(64 bit) 3.8 or higher and aims to simplify the process of fetching financial data.

Write less, get more!

Installation

General

pip install akshare --upgrade

China

pip install akshare -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com  --upgrade

PR

Please check out Documentation if you want to contribute to AKShare

Docker

Pull images

docker pull registry.cn-shanghai.aliyuncs.com/akfamily/aktools:jupyter

Run Container

docker run -it registry.cn-shanghai.aliyuncs.com/akfamily/aktools:jupyter python

Test

import akshare as ak

print(ak.__version__)

Usage

Data

Code:

import akshare as ak

stock_zh_a_hist_df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20170301", end_date='20231022', adjust="")
print(stock_zh_a_hist_df)

Output:

      日期          开盘   收盘    最高  ...  振幅   涨跌幅  涨跌额  换手率
0     2017-03-01   9.49   9.49   9.55  ...  0.84  0.11  0.01  0.21
1     2017-03-02   9.51   9.43   9.54  ...  1.26 -0.63 -0.06  0.24
2     2017-03-03   9.41   9.40   9.43  ...  0.74 -0.32 -0.03  0.20
3     2017-03-06   9.40   9.45   9.46  ...  0.74  0.53  0.05  0.24
4     2017-03-07   9.44   9.45   9.46  ...  0.63  0.00  0.00  0.17
          ...    ...    ...    ...  ...   ...   ...   ...   ...
1610  2023-10-16  11.00  11.01  11.03  ...  0.73  0.09  0.01  0.26
1611  2023-10-17  11.01  11.02  11.05  ...  0.82  0.09  0.01  0.25
1612  2023-10-18  10.99  10.95  11.02  ...  1.00 -0.64 -0.07  0.34
1613  2023-10-19  10.91  10.60  10.92  ...  3.01 -3.20 -0.35  0.61
1614  2023-10-20  10.55  10.60  10.67  ...  1.51  0.00  0.00  0.27
[1615 rows x 11 columns]

Plot

Code:

import akshare as ak
import mplfinance as mpf  # Please install mplfinance as follows: pip install mplfinance

stock_us_daily_df = ak.stock_us_daily(symbol="AAPL", adjust="qfq")
stock_us_daily_df = stock_us_daily_df.set_index(["date"])
stock_us_daily_df = stock_us_daily_df["2020-04-01": "2020-04-29"]
mpf.plot(stock_us_daily_df, type="candle", mav=(3, 6, 9), volume=True, show_nontrading=False)

Output:

KLine

Communication

Welcome to join the 数据科学实战 knowledge planet to learn more about quantitative investment, please visit 数据科学实战 for more information:

data science

Pay attention to 数据科学实战 WeChat Official Accounts to get the AKShare updated info:

ds

Features

Tutorials

  1. Overview
  2. Installation
  3. Tutorial
  4. Data Dict
  5. Subjects

Contribution

AKShare is still under developing, feel free to open issues and pull requests:

Notice: We use Ruff to format the code

Statement

  1. All data provided by AKShare is just for academic research purpose;
  2. The data provided by AKShare is for reference only and does not constitute any investment proposal;
  3. Any investor based on AKShare research should pay more attention to data risk;
  4. AKShare will insist on providing open-source financial data;
  5. Based on some uncontrollable factors, some data interfaces in AKShare may be removed;
  6. Please follow the relevant open-source protocol used by AKShare;
  7. Provide HTTP API for the person who uses other program language: AKTools.

Show your style

Use the badge in your project's README.md:

[![Data: akshare](https://img.shields.io/badge/Data%20Science-AKShare-green)](https://github.com/akfamily/akshare)

Using the badge in README.rst:

.. image:: https://img.shields.io/badge/Data%20Science-AKShare-green
    :target: https://github.com/akfamily/akshare

Looks like this:

Data: akshare

Citation

Please use this bibtex if you want to cite this repository in your publications:

@misc{akshare,
    author = {Albert King},
    title = {AKShare},
    year = {2019},
    publisher = {GitHub},
    journal = {GitHub repository},
    howpublished = {\url{https://github.com/akfamily/akshare}},
}

Acknowledgement

Special thanks FuShare for the opportunity of learning from the project;

Special thanks TuShare for the opportunity of learning from the project;

Thanks for the data provided by 生意社网站;

Thanks for the data provided by 中国银行间市场交易商协会网站;

Thanks for the data provided by 99期货网站;

Thanks for the data provided by 中国外汇交易中心暨全国银行间同业拆借中心网站;

Thanks for the data provided by 金十数据网站;

Thanks for the data provided by 和讯财经网站;

Thanks for the data provided by 新浪财经网站;

Thanks for the data provided by DACHENG-XIU 网站;

Thanks for the data provided by 上海证券交易所网站;

Thanks for the data provided by 深证证券交易所网站;

Thanks for the data provided by 北京证券交易所网站;

Thanks for the data provided by 中国金融期货交易所网站;

Thanks for the data provided by 上海期货交易所网站;

Thanks for the data provided by 大连商品交易所网站;

Thanks for the data provided by 郑州商品交易所网站;

Thanks for the data provided by 上海国际能源交易中心网站;

Thanks for the data provided by Timeanddate 网站;

Thanks for the data provided by 河北省空气质量预报信息发布系统网站;

Thanks for the data provided by 南华期货网站;

Thanks for the data provided by Economic Policy Uncertainty 网站;

Thanks for the data provided by 申万指数网站;

Thanks for the data provided by 真气网网站;

Thanks for the data provided by 财富网站;

Thanks for the data provided by 中国证券投资基金业协会网站;

Thanks for the data provided by Expatistan 网站;

Thanks for the data provided by 北京市碳排放权电子交易平台网站;

Thanks for the data provided by 国家金融与发展实验室网站;

Thanks for the data provided by 东方财富网站;

Thanks for the data provided by 义乌小商品指数网站;

Thanks for the data provided by 百度迁徙网站;

Thanks for the data provided by 思知网站;

Thanks for the data provided by Currencyscoop 网站;

Thanks for the data provided by 新加坡交易所网站;

Thanks for the tutorials provided by 微信公众号: Python大咖谈.

Backer and Sponsor

JetBrains logo.