Created
June 2, 2018 21:05
-
-
Save masonicboom/cd311d4f1cacca20d6a4517a19a6ced2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("quantmod") | |
library(quantmod) | |
ticks <- getSymbols.yahoo("spy", env=globalenv(), from="2003-01-01", to="2018-01-01", return.class="ts") | |
par(oma=c(4,4,3,0), pch='.', xaxs="i", yaxs="i") | |
plot(index(SPY), SPY[,4]) | |
lines(index(SPY), SPY[,4], col="red") | |
title(main="You need a 4K monitor for timeseries analysis.", xlab="Day", ylab="Close ($)", outer=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment