Giter VIP home page Giter VIP logo

Comments (1)

Micro-sheep avatar Micro-sheep commented on July 25, 2024 1

下面是指定开始日期和结束日期的例子

import efinance as ef
# 行情开始日期
beg = '20200101'
# 行情结束日期
end = '20210101'
# 股票代码
stock_code = '300750'
df = ef.stock.get_quote_history(stock_code,beg = beg,end = end)
# print(df)
df

image

如果需要上市后的一个月内的数据,需要自己根据日期做筛选(把 beg 取得比较早,这样子获取到的数据的第一行即上市当天的数据,接着取其对应的日期进行加一个月的运算,得到确切的开始和结束日期后再做筛选)。

from efinance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.