AKShare-期货数据-南华指数

论坛 期权论坛 期权     
期权匿名问答   2021-12-29 15:46   9954   0

作者寄语

本次主要更新和重新设计了之前的南华指数接口,包括收益率指数、价格指数、波动率指数。
更新接口


  • "futures_nh_return_index"  # 收益率指数
  • "futures_nh_price_index"  # 价格指数
  • "futures_nh_volatility_index"  # 波动率指数
南华指数

收益率指数

接口: futures_nh_return_index
目标地址: http://www.nanhua.net/nhzc/varietytrend.html
描述: 南华期货-商品指数历史走势-收益率指数
限量: 单次返回单个指数的所有历史数据
输入参数
名称类型描述
南华指数品种一览表
idcodeexchangestart_datecategoryname
输出参数
名称类型描述
接口示例
import akshare as ak

futures_nh_return_index_df = ak.futures_nh_return_index()
print(futures_nh_return_index_df)
数据示例
            date       value
0     2006-01-09  1000.00000
1     2006-01-10   998.82000
2     2006-01-11  1000.00000
3     2006-01-12   990.17000
4     2006-01-15   994.49000
          ...         ...
3872  2021-12-12  1321.72951
3873  2021-12-13  1303.43350
3874  2021-12-14  1291.76190
3875  2021-12-15  1306.90343
3876  2021-12-16  1326.46124
价格指数

接口: futures_nh_price_index
目标地址: http://www.nanhua.net/nhzc/varietytrend.html
描述: 南华期货-商品指数历史走势-价格指数
限量: 单次返回指定 symbol 的所有历史数据
输入参数
名称类型描述
南华指数品种一览表
idnamefirstdaycodeexchangeindexcategory
输出参数
名称类型描述
接口示例
import akshare as ak

futures_nh_price_index_df = ak.futures_nh_price_index(symbol="Y")
print(futures_nh_price_index_df)
数据示例
            date       value
0     2004-05-31  3182.47000
1     2004-06-01  3253.56000
2     2004-06-02  3228.85000
3     2004-06-03  3240.11000
4     2004-06-06  3206.05000
          ...         ...
4261  2021-12-12  5940.22871
4262  2021-12-13  5911.65821
4263  2021-12-14  5903.40275
4264  2021-12-15  5974.44006
4265  2021-12-16  5981.32376
波动率指数

接口: futures_nh_volatility_index
目标地址: http://www.nanhua.net/nhzc/varietytrend.html
描述: 南华期货-商品指数历史走势-波动率指数
限量: 单次返回指定 symbol 和 period 的所有历史数据
输入参数
名称类型描述
南华指数品种一览表
idcodeexchangestart_datecategoryname
输出参数
名称类型描述
接口示例
import akshare as ak

futures_nh_volatility_index_df = ak.futures_nh_volatility_index(symbol="SA", period='5')
print(futures_nh_volatility_index_df)
数据示例
           date      value
0    2019-12-12  29.812304
1    2019-12-15  29.405433
2    2019-12-16  11.222589
3    2019-12-17   9.414306
4    2019-12-18   4.658396
..          ...        ...
484  2021-12-12  67.099141
485  2021-12-13  67.239293
486  2021-12-14  51.510276
487  2021-12-15  43.027263
488  2021-12-16  44.866240
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:399277
帖子:79856
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP