[Uwgarp-commits] r32 - in pkg/GARPFRM: data sandbox
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 1 18:37:45 CET 2013
Author: rossbennett34
Date: 2013-12-01 18:37:44 +0100 (Sun, 01 Dec 2013)
New Revision: 32
Added:
pkg/GARPFRM/data/prices.rda
Modified:
pkg/GARPFRM/sandbox/equity_data_download.R
Log:
Adding stock prices to data folder
Added: pkg/GARPFRM/data/prices.rda
===================================================================
(Binary files differ)
Property changes on: pkg/GARPFRM/data/prices.rda
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: pkg/GARPFRM/sandbox/equity_data_download.R
===================================================================
--- pkg/GARPFRM/sandbox/equity_data_download.R 2013-12-01 02:05:48 UTC (rev 31)
+++ pkg/GARPFRM/sandbox/equity_data_download.R 2013-12-01 17:37:44 UTC (rev 32)
@@ -3,7 +3,7 @@
tickers <- c("SPY", "AAPL", "XOM", "GOOG", "MSFT", "GE")
# Download daily data
-getSymbols(Symbols=tickers, from="2005-01-01", to=Sys.Date())
+getSymbols(Symbols=tickers, from="2005-01-01", to="2013-11-22")
# Convert to weekly
for(ticker in tickers) {
@@ -23,10 +23,13 @@
colnames(x.ret) <- tickers[i]
if(i == 1){
returns <- x.ret
+ prices <- x
} else {
returns <- cbind(returns, x.ret)
+ prices <- cbind(prices, x)
}
}
-
+colnames(prices) <- gsub(".Adjusted", "", colnames(prices))
+#save(prices, file="/Users/rossbennett/devel/R/UWGARP/uwgarp/pkg/GARPFRM/data/prices.rda")
#save(returns, file="/Users/rossbennett/devel/R/UWGARP/uwgarp/pkg/GARPFRM/data/returns.rda")
#save(AAPL, GE, GOOG, MSFT, SPY, XOM, file="/Users/rossbennett/devel/R/UWGARP/uwgarp/pkg/GARPFRM/data/equity_data.rda")
More information about the Uwgarp-commits
mailing list