chengjiun
2014-07-27
library(quantmod)
data <- getSymbols("SPY", src = "yahoo", from = "2014-01-01", to = "2014-07-01",
auto.assign = FALSE)
head(data, 3)
SPY.Open SPY.High SPY.Low SPY.Close SPY.Volume SPY.Adjusted
2014-01-02 184.0 184.1 182.5 182.9 119636900 181.2
2014-01-03 183.2 183.6 182.6 182.9 81390600 181.2
2014-01-06 183.5 183.6 182.1 182.4 108028200 180.7
chartSeries(data, theme = chartTheme("white"), name = "SPY", type = "candlestick")
library(shiny)
#runApp(display.mode='showcase')