quotes_historical_yahoo

本文介绍了matplotlib.finance的quotes_historical_yahoo函数,用于从雅虎财经获取历史股票数据。虽然该函数已被弃用,推荐使用quotes_yahoo_historical_ochl或quotes_yahoo_historical_ohlc作为替代。文章通过实例展示了如何获取并计算股票收益率。
摘要由CSDN通过智能技术生成

最近在学习爬数据,这是对matplotlib.finance下的quotes_historical_yahoo模块的功能学习。该模块用于从雅虎财经查询有用的信息。

Help on function quotes_historical_yahoo inmodule matplotlib.finance:

查询调用格式如下,其中ticker指的是股票简称(如‘AXP’,‘SOHU’,‘XINA’等);date1指的是数据起始日期,date2指的是数据终止日期。返回数据时,顺序是从过去到现在,也就是最近的数据会在最下方。

quotes_historical_yahoo(ticker, date1,date2, asobject=False, adjusted=True, cachename=None)

   Get historical data for ticker between date1 and date2.

   

看注释说这个模块好像已经被抛弃了……我看的学习资料有点老了吗……

之后可以调用quotes_yahoo_historical_ochl或quotes_yahoo_historical_ohlc来完成同样的需求。

   This function has been deprecated in 1.4 in favor of

   `quotes_yahoo_historical_ochl`, which maintains the original argument

   order, or `quotes_yahoo_historical_ohlc`, which uses the

   open-high-low-close order.  Thisfunction will be removed in 1.5

   

   See :func:`

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值