load_data: Load data from Yahoo.

View source: R/load_data.R

load_dataR Documentation

Load data from Yahoo.

Description

Load data from Yahoo.

Usage

load_data(
  ticker,
  src = "yahoo",
  from = "2014-01-01",
  prefix = TRUE,
  verbose = TRUE
)

Arguments

ticker

ticker code from Yahoo.

src

source name ("yahoo" or "FRED")

from

load data 'from' untill today where the format of 'from' is yyyy-mm-dd.

prefix

logical (default is TRUE) indicating if ticker name should be included in column name of columns Change and ChangeSinceStart (only applicable for FRED data)

verbose

logical (default is TRUE) indicating if loop counter show be shown

Value

A data.frame

Examples

# Load NOVO data since 2021-01-01
data <- load_data(ticker = "NOVO-B.CO", from = "2021-01-01")
data

# Load Market Yield on U.S. Treasury Securities at 10-Year Constant Maturity
data <- load_data(ticker = "DGS10", src = "FRED")
data

kristian-bak/kb.yahoo documentation built on July 18, 2022, 5:57 p.m.