Skip to content

Instantly share code, notes, and snippets.

@Fratelino
Fratelino / intraday-sp500.R
Created February 28, 2021 11:26 — forked from joshuaulrich/intraday-sp500.R
Track the S&P 500 throughout the trading day
require(quantmod)
do_chart <- function(symbol) {
quote <- getQuote(symbol)
quote$Close <- quote$Last
xts(OHLCV(quote), quote[,"Trade Time"],
pct_change = quote[,"% Change"])
}
filename <- "intraday-sp500.rds"