Giter Site home page Giter Site logo

yinanlll / financedata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yizhil/financedata

0.0 1.0 0.0 26 KB

Finance data retrieve library. A warp of yahoofinancials library for easy use.

License: MIT License

Python 35.43% Jupyter Notebook 64.57%

financedata's Introduction

FinanceData

Python 3.6 License: MIT

Finance data retrieve library. A warp of yahoofinancials library for easy use. Thanks to yahoofinancials https://github.com/JECSand/yahoofinancials
Current Version: v1.0
Version Released: 4/10/2019
Third-Party Dependency: yahoofinancials, numpy, pandas
Report any bugs by opening an issue here: https://github.com/KaihuaHuang/FinanceData/issues

Methods

1. getPrice(ticker,startDate,endDate,dateAscending = True)

  • Get the price series for single ticker
  • ----Input----

ticker: ticker name for the stock
startDate: the start date of price series, the format is 'YYYY-MM-DD'
endDate: the end date of price series, the format is 'YYYY-MM-DD'
dateAscending: whether rank the price series by date ascending, the default value is true

  • ----output----

price series for multiple stocks in pandas DataFrame format and use date as index

2. getPriceTable(tickerList,startDate,endDate,dateAscending = True)

  • Get the price series for multiple tickers
  • ----Input-----

tickerList: ticker name for multiple stocks
startDate: the start date of price series, the format is 'YYYY-MM-DD'
endDate: the end date of price series, the format is 'YYYY-MM-DD'
dateAscending: whether rank the price series by date ascending, the default value is true
localCheck: loading local csv file, check the existing data see whether we need to retrieve data from Yahoo. The local file should contain date as index.
update: whether to update local file

  • ----output----

price series for single stock in pandas DataFrame format and use date as index

3. getDetailPriceInfo(ticker, startDate, endDate, columns = ['close','date'], dateAscending = True, frequency = 'D')

  • Get the aggregated detailed price series for single ticker, including open, high, low, close, adj_close, volume
  • ----Input-----

ticker: ticker name for single stocks
startDate: the start date of price series, the format is 'YYYY-MM-DD'
endDate: the end date of price series, the format is 'YYYY-MM-DD'
columns: the columns in the output DataFrame, the default columns are 'close' and 'date'
avalible columns: ['date','open','high','close','adj_close', 'low', 'volume']
dateAscending: whether rank the price series by date ascending, the default value is true
frequency: aggregate frequency, default value is 'D', also accept 'W' for week and 'M' for month

  • ----output----

aggregated price series for single stock

  1. getVol(ticker,window = 365)
  2. getMarketCap(ticker)

financedata's People

Contributors

kaihuahuang avatar

Watchers

James Cloos avatar

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.