get_prices: Get Historical Security Prices

Description Usage Arguments Details Value Examples

View source: R/Symbols.R

Description

Wrapper function around get_ochlav function that returns historical securtity prices

Usage

1
2
get_prices(symbols, start_date = "1990-01-01", end_date = Sys.Date(),
  error_handling = "pass", warning = FALSE)

Arguments

symbols

vector of stock symbol characters. can be 1 or more

start_date

starting date for historical prices. default is '1990-01-01'. Y-m-d format required

end_date

ending date for historical prices. default is current date. Y-m-d format required

error_handling

option to handle errors within foreach loop. options are 'pass', 'remove', or 'stop'

warning

logical argument to print getSymbol warnings to console

Details

Prices are set to adjusted close

Value

single tibble with symbol price history row bounded in long format

Examples

1
2
3
4
library(tidyverse)
library(quantmod)
symbols <- c("spy", "tlt")
prices <- symbols %>% get_prices(.)

chrishaarstick/madstork documentation built on Jan. 3, 2022, 8:34 p.m.