From b7d16290fce7b92faeb161dcaa7c9030a4074c2a Mon Sep 17 00:00:00 2001 From: jindaxiang Date: Tue, 15 Oct 2024 16:49:33 +0800 Subject: [PATCH 1/6] fix: fix stock_profile_cninfo --- akshare/stock/stock_profile_cninfo.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/akshare/stock/stock_profile_cninfo.py b/akshare/stock/stock_profile_cninfo.py index d0f7b453614..358430a69bd 100644 --- a/akshare/stock/stock_profile_cninfo.py +++ b/akshare/stock/stock_profile_cninfo.py @@ -1,14 +1,14 @@ #!/usr/bin/env python # -*- coding:utf-8 -*- """ -Date: 2024/6/5 15:00 +Date: 2024/10/14 22:00 Desc: 巨潮资讯-个股-公司概况 -http://webapi.cninfo.com.cn/#/company +https://webapi.cninfo.com.cn/#/company """ import pandas as pd -import requests import py_mini_racer +import requests from akshare.datasets import get_ths_js @@ -30,14 +30,14 @@ def _get_file_content_ths(file: str = "cninfo.js") -> str: def stock_profile_cninfo(symbol: str = "600030") -> pd.DataFrame: """ 巨潮资讯-个股-公司概况 - http://webapi.cninfo.com.cn/#/company + https://webapi.cninfo.com.cn/#/company :param symbol: 股票代码 :type symbol: str :return: 公司概况 :rtype: pandas.DataFrame :raise: Exception,如果服务器返回的数据无法被解析 """ - url = "http://webapi.cninfo.com.cn/api/sysapi/p_sysapi1133" + url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1133" params = { "scode": symbol, } @@ -53,10 +53,10 @@ def stock_profile_cninfo(symbol: str = "600030") -> pd.DataFrame: "Content-Length": "0", "Host": "webapi.cninfo.com.cn", "Accept-Enckey": mcode, - "Origin": "http://webapi.cninfo.com.cn", + "Origin": "https://webapi.cninfo.com.cn", "Pragma": "no-cache", "Proxy-Connection": "keep-alive", - "Referer": "http://webapi.cninfo.com.cn/", + "Referer": "https://webapi.cninfo.com.cn/", "X-Requested-With": "XMLHttpRequest", } r = requests.post(url, params=params, headers=headers) From ff117f6b624efdf9f11d742b766fce83d33b83b5 Mon Sep 17 00:00:00 2001 From: jindaxiang Date: Tue, 15 Oct 2024 16:49:48 +0800 Subject: [PATCH 2/6] docs: update date --- docs/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/introduction.md b/docs/introduction.md index 1185b5f6380..5faa0dfcd44 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -6,7 +6,7 @@ **风险提示**:[AKShare](https://github.com/akfamily/akshare) 开源财经数据接口库所采集的数据皆来自公开的数据源,不涉及任何个人隐私数据和非公开数据。 同时本项目提供的数据接口及相关数据仅用于学术研究,任何个人、机构及团体使用本项目的数据接口及相关数据请注意商业风险。 -1. 本文档更新时间:**2024-10-14**; +1. 本文档更新时间:**2024-10-15**; 2. 如有 [AKShare](https://github.com/akfamily/akshare) 库、文档及数据的相关问题,请在 [AKShare Issues](https://github.com/akfamily/akshare/issues) 中提 Issues; 3. 欢迎关注 **数据科学实战** 微信公众号;
4. **知识星球【数据科学实战】** 2024 全新改版,聚焦于量化投资内容,欢迎加入 **知识星球【数据科学实战】** 高质量社区,里面有丰富的视频课程、问答、文章、书籍及代码等内容: From 2236e258482371b2f9a503b813522abc4d1e0ca2 Mon Sep 17 00:00:00 2001 From: jindaxiang Date: Tue, 15 Oct 2024 16:50:09 +0800 Subject: [PATCH 3/6] feat: add version 1.14.97 --- akshare/__init__.py | 3 ++- docs/changelog.md | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/akshare/__init__.py b/akshare/__init__.py index ab79d73bd5d..caf89b9c373 100644 --- a/akshare/__init__.py +++ b/akshare/__init__.py @@ -2907,9 +2907,10 @@ 1.14.94 fix: fix stock_zt_pool_strong_em interface 1.14.95 fix: fix stock_zt_pool_sub_new_em interface 1.14.96 fix: fix stock_zt_pool_sub_new_em interface +1.14.97 fix: fix stock_profile_cninfo interface """ -__version__ = "1.14.96" +__version__ = "1.14.97" __author__ = "AKFamily" import sys diff --git a/docs/changelog.md b/docs/changelog.md index 5d5a6642bb0..7ef959931c6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -80,6 +80,10 @@ ## 更新说明详情 +1.14.97 fix: fix stock_profile_cninfo interface + + 1. 修复 stock_profile_cninfo 接口 + 1.14.96 fix: fix stock_zt_pool_sub_new_em interface 1. 修复 stock_zt_pool_sub_new_em 接口 @@ -4633,6 +4637,8 @@ ## 版本更新说明 +1.14.97 fix: fix stock_profile_cninfo interface + 1.14.96 fix: fix stock_zt_pool_sub_new_em interface 1.14.95 fix: fix stock_zt_pool_sub_new_em interface From b1de4495a169cfdf404d4b2ceeed498c92088ee2 Mon Sep 17 00:00:00 2001 From: jindaxiang Date: Tue, 15 Oct 2024 17:36:45 +0800 Subject: [PATCH 4/6] docs: update docs --- .../futures_index_price_nh.py | 61 -------- .../futures_index_return_nh.py | 47 ------ .../futures_index_volatility_nh.py | 53 ------- .../futures_other_index_nh.py | 144 ------------------ docs/tutorial.md | 10 -- 5 files changed, 315 deletions(-) delete mode 100644 akshare/futures_derivative/futures_index_price_nh.py delete mode 100644 akshare/futures_derivative/futures_index_return_nh.py delete mode 100644 akshare/futures_derivative/futures_index_volatility_nh.py delete mode 100644 akshare/futures_derivative/futures_other_index_nh.py diff --git a/akshare/futures_derivative/futures_index_price_nh.py b/akshare/futures_derivative/futures_index_price_nh.py deleted file mode 100644 index fcc8d500a4f..00000000000 --- a/akshare/futures_derivative/futures_index_price_nh.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -""" -Date: 2023/11/17 18:20 -Desc: 南华期货-商品指数历史走势-价格指数-数值 -https://www.nanhua.net/nhzc/varietytrend.html -1000 点开始, 用收益率累计 -https://www.nanhua.net/ianalysis/varietyindex/price/A.json?t=1574932974280 -""" -import time - -import pandas as pd -import requests - - -def futures_index_symbol_table_nh() -> pd.DataFrame: - """ - 南华期货-南华指数所有品种一览表 - https://www.nanhua.net/ianalysis/varietyindex/price/A.json?t=1574932974280 - :return: 南华指数所有品种一览表 - :rtype: pandas.DataFrame - """ - url = "https://www.nanhua.net/ianalysis/plate-variety.json" - r = requests.get(url) - data_json = r.json() - temp_df = pd.DataFrame(data_json) - temp_df["firstday"] = pd.to_datetime(temp_df["firstday"], errors="coerce").dt.date - return temp_df - - -def futures_price_index_nh(symbol: str = "A") -> pd.DataFrame: - """ - 南华期货-南华指数单品种-价格-所有历史数据 - https://www.nanhua.net/ianalysis/varietyindex/price/A.json?t=1574932974280 - :param symbol: 通过 ak.futures_index_symbol_table_nh() 获取 - :type symbol: str - :return: 南华期货-南华指数单品种-价格-所有历史数据 - :rtype: pandas.Series - """ - symbol_df = futures_index_symbol_table_nh() - symbol_list = symbol_df["code"].tolist() - if symbol in symbol_list: - t = time.time() - url = f"https://www.nanhua.net/ianalysis/varietyindex/price/{symbol}.json?t={int(round(t * 1000))}" - r = requests.get(url) - data_json = r.json() - temp_df = pd.DataFrame(data_json) - temp_df.columns = ["date", "value"] - temp_df["date"] = pd.to_datetime(temp_df["date"], unit="ms", errors="coerce") - temp_df["date"] = temp_df["date"].dt.tz_localize("UTC") - temp_df["date"] = temp_df["date"].dt.tz_convert("Asia/Shanghai").dt.date - temp_df["value"] = pd.to_numeric(temp_df["value"], errors="coerce") - return temp_df - - -if __name__ == "__main__": - futures_index_symbol_table_nh_df = futures_index_symbol_table_nh() - print(futures_index_symbol_table_nh_df) - - futures_price_index_nh_df = futures_price_index_nh(symbol="A") - print(futures_price_index_nh_df) diff --git a/akshare/futures_derivative/futures_index_return_nh.py b/akshare/futures_derivative/futures_index_return_nh.py deleted file mode 100644 index 0b877df7813..00000000000 --- a/akshare/futures_derivative/futures_index_return_nh.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -""" -Date: 2023/11/17 18:20 -Desc: 南华期货-商品指数历史走势-收益率指数-数值 -https://www.nanhua.net/nhzc/varietytrend.html -1000 点开始, 用收益率累计 -https://www.nanhua.net/ianalysis/varietyindex/index/NHCI.json?t=1574932290494 -""" -import time - -import pandas as pd -import requests - -from akshare.futures_derivative.futures_index_price_nh import ( - futures_index_symbol_table_nh, -) - - -def futures_return_index_nh(symbol: str = "Y") -> pd.DataFrame: - """ - 南华期货-南华指数单品种-收益率-所有历史数据 - https://www.nanhua.net/ianalysis/varietyindex/index/NHCI.json?t=1574932290494 - :param symbol: 通过 ak.futures_index_symbol_table_nh() 获取 - :type symbol: str - :return: 南华指数单品种-收益率-所有历史数据 - :rtype: pandas.Series - """ - symbol_df = futures_index_symbol_table_nh() - symbol_list = symbol_df["code"].tolist() - if symbol in symbol_list: - t = time.time() - url = f"https://www.nanhua.net/ianalysis/varietyindex/index/{symbol}.json?t={int(round(t * 1000))}" - r = requests.get(url) - data_json = r.json() - temp_df = pd.DataFrame(data_json) - temp_df.columns = ["date", "value"] - temp_df["date"] = pd.to_datetime(temp_df["date"], unit="ms", errors="coerce") - temp_df["date"] = temp_df["date"].dt.tz_localize("UTC") - temp_df["date"] = temp_df["date"].dt.tz_convert("Asia/Shanghai").dt.date - temp_df["value"] = pd.to_numeric(temp_df["value"], errors="coerce") - return temp_df - - -if __name__ == "__main__": - futures_return_index_nh_df = futures_return_index_nh(symbol="NHCI") - print(futures_return_index_nh_df) diff --git a/akshare/futures_derivative/futures_index_volatility_nh.py b/akshare/futures_derivative/futures_index_volatility_nh.py deleted file mode 100644 index 4695f77169b..00000000000 --- a/akshare/futures_derivative/futures_index_volatility_nh.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -# -*- coding:utf-8 -*- -""" -Date: 2024/5/19 15:30 -Desc: 南华期货-商品指数历史走势-收益率指数-波动率 -https://www.nanhua.net/nhzc/varietytrend.html -1000 点开始, 用收益率累计 -目标地址: https://www.nanhua.net/ianalysis/volatility/20/NHCI.json?t=1574932291399 -""" - -import time - -import pandas as pd -import requests - -from akshare.futures_derivative.futures_index_price_nh import ( - futures_index_symbol_table_nh, -) - - -def futures_volatility_index_nh( - symbol: str = "NHCI", period: str = "20" -) -> pd.DataFrame: - """ - 南华期货-南华指数单品种-波动率-所有历史数据 - https://www.nanhua.net/nhzc/varietytrend.html - :param symbol: 通过 ak.futures_index_symbol_table_nh() 获取 - :type symbol: str - :param period: 波动周期 choice of {'5', '20', '60', '120'} - :type period: str - :return: 波动率-所有历史数据 - :rtype: pandas.DataFrame - """ - symbol_df = futures_index_symbol_table_nh() - if symbol in symbol_df["code"].tolist(): - t = time.time() - url = f"https://www.nanhua.net/ianalysis/volatility/{period}/{symbol}.json?t={int(round(t * 1000))}" - r = requests.get(url) - data_json = r.json() - temp_df = pd.DataFrame(data_json) - temp_df.columns = ["date", "value"] - temp_df["date"] = pd.to_datetime(temp_df["date"], unit="ms", errors="coerce") - temp_df["date"] = temp_df["date"].dt.tz_localize("UTC") - temp_df["date"] = temp_df["date"].dt.tz_convert("Asia/Shanghai").dt.date - temp_df["value"] = pd.to_numeric(temp_df["value"], errors="coerce") - return temp_df - - -if __name__ == "__main__": - futures_volatility_index_nh_df = futures_volatility_index_nh( - symbol="SA", period="5" - ) - print(futures_volatility_index_nh_df) diff --git a/akshare/futures_derivative/futures_other_index_nh.py b/akshare/futures_derivative/futures_other_index_nh.py deleted file mode 100644 index 3db466fa65c..00000000000 --- a/akshare/futures_derivative/futures_other_index_nh.py +++ /dev/null @@ -1,144 +0,0 @@ -# -*- coding:utf-8 -*- -# !/usr/bin/env python -""" -Date: 2023/12/2 19:00 -Desc: 板块指数、品种指数和相关系数矩阵 -南华期货-板块指数涨跌 -https://www.nanhua.net/nhzc/platechange.html -南华期货-品种指数涨跌 -https://www.nanhua.net/nhzc/varietychange.html -南华期货-相关系数矩阵 -https://www.nanhua.net/nhzc/correltable.html -""" - -import pandas as pd -import requests - - -def futures_board_index_nh( - start_date: str = "20231110", end_date: str = "20231116" -) -> pd.DataFrame: - """ - 南华期货-市场涨跌-板块指数涨跌 - https://www.nanhua.net/nhzc/platechange.html - :param start_date: 开始时间 - :type start_date: str - :param end_date: 结束时间 - :type end_date: str - :return: 板块指数涨跌 - :rtype: pandas.DataFrame - """ - # 获取 start_date 的数据 - url = f"https://www.nanhua.net/ianalysis/plate/{start_date[:4]}/{start_date[4:6]}/{start_date}.json" - params = {"t": "1649920913503"} - r = requests.get(url, params=params) - start_df = pd.DataFrame(r.json()) - start_df.columns = [ - "name", - "code", - start_date, - ] - - # 获取 end_date 的数据 - url = f"https://www.nanhua.net/ianalysis/plate/{end_date[:4]}/{end_date[4:6]}/{end_date}.json" - params = {"t": "1649920913503"} - r = requests.get(url, params=params) - end_df = pd.DataFrame(r.json()) - end_df.columns = [ - "name", - "code", - end_date, - ] - end_df.reset_index(inplace=True, drop=True) - - # 计算数据 - start_df = start_df.merge(end_df, on=["name", "code"], how="inner") - # 去除异常数据 IF - start_df = start_df[start_df["code"] != "IF"] - start_df["return"] = start_df[end_date] / start_df[start_date] - 1 - temp_df = start_df[["name", "return"]] - - return temp_df - - -def futures_variety_index_nh( - start_date: str = "20231110", end_date: str = "20231116" -) -> pd.DataFrame: - """ - 南华期货-市场涨跌-品种指数涨跌 - https://www.nanhua.net/nhzc/varietychange.html - :param start_date: 开始时间 - :type start_date: str - :param end_date: 结束时间 - :type end_date: str - :return: 品种指数涨跌 - :rtype: pandas.DataFrame - """ - url = f"https://www.nanhua.net/ianalysis/variety/{start_date[:4]}/{start_date[4:6]}/{start_date}.json" - params = {"t": "1649920913503"} - r = requests.get(url, params=params) - start_df = pd.DataFrame(r.json()) - start_df.columns = [ - "name", - "code", - start_date, - ] - - url = f"http://www.nanhua.net/ianalysis/variety/{end_date[:4]}/{end_date[4:6]}/{end_date}.json" - params = {"t": "1649920913503"} - r = requests.get(url, params=params) - end_df = pd.DataFrame(r.json()) - end_df.columns = [ - "name", - "code", - "end_date", - ] - start_df[end_date] = end_df["end_date"] - - start_df["gap"] = start_df[end_date] - start_df[start_date] - start_df["return"] = start_df["gap"] / start_df[start_date] - - temp_df = start_df - temp_df = temp_df[["name", "return"]] - return temp_df - - -def futures_correlation_nh(date: str = "20231110", period: str = "20") -> pd.DataFrame: - """ - 南华期货-统计监控-相关系数矩阵 - https://www.nanhua.net/nhzc/correltable.html - :param date: 开始时间 - :type date: str - :param period: 周期; choice of {"5", "20", "60", "120"} - :type period: str - :return: 相关系数矩阵 - :rtype: pandas.DataFrame - """ - url = f"https://www.nanhua.net/ianalysis/correl/{period}/{date[:4]}/{date[4:6]}/{date}.json" - params = {"t": "1649920913503"} - r = requests.get(url, params=params) - temp_df = pd.DataFrame(r.json()) - temp_df.columns = [ - "品种代码1", - "品种名称1", - "品种代码2", - "品种名称2", - "相关系数", - ] - temp_df["相关系数"] = pd.to_numeric(temp_df["相关系数"], errors="coerce") - return temp_df - - -if __name__ == "__main__": - futures_board_index_nh_df = futures_board_index_nh( - start_date="20230103", end_date="20231201" - ) - print(futures_board_index_nh_df) - - futures_variety_index_nh_df = futures_variety_index_nh( - start_date="20231110", end_date="20231116" - ) - print(futures_variety_index_nh_df) - - futures_correlation_nh_df = futures_correlation_nh(date="20240816", period="20") - print(futures_correlation_nh_df) diff --git a/docs/tutorial.md b/docs/tutorial.md index b8a5d003966..18c89a21cb6 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -133,12 +133,6 @@ "weather_monthly" # 每月日出和日落数据 # 河北空气质量数据(期货-钢铁) "air_quality_hebei" # 河北空气质量数据 - # 南华期货-南华指数-波动率指数 - "futures_volatility_index_nh" # 波动率指数 - # 南华期货-南华指数-价格指数 - "futures_price_index_nh" # 价格指数 - # 南华期货-南华指数-收益率指数 - "futures_return_index_nh" # 收益率指数 # 经济政策不确定性(EPU)指数 "article_epu_index" # 主要国家和地区的经济政策不确定性(EPU)指数 # 申万行业指数 @@ -1037,10 +1031,6 @@ # 可转债溢价率分析和可转债价值分析 "bond_zh_cov_value_analysis" # 可转债溢价率分析 "bond_zh_cov_value_analysis" # 可转债价值分析 - # 南华期货 - "futures_correlation_nh" # 相关系数矩阵 - "futures_board_index_nh" # 板块指数涨跌 - "futures_variety_index_nh" # 品种指数涨跌 # 股票热度-雪球 "stock_hot_follow_xq" # 雪球-沪深股市-热度排行榜-关注排行榜 "stock_hot_tweet_xq" # 雪球-沪深股市-热度排行榜-讨论排行榜 From 4d80884bf665736ad54d8458666d7235e9fd768e Mon Sep 17 00:00:00 2001 From: jindaxiang Date: Tue, 15 Oct 2024 17:37:01 +0800 Subject: [PATCH 5/6] docs: update docs --- docs/data/futures/futures.md | 590 ----------------------------------- 1 file changed, 590 deletions(-) diff --git a/docs/data/futures/futures.md b/docs/data/futures/futures.md index 8a7daf6ce98..b84c4b4ecd3 100644 --- a/docs/data/futures/futures.md +++ b/docs/data/futures/futures.md @@ -4043,596 +4043,6 @@ print(futures_contract_detail_df) 备注:看似有 6 步,实际上专业的量化顾问可以让你多步并行,让你快速拿到实盘授权码。详细可咨询专业量化顾问。 -### 南华指数 - -#### 收益率指数 - -P.S. 该接口暂时无法访问 - -接口: futures_return_index_nh - -目标地址: https://www.nanhua.net/nhzc/varietytrend.html - -描述: 南华期货-商品指数历史走势-收益率指数 - -限量: 单次返回单个指数的所有历史数据 - -输入参数 - -| 名称 | 类型 | 描述 | -|--------|-----|----------------------------------------------------------------------| -| symbol | str | symbol="Y", 请参考南华指数品种一览表, 可以通过 ak.futures_index_symbol_table_nh() 获取 | - -南华指数品种一览表 - -| id | code | exchange | start_date | category | name | -|----:|:------|:-----------|:-----------|:---------|:--------| -| 0 | NHCI | 南华期货 | 2004-06-01 | 板块 | 南华商品指数 | -| 1 | NHMI | 南华期货 | 2004-06-01 | 板块 | 南华金属指数 | -| 2 | NHAI | 南华期货 | 2004-06-01 | 板块 | 南华农产品指数 | -| 3 | NHII | 南华期货 | 2004-06-01 | 板块 | 南华工业品指数 | -| 4 | NHECI | 南华期货 | 2004-06-01 | 板块 | 南华能化指数 | -| 5 | IF | 南华期货 | 2010-04-16 | 板块 | 南华股指指数 | -| 6 | NHPMI | 南华期货 | 2012-09-06 | 板块 | 南华贵金属指数 | -| 7 | A | 大连商品交易所 | 1994-09-19 | 品种 | 大豆 | -| 8 | AL | 上海期货交易所 | 1994-10-12 | 品种 | 铝 | -| 9 | CU | 上海期货交易所 | 1996-04-05 | 品种 | 铜 | -| 10 | RU | 上海期货交易所 | 1997-04-17 | 品种 | 橡胶 | -| 11 | M | 大连商品交易所 | 2000-07-19 | 品种 | 豆粕 | -| 12 | CF | 郑州商品交易所 | 2004-06-02 | 品种 | 棉花 | -| 13 | FU | 上海期货交易所 | 2004-08-26 | 品种 | 燃油 | -| 14 | C | 大连商品交易所 | 2004-09-23 | 品种 | 玉米 | -| 15 | SR | 郑州商品交易所 | 2006-01-09 | 品种 | 白糖 | -| 16 | Y | 大连商品交易所 | 2006-01-10 | 品种 | 豆油 | -| 17 | TA | 郑州商品交易所 | 2006-12-19 | 品种 | PTA | -| 18 | ZN | 上海期货交易所 | 2007-03-26 | 品种 | 锌 | -| 19 | L | 大连商品交易所 | 2007-07-31 | 品种 | 塑料 | -| 20 | P | 大连商品交易所 | 2007-10-29 | 品种 | 棕榈油 | -| 21 | AU | 上海期货交易所 | 2008-01-09 | 品种 | 黄金 | -| 22 | RB | 上海期货交易所 | 2009-03-27 | 品种 | 螺纹钢 | -| 23 | WR | 上海期货交易所 | 2009-03-27 | 品种 | 线材 | -| 24 | V | 大连商品交易所 | 2009-05-25 | 品种 | PVC | -| 25 | IF | 中国金融期货交易所 | 2010-04-16 | 品种 | 股指 | -| 26 | PB | 上海期货交易所 | 2011-03-24 | 品种 | 铅 | -| 27 | J | 大连商品交易所 | 2011-04-15 | 品种 | 焦炭 | -| 28 | PM | 郑州商品交易所 | 2012-01-17 | 品种 | 普麦 | -| 29 | AG | 上海期货交易所 | 2012-05-10 | 品种 | 白银 | -| 30 | RO | 郑州商品交易所 | 2012-07-16 | 品种 | 菜籽油 | -| 31 | ER | 郑州商品交易所 | 2012-07-24 | 品种 | 早籼稻 | -| 32 | WS | 郑州商品交易所 | 2012-07-24 | 品种 | 强麦 | -| 33 | FG | 郑州商品交易所 | 2012-12-03 | 品种 | 玻璃 | -| 34 | RS | 郑州商品交易所 | 2012-12-28 | 品种 | 油菜籽 | -| 35 | RM | 郑州商品交易所 | 2012-12-28 | 品种 | 菜籽粕 | -| 36 | JM | 大连商品交易所 | 2013-03-22 | 品种 | 焦煤 | -| 37 | TF | 中国金融期货交易所 | 2013-09-06 | 品种 | 五年国债 | -| 38 | BU | 上海期货交易所 | 2013-10-09 | 品种 | 沥青 | -| 39 | I | 大连商品交易所 | 2013-10-18 | 品种 | 铁矿石 | -| 40 | JD | 大连商品交易所 | 2013-11-08 | 品种 | 鸡蛋 | -| 41 | JR | 郑州商品交易所 | 2013-11-18 | 品种 | 粳稻 | -| 42 | BB | 大连商品交易所 | 2013-12-06 | 品种 | 胶合板 | -| 43 | FB | 大连商品交易所 | 2013-12-06 | 品种 | 纤维板 | -| 44 | PP | 大连商品交易所 | 2014-02-28 | 品种 | 聚丙烯 | -| 45 | HC | 上海期货交易所 | 2014-03-21 | 品种 | 热轧卷板 | -| 46 | LR | 郑州商品交易所 | 2014-07-08 | 品种 | 晚籼稻 | -| 47 | SM | 郑州商品交易所 | 2014-08-08 | 品种 | 锰硅 | -| 48 | SF | 郑州商品交易所 | 2014-08-08 | 品种 | 硅铁 | -| 49 | CS | 大连商品交易所 | 2014-12-19 | 品种 | 玉米淀粉 | -| 50 | T | 中国金融期货交易所 | 2015-03-20 | 品种 | 十年国债 | -| 51 | SN | 上海期货交易所 | 2015-03-27 | 品种 | 沪锡 | -| 52 | NI | 上海期货交易所 | 2015-03-27 | 品种 | 沪镍 | -| 53 | ME | 郑州商品交易所 | 2015-04-10 | 品种 | 甲醇 | -| 54 | IC | 中国金融期货交易所 | 2015-04-16 | 品种 | 中证500 | -| 55 | IH | 中国金融期货交易所 | 2015-04-16 | 品种 | 上证50 | -| 56 | TC | 郑州商品交易所 | 2015-05-18 | 品种 | 动力煤 | -| 57 | SC | 上海国际能源交易中心 | 2017-03-23 | 品种 | 原油 | -| 58 | CY | 郑州商品交易所 | 2017-08-18 | 品种 | 棉纱 | -| 59 | CY | 郑州商品交易所 | 2017-08-18 | 品种 | 棉纱 | -| 60 | AP | 郑州商品交易所 | 2018-01-31 | 品种 | 苹果 | -| 61 | SC | 上海国际能源交易中心 | 2018-03-26 | 品种 | 原油 | -| 62 | SP | 上海期货交易所 | 2018-11-28 | 品种 | 纸浆 | -| 63 | EG | 大连商品交易所 | 2018-12-12 | 品种 | 乙二醇 | -| 64 | CJ | 郑州商品交易所 | 2019-04-30 | 品种 | 红枣 | -| 65 | UR | 郑州商品交易所 | 2019-08-12 | 品种 | 尿素 | -| 66 | NR | 上海国际能源交易中心 | 2019-08-15 | 品种 | 20号胶 | -| 67 | RR | 大连商品交易所 | 2019-08-20 | 品种 | 粳米 | -| 68 | B | 大连商品交易所 | 2019-09-02 | 品种 | 豆二 | -| 69 | SS | 上海期货交易所 | 2019-09-25 | 品种 | 不锈钢 | -| 70 | EB | 大连商品交易所 | 2019-10-08 | 品种 | 苯乙烯 | -| 71 | SA | 郑州商品交易所 | 2019-12-06 | 品种 | 纯碱 | - -输出参数 - -| 名称 | 类型 | 描述 | -|-------|---------|------| -| date | object | - | -| value | float64 | 指数数值 | - -接口示例 - -```python -import akshare as ak - -futures_return_index_nh_df = ak.futures_return_index_nh(symbol='NHCI') -print(futures_return_index_nh_df) -``` - -数据示例 - -``` - date value -0 2004-06-01 1000.00000 -1 2004-06-02 1010.57000 -2 2004-06-03 992.78000 -3 2004-06-04 990.27000 -4 2004-06-07 996.31000 - ... ... -4727 2023-11-10 2554.80341 -4728 2023-11-13 2549.07398 -4729 2023-11-14 2561.94167 -4730 2023-11-15 2580.51591 -4731 2023-11-16 2578.79908 -[4732 rows x 2 columns] -``` - -#### 价格指数 - -P.S. 该接口暂时无法访问 - -接口: futures_price_index_nh - -目标地址: https://www.nanhua.net/nhzc/varietytrend.html - -描述: 南华期货-商品指数历史走势-价格指数 - -限量: 单次返回指定 symbol 的所有历史数据;价格指数只有单个品种的数据 - -输入参数 - -| 名称 | 类型 | 描述 | -|--------|-----|----------------------------------------------------------------------| -| symbol | str | symbol="A", 请参考南华指数品种一览表, 可以通过 ak.futures_index_symbol_table_nh() 获取 | - -南华指数品种一览表 - -| | name | firstday | code | exchange | indexcategory | -|---:|:--------|:-----------|:------|:-----------|:--------------| -| 0 | 南华商品指数 | 2004-06-01 | NHCI | 南华期货 | 板块 | -| 1 | 南华金属指数 | 2004-06-01 | NHMI | 南华期货 | 板块 | -| 2 | 南华农产品指数 | 2004-06-01 | NHAI | 南华期货 | 板块 | -| 3 | 南华工业品指数 | 2004-06-01 | NHII | 南华期货 | 板块 | -| 4 | 南华能化指数 | 2004-06-01 | NHECI | 南华期货 | 板块 | -| 5 | 南华股指指数 | 2010-04-16 | IF | 南华期货 | 板块 | -| 6 | 南华贵金属指数 | 2012-09-06 | NHPMI | 南华期货 | 板块 | -| 7 | 大豆 | 1994-09-19 | A | 大连商品交易所 | 品种 | -| 8 | 铝 | 1994-10-12 | AL | 上海期货交易所 | 品种 | -| 9 | 铜 | 1996-04-05 | CU | 上海期货交易所 | 品种 | -| 10 | 橡胶 | 1997-04-17 | RU | 上海期货交易所 | 品种 | -| 11 | 豆粕 | 2000-07-19 | M | 大连商品交易所 | 品种 | -| 12 | 棉花 | 2004-06-02 | CF | 郑州商品交易所 | 品种 | -| 13 | 燃油 | 2004-08-26 | FU | 上海期货交易所 | 品种 | -| 14 | 玉米 | 2004-09-23 | C | 大连商品交易所 | 品种 | -| 15 | 白糖 | 2006-01-09 | SR | 郑州商品交易所 | 品种 | -| 16 | 豆油 | 2006-01-10 | Y | 大连商品交易所 | 品种 | -| 17 | PTA | 2006-12-19 | TA | 郑州商品交易所 | 品种 | -| 18 | 锌 | 2007-03-26 | ZN | 上海期货交易所 | 品种 | -| 19 | 塑料 | 2007-07-31 | L | 大连商品交易所 | 品种 | -| 20 | 棕榈油 | 2007-10-29 | P | 大连商品交易所 | 品种 | -| 21 | 黄金 | 2008-01-09 | AU | 上海期货交易所 | 品种 | -| 22 | 螺纹钢 | 2009-03-27 | RB | 上海期货交易所 | 品种 | -| 23 | 线材 | 2009-03-27 | WR | 上海期货交易所 | 品种 | -| 24 | PVC | 2009-05-25 | V | 大连商品交易所 | 品种 | -| 25 | 股指 | 2010-04-16 | IF | 中国金融期货交易所 | 品种 | -| 26 | 铅 | 2011-03-24 | PB | 上海期货交易所 | 品种 | -| 27 | 焦炭 | 2011-04-15 | J | 大连商品交易所 | 品种 | -| 28 | 普麦 | 2012-01-17 | PM | 郑州商品交易所 | 品种 | -| 29 | 白银 | 2012-05-10 | AG | 上海期货交易所 | 品种 | -| 30 | 菜籽油 | 2012-07-16 | RO | 郑州商品交易所 | 品种 | -| 31 | 早籼稻 | 2012-07-24 | ER | 郑州商品交易所 | 品种 | -| 32 | 强麦 | 2012-07-24 | WS | 郑州商品交易所 | 品种 | -| 33 | 玻璃 | 2012-12-03 | FG | 郑州商品交易所 | 品种 | -| 34 | 油菜籽 | 2012-12-28 | RS | 郑州商品交易所 | 品种 | -| 35 | 菜籽粕 | 2012-12-28 | RM | 郑州商品交易所 | 品种 | -| 36 | 焦煤 | 2013-03-22 | JM | 大连商品交易所 | 品种 | -| 37 | 五年国债 | 2013-09-06 | TF | 中国金融期货交易所 | 品种 | -| 38 | 沥青 | 2013-10-09 | BU | 上海期货交易所 | 品种 | -| 39 | 铁矿石 | 2013-10-18 | I | 大连商品交易所 | 品种 | -| 40 | 鸡蛋 | 2013-11-08 | JD | 大连商品交易所 | 品种 | -| 41 | 粳稻 | 2013-11-18 | JR | 郑州商品交易所 | 品种 | -| 42 | 胶合板 | 2013-12-06 | BB | 大连商品交易所 | 品种 | -| 43 | 纤维板 | 2013-12-06 | FB | 大连商品交易所 | 品种 | -| 44 | 聚丙烯 | 2014-02-28 | PP | 大连商品交易所 | 品种 | -| 45 | 热轧卷板 | 2014-03-21 | HC | 上海期货交易所 | 品种 | -| 46 | 晚籼稻 | 2014-07-08 | LR | 郑州商品交易所 | 品种 | -| 47 | 锰硅 | 2014-08-08 | SM | 郑州商品交易所 | 品种 | -| 48 | 硅铁 | 2014-08-08 | SF | 郑州商品交易所 | 品种 | -| 49 | 玉米淀粉 | 2014-12-19 | CS | 大连商品交易所 | 品种 | -| 50 | 十年国债 | 2015-03-20 | T | 中国金融期货交易所 | 品种 | -| 51 | 沪锡 | 2015-03-27 | SN | 上海期货交易所 | 品种 | -| 52 | 沪镍 | 2015-03-27 | NI | 上海期货交易所 | 品种 | -| 53 | 甲醇 | 2015-04-10 | ME | 郑州商品交易所 | 品种 | -| 54 | 中证500 | 2015-04-16 | IC | 中国金融期货交易所 | 品种 | -| 55 | 上证50 | 2015-04-16 | IH | 中国金融期货交易所 | 品种 | -| 56 | 动力煤 | 2015-05-18 | TC | 郑州商品交易所 | 品种 | -| 57 | 原油 | 2017-03-23 | SC | 上海国际能源交易中心 | 品种 | -| 58 | 棉纱 | 2017-08-18 | CY | 郑州商品交易所 | 品种 | -| 59 | 棉纱 | 2017-08-18 | CY | 郑州商品交易所 | 品种 | -| 60 | 苹果 | 2018-01-31 | AP | 郑州商品交易所 | 品种 | -| 61 | 原油 | 2018-03-26 | SC | 上海国际能源交易中心 | 品种 | -| 62 | 纸浆 | 2018-11-28 | SP | 上海期货交易所 | 品种 | -| 63 | 乙二醇 | 2018-12-12 | EG | 大连商品交易所 | 品种 | -| 64 | 红枣 | 2019-04-30 | CJ | 郑州商品交易所 | 品种 | -| 65 | 尿素 | 2019-08-12 | UR | 郑州商品交易所 | 品种 | -| 66 | 20号胶 | 2019-08-15 | NR | 上海国际能源交易中心 | 品种 | -| 67 | 粳米 | 2019-08-20 | RR | 大连商品交易所 | 品种 | -| 68 | 豆二 | 2019-09-02 | B | 大连商品交易所 | 品种 | -| 69 | 不锈钢 | 2019-09-25 | SS | 上海期货交易所 | 品种 | -| 70 | 苯乙烯 | 2019-10-08 | EB | 大连商品交易所 | 品种 | -| 71 | 纯碱 | 2019-12-06 | SA | 郑州商品交易所 | 品种 | - -输出参数 - -| 名称 | 类型 | 描述 | -|-------|--------|------| -| date | object | - | -| value | float | 指数数值 | - -接口示例 - -```python -import akshare as ak - -futures_price_index_nh_df = ak.futures_price_index_nh(symbol="A") -print(futures_price_index_nh_df) -``` - -数据示例 - -``` - date value -0 2004-06-01 3182.47 -1 2004-06-02 3253.56 -2 2004-06-03 3228.85 -3 2004-06-04 3240.11 -4 2004-06-07 3206.05 - ... ... -4724 2023-11-10 4922.75 -4725 2023-11-13 4919.87 -4726 2023-11-14 4939.87 -4727 2023-11-15 4959.57 -4728 2023-11-16 4979.44 -[4729 rows x 2 columns] -``` - -#### 波动率指数 - -P.S. 该接口暂时无法访问 - -接口: futures_volatility_index_nh - -目标地址: https://www.nanhua.net/nhzc/varietytrend.html - -描述: 南华期货-商品指数历史走势-波动率指数 - -限量: 单次返回指定 symbol 和 period 的所有历史数据 - -输入参数 - -| 名称 | 类型 | 描述 | -|--------|-----|--------------------------------------------------------------------------------------------| -| symbol | str | symbol="Y"; 注意是具体品种(不包含指数); 请参考南华指数品种一览表, 可以通过调用 **ak.futures_index_symbol_table_nh()** 获取 | -| period | str | period='20'; 波动周期; choice of {'5', '20', '60', '120'} | - -南华指数品种一览表 - -| | name | firstday | code | exchange | indexcategory | -|---:|:--------|:-----------|:------|:-----------|:--------------| -| 0 | 南华商品指数 | 2004-06-01 | NHCI | 南华期货 | 板块 | -| 1 | 南华金属指数 | 2004-06-01 | NHMI | 南华期货 | 板块 | -| 2 | 南华农产品指数 | 2004-06-01 | NHAI | 南华期货 | 板块 | -| 3 | 南华工业品指数 | 2004-06-01 | NHII | 南华期货 | 板块 | -| 4 | 南华能化指数 | 2004-06-01 | NHECI | 南华期货 | 板块 | -| 5 | 南华股指指数 | 2010-04-16 | IF | 南华期货 | 板块 | -| 6 | 南华贵金属指数 | 2012-09-06 | NHPMI | 南华期货 | 板块 | -| 7 | 大豆 | 1994-09-19 | A | 大连商品交易所 | 品种 | -| 8 | 铝 | 1994-10-12 | AL | 上海期货交易所 | 品种 | -| 9 | 铜 | 1996-04-05 | CU | 上海期货交易所 | 品种 | -| 10 | 橡胶 | 1997-04-17 | RU | 上海期货交易所 | 品种 | -| 11 | 豆粕 | 2000-07-19 | M | 大连商品交易所 | 品种 | -| 12 | 棉花 | 2004-06-02 | CF | 郑州商品交易所 | 品种 | -| 13 | 燃油 | 2004-08-26 | FU | 上海期货交易所 | 品种 | -| 14 | 玉米 | 2004-09-23 | C | 大连商品交易所 | 品种 | -| 15 | 白糖 | 2006-01-09 | SR | 郑州商品交易所 | 品种 | -| 16 | 豆油 | 2006-01-10 | Y | 大连商品交易所 | 品种 | -| 17 | PTA | 2006-12-19 | TA | 郑州商品交易所 | 品种 | -| 18 | 锌 | 2007-03-26 | ZN | 上海期货交易所 | 品种 | -| 19 | 塑料 | 2007-07-31 | L | 大连商品交易所 | 品种 | -| 20 | 棕榈油 | 2007-10-29 | P | 大连商品交易所 | 品种 | -| 21 | 黄金 | 2008-01-09 | AU | 上海期货交易所 | 品种 | -| 22 | 螺纹钢 | 2009-03-27 | RB | 上海期货交易所 | 品种 | -| 23 | 线材 | 2009-03-27 | WR | 上海期货交易所 | 品种 | -| 24 | PVC | 2009-05-25 | V | 大连商品交易所 | 品种 | -| 25 | 股指 | 2010-04-16 | IF | 中国金融期货交易所 | 品种 | -| 26 | 铅 | 2011-03-24 | PB | 上海期货交易所 | 品种 | -| 27 | 焦炭 | 2011-04-15 | J | 大连商品交易所 | 品种 | -| 28 | 普麦 | 2012-01-17 | PM | 郑州商品交易所 | 品种 | -| 29 | 白银 | 2012-05-10 | AG | 上海期货交易所 | 品种 | -| 30 | 菜籽油 | 2012-07-16 | RO | 郑州商品交易所 | 品种 | -| 31 | 早籼稻 | 2012-07-24 | ER | 郑州商品交易所 | 品种 | -| 32 | 强麦 | 2012-07-24 | WS | 郑州商品交易所 | 品种 | -| 33 | 玻璃 | 2012-12-03 | FG | 郑州商品交易所 | 品种 | -| 34 | 油菜籽 | 2012-12-28 | RS | 郑州商品交易所 | 品种 | -| 35 | 菜籽粕 | 2012-12-28 | RM | 郑州商品交易所 | 品种 | -| 36 | 焦煤 | 2013-03-22 | JM | 大连商品交易所 | 品种 | -| 37 | 五年国债 | 2013-09-06 | TF | 中国金融期货交易所 | 品种 | -| 38 | 沥青 | 2013-10-09 | BU | 上海期货交易所 | 品种 | -| 39 | 铁矿石 | 2013-10-18 | I | 大连商品交易所 | 品种 | -| 40 | 鸡蛋 | 2013-11-08 | JD | 大连商品交易所 | 品种 | -| 41 | 粳稻 | 2013-11-18 | JR | 郑州商品交易所 | 品种 | -| 42 | 胶合板 | 2013-12-06 | BB | 大连商品交易所 | 品种 | -| 43 | 纤维板 | 2013-12-06 | FB | 大连商品交易所 | 品种 | -| 44 | 聚丙烯 | 2014-02-28 | PP | 大连商品交易所 | 品种 | -| 45 | 热轧卷板 | 2014-03-21 | HC | 上海期货交易所 | 品种 | -| 46 | 晚籼稻 | 2014-07-08 | LR | 郑州商品交易所 | 品种 | -| 47 | 锰硅 | 2014-08-08 | SM | 郑州商品交易所 | 品种 | -| 48 | 硅铁 | 2014-08-08 | SF | 郑州商品交易所 | 品种 | -| 49 | 玉米淀粉 | 2014-12-19 | CS | 大连商品交易所 | 品种 | -| 50 | 十年国债 | 2015-03-20 | T | 中国金融期货交易所 | 品种 | -| 51 | 沪锡 | 2015-03-27 | SN | 上海期货交易所 | 品种 | -| 52 | 沪镍 | 2015-03-27 | NI | 上海期货交易所 | 品种 | -| 53 | 甲醇 | 2015-04-10 | ME | 郑州商品交易所 | 品种 | -| 54 | 中证500 | 2015-04-16 | IC | 中国金融期货交易所 | 品种 | -| 55 | 上证50 | 2015-04-16 | IH | 中国金融期货交易所 | 品种 | -| 56 | 动力煤 | 2015-05-18 | TC | 郑州商品交易所 | 品种 | -| 57 | 原油 | 2017-03-23 | SC | 上海国际能源交易中心 | 品种 | -| 58 | 棉纱 | 2017-08-18 | CY | 郑州商品交易所 | 品种 | -| 59 | 棉纱 | 2017-08-18 | CY | 郑州商品交易所 | 品种 | -| 60 | 苹果 | 2018-01-31 | AP | 郑州商品交易所 | 品种 | -| 61 | 原油 | 2018-03-26 | SC | 上海国际能源交易中心 | 品种 | -| 62 | 纸浆 | 2018-11-28 | SP | 上海期货交易所 | 品种 | -| 63 | 乙二醇 | 2018-12-12 | EG | 大连商品交易所 | 品种 | -| 64 | 红枣 | 2019-04-30 | CJ | 郑州商品交易所 | 品种 | -| 65 | 尿素 | 2019-08-12 | UR | 郑州商品交易所 | 品种 | -| 66 | 20号胶 | 2019-08-15 | NR | 上海国际能源交易中心 | 品种 | -| 67 | 粳米 | 2019-08-20 | RR | 大连商品交易所 | 品种 | -| 68 | 豆二 | 2019-09-02 | B | 大连商品交易所 | 品种 | -| 69 | 不锈钢 | 2019-09-25 | SS | 上海期货交易所 | 品种 | -| 70 | 苯乙烯 | 2019-10-08 | EB | 大连商品交易所 | 品种 | -| 71 | 纯碱 | 2019-12-06 | SA | 郑州商品交易所 | 品种 | - -输出参数 - -| 名称 | 类型 | 描述 | -|-------|--------|------| -| date | object | - | -| value | float | 指数数值 | - -接口示例 - -```python -import akshare as ak - -futures_volatility_index_nh_df = ak.futures_volatility_index_nh(symbol="SA", period='5') -print(futures_volatility_index_nh_df) -``` - -数据示例 - -``` - date value -0 2019-12-13 29.812304 -1 2019-12-16 29.405433 -2 2019-12-17 11.222589 -3 2019-12-18 9.414306 -4 2019-12-19 4.658396 -... ... ... -1062 2024-05-13 26.903437 -1063 2024-05-14 37.043835 -1064 2024-05-15 34.751659 -1065 2024-05-16 34.878039 -1066 2024-05-17 55.353441 -[1067 rows x 2 columns] -``` - -#### 市场涨跌 - -##### 板块指数涨跌 - -P.S. 该接口暂时无法访问 - -接口: futures_board_index_nh - -目标地址: https://www.nanhua.net/nhzc/platechange.html - -描述: 南华期货-市场涨跌-板块指数涨跌 - -限量: 单次返回指定 start_date 和 end_date 的所有历史数据 - -输入参数 - -| 名称 | 类型 | 描述 | -|------------|-----|------------------------| -| start_date | str | start_date="20231110"; | -| end_date | str | end_date="20231116"; | - -输出参数 - -| 名称 | 类型 | 描述 | -|--------|---------|-----| -| name | object | - | -| return | float64 | - | - -接口示例 - -```python -import akshare as ak - -futures_board_index_nh_df = ak.futures_board_index_nh(start_date="20231110", end_date="20231116") -print(futures_board_index_nh_df) -``` - -数据示例 - -``` - name return -0 南华农产品指数 0.016444 -1 南华商品指数 0.009392 -2 南华能化指数 0.006825 -3 南华工业品指数 0.006895 -4 南华金属指数 0.005600 -5 南华贵金属指数 0.008707 -``` - -##### 品种指数涨跌 - -P.S. 该接口暂时无法访问 - -接口: futures_variety_index_nh - -目标地址: https://www.nanhua.net/nhzc/varietychange.html - -描述: 南华期货-市场涨跌-品种指数涨跌 - -限量: 单次返回指定 start_date 和 end_date 的所有历史数据 - -输入参数 - -| 名称 | 类型 | 描述 | -|------------|-----|------------------------| -| start_date | str | start_date="20231110"; | -| end_date | str | end_date="20231116"; | - -输出参数 - -| 名称 | 类型 | 描述 | -|--------|---------|-----| -| name | object | - | -| return | float64 | - | - -接口示例 - -```python -import akshare as ak - -futures_variety_index_nh_df = ak.futures_variety_index_nh(start_date="20231110", end_date="20231116") -print(futures_variety_index_nh_df) -``` - -数据示例 - -``` - name return -0 大豆 0.024385 -1 白银 0.020073 -2 铝 -0.007079 -3 苹果 -0.000219 -4 黄金 0.001061 -5 豆二 0.036748 -6 胶合板 0.000000 -7 沥青 0.010934 -8 玉米 0.013095 -9 棉花 0.001273 -10 红枣 0.004663 -11 玉米淀粉 0.025943 -12 铜 0.009395 -13 棉纱 0.005301 -14 苯乙烯 0.027085 -15 乙二醇 0.011401 -16 纤维板 0.014356 -17 玻璃 -0.025157 -18 燃油 0.001903 -19 热轧卷板 0.015809 -20 铁矿石 0.003640 -21 焦炭 -0.597477 -22 鸡蛋 1.075153 -23 焦煤 -0.822651 -24 粳稻 2.762525 -25 塑料 -0.499642 -26 晚籼稻 7.104909 -27 豆粕 -0.859255 -28 沪镍 -0.474222 -29 20号胶 -0.111037 -30 棕榈油 4.196841 -31 铅 0.827332 -32 聚丙烯 -0.541466 -33 螺纹钢 -0.322876 -34 菜籽粕 -0.660008 -35 粳米 1.661997 -36 油菜籽 0.276936 -37 橡胶 14.746077 -38 纯碱 -0.547392 -39 原油 0.148048 -40 硅铁 -0.870335 -41 锰硅 -0.272521 -42 沪锡 -0.448027 -43 纸浆 0.218150 -44 白糖 1.393973 -45 不锈钢 0.288433 -46 PTA 1.103862 -47 尿素 -0.648997 -48 PVC 0.617742 -49 线材 0.548768 -50 豆油 -0.559214 -51 锌 0.200634 -``` - -#### 统计监控 - -##### 相关系数矩阵 - -P.S. 该接口暂时无法访问 - -接口: futures_correlation_nh - -目标地址: https://www.nanhua.net/nhzc/correltable.html - -描述: 南华期货-统计监控-相关系数走势 - -限量: 单次返回指定 date 和 period 的所有历史数据 - -输入参数 - -| 名称 | 类型 | 描述 | -|--------|-----|-------------------------------------------------| -| date | str | date="20231110"; | -| period | str | period="20"; choice of {"5", "20", "60", "120"} | - -输出参数 - -| 名称 | 类型 | 描述 | -|-------|---------|-----| -| 品种代码1 | object | - | -| 品种名称1 | object | - | -| 品种代码2 | object | - | -| 品种名称2 | object | - | -| 相关系数 | float64 | - | - -接口示例 - -```python -import akshare as ak - -futures_correlation_nh_df = ak.futures_correlation_nh(date="20231110", period="20") -print(futures_correlation_nh_df) -``` - -数据示例 - -``` - 品种代码1 品种名称1 品种代码2 品种名称2 相关系数 -0 EB 苯乙烯 RB 螺纹钢 0.174681 -1 EB 苯乙烯 RM 菜籽粕 -0.174158 -2 EB 苯乙烯 LR 晚籼稻 0.000000 -3 EB 苯乙烯 ZN 锌 0.048867 -4 EB 苯乙烯 UR 尿素 0.326311 - ... ... ... ... ... -3301 SA 纯碱 RS 油菜籽 -0.152928 -3302 SA 纯碱 CJ 红枣 0.177514 -3303 SA 纯碱 RU 橡胶 0.157599 -3304 SA 纯碱 CF 棉花 0.374231 -3305 SA 纯碱 PB 铅 0.095591 -[3306 rows x 5 columns] -``` - ### 中证商品指数 #### 中证商品指数 From 3236cd30ec29b95e0da39cba1dbd5fd7196481cf Mon Sep 17 00:00:00 2001 From: jindaxiang Date: Tue, 15 Oct 2024 17:37:31 +0800 Subject: [PATCH 6/6] feat: add version 1.14.97 --- akshare/__init__.py | 25 ------------------------- docs/changelog.md | 1 + 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/akshare/__init__.py b/akshare/__init__.py index caf89b9c373..1574c3435d5 100644 --- a/akshare/__init__.py +++ b/akshare/__init__.py @@ -3458,17 +3458,6 @@ stock_hot_tweet_xq, ) -""" -南华期货-板块指数涨跌 -南华期货-品种指数涨跌 -南华期货-相关系数矩阵 -""" -from akshare.futures_derivative.futures_other_index_nh import ( - futures_correlation_nh, - futures_board_index_nh, - futures_variety_index_nh, -) - """ 东方财富-股票数据-龙虎榜 """ @@ -4965,20 +4954,6 @@ """ from akshare.article.epu_index import article_epu_index -""" -南华期货-南华指数 -""" -from akshare.futures_derivative.futures_index_return_nh import ( - futures_return_index_nh, -) -from akshare.futures_derivative.futures_index_price_nh import ( - futures_price_index_nh, - futures_index_symbol_table_nh, -) -from akshare.futures_derivative.futures_index_volatility_nh import ( - futures_volatility_index_nh, -) - """ 空气-河北 """ diff --git a/docs/changelog.md b/docs/changelog.md index 7ef959931c6..776b130ba18 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -83,6 +83,7 @@ 1.14.97 fix: fix stock_profile_cninfo interface 1. 修复 stock_profile_cninfo 接口 + 2. 移除南华指数相关接口 1.14.96 fix: fix stock_zt_pool_sub_new_em interface