# Load libraries
library(tidyquant)
##### Basic Functionality
# Get the list of `get` options
tq_get_options()
# Get all stocks in a stock index from www.marketvolume.com
tq_get_stock_index_options() # Get stock index options
tq_get("SP500", get = "stock.index")
# Get stock prices for a stock from Yahoo
aapl_stock_prices <- tq_get("AAPL")
# Get stock prices for multiple stocks
mult_stocks <- tq_get(c("FB", "AMZN"),
get = "stock.prices",
from = "2016-01-01",
to = "2017-01-01")
Run the code above in your browser using DataLab