Search code examples
rxtszooquantmod

Date issues with quantmod getSymbols.csv?


Im uploading files to R using the quantmod function getSymbols.csv. however, once i have uploaded the files, the dates seem to get lost and all the dates are the same.

I use the following code to upload the 100 stock symbols:

getSymbols.csv(symbols, env=parent.frame(), dir="E:/data/CData_Files_NB/", 
           return.class = "xts", extension="csv")

the do all get uploaded, but for each stock symbol, the dates for the entire history are the same??

  [1] "SHFJ"    "FSRJ"    "RDFJ"    "GRTJ"    "MTNJ"    "SLMJ"    "SBKJ"    "WHLJ" 
  [9] "NTCJ"    "LHCJ"    "MRFJ"    "SACJ"    "PPCJ"    "SGLJ"    "MMIJ"    "IMPJ"   
  [17] "TRUJ"    "GFIJ"    "SOLJ"    "TSHJ"    "KAPJ"    "VODJ"    "NPKJ"    "TKGJ"   
  [25] "HARJ"    "RMIJ"    "SHPJ"    "MDCJ"    "ZEDJ"    "SAPJ"    "DSYJ"    "NPNJN"  
  [33] "RMHJ"    "MURJ"    "BGAJ"    "ANGJ"    "GNDJ"    "TFGJ"    "AEGJ"    "BATJ"   
  [41] "EMIJ"    "APNJ"    "EQSJ"    "NHMJ"    "ATTJ"    "REMJ"    "FPTJ"    "STXDIVJ"
  [49] "CMLJ"    "CVHJ"    "PIKJ"    "MPCJ"    "AVIJ"    "BLUJ"    "CLSJ"    "IPLJ"   
  [57] "BVTJ"    "INLJ"    "RESJ"    "VKEJ"    "NEDJ"    "GPLJ"    "STX40J"  "HYPJ"   
  [65] "TBSJ"    "EXXJ"    "BAWJ"    "PGRJ"    "AWAJ"    "KIOJ"    "SPPJ"    "PNCJ"   
  [73] "ARIJ"    "LEWJ"    "DLTJ"    "ACLJ"    "PGLJ"    "AIPJ"    "RLOJ"    "MNDJ"   
  [81] "REBJ"    "LBHJ"    "GRFJ"    "NGPLTJ"  "GLDJ"    "CLRJ"    "DTCJ"    "ADHJ"   
  [89] "SPGJ"    "HLMJ"    "TORJ"    "MSMJ"    "DBXWDJ"  "INGJ"    "MIXJ"    "FGLJ"   
  [97] "APFJ"    "ILVJ"    "DBXUSJ"  "WEZJ"   

here is an example of what i mean. the dates all get loaded as the same (last) date?

> head(SHFJ)
              SHFJ.Open SHFJ.High SHFJ.Low SHFJ.Close SHFJ.Volume SHFJ.Adjusted
2015-07-07      5.62      5.62     5.58       5.58       719.1          5.58
2015-07-07      5.53      5.71     5.53       5.71      1021.6          5.71
2015-07-07      5.71      5.80     5.71       5.80       381.4          5.80
2015-07-07      5.80      5.80     5.75       5.75        52.8          5.75
2015-07-07      5.75      5.75     5.62       5.64        33.5          5.64
2015-07-07      5.67      5.75     5.67       5.75       189.2          5.75

what am i getting wrong? could it be something with formatting in the CSV file or is it something to do with the time series xts or zoo classes? Any help would be much apreciated.


Solution

  • This is a bug that has been fixed. Pull the latest from the 'develop' branch on GitHub.