Skip to content

Ljupch0/yfinance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yfinance for R

yfinance returns tidy financial data using the yahoo finance API.

Install

You can install the released version of yfinance from Github with:

remotes::install_github("ljupch0/yfinance")
library(yfinance)

Video Tutorial

yfinance - Tidy Financial Data in R

Quick Introduction

The functions get_income, get_bs and get_cf return a tidy dataframe of financial statement data for a vector of tickers. get_financials combines all three functions and returns all data for the requested tickers.

The functions take in 2 arguments.
ticker accepts a vector of stock tickers like c("AAPL", "MSFT", "GOOG").
report_type can either be "quarterly" or "annual". Note that the free yfinance api returns only four periods, so if report_type = "annual" it will return 4 yearly statements, while report_type = "quarterly" will return the latest 4 quarterly statements.

About

Tidy Financial Statement Data in R. Via the Yahoo Finance API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages