Created
December 27, 2016 14:23
-
-
Save VermeirJellen/e137d40fc9dcdcf4219f579a03e4b686 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
source("config/config.R") | |
SPDR <- readRDS(file="data/SPDR.rds") | |
SPDR.returns <- na.omit((SPDR / lag(SPDR, k= 1) - 1) * 100) | |
########################################################################### | |
############# Plot the underlying SPDR assets ############################# | |
########################################################################### | |
nrAssets <- ncol(SPDR) | |
par(mfrow=c(rep(ceiling(sqrt(nrAssets)),2))) | |
res <- sapply(1:nrAssets, function(x) plot(time(SPDR[,x]), | |
coredata(SPDR[,x]), main=names(SPDR)[x],type="l", | |
xlab="Time",ylab="Price")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment