[Quantmod-commits] r611 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 19 12:24:23 CEST 2014


Author: bodanker
Date: 2014-05-19 12:24:23 +0200 (Mon, 19 May 2014)
New Revision: 611

Modified:
   pkg/R/adjustOHLC.R
Log:
- fix bug #5680


Modified: pkg/R/adjustOHLC.R
===================================================================
--- pkg/R/adjustOHLC.R	2013-12-31 20:03:20 UTC (rev 610)
+++ pkg/R/adjustOHLC.R	2014-05-19 10:24:23 UTC (rev 611)
@@ -12,8 +12,8 @@
       ratio <- Ad(x)/Cl(x)
     } else {
       # use actual split and/or dividend data
-      div    <- getDividends(symbol.name)
-      splits <- getSplits(symbol.name)
+      div <- getDividends(symbol.name, from="1900-01-01")
+      splits <- getSplits(symbol.name, from="1900-01-01")
       # un-adjust dividends for splits (Yahoo already adjusts div for splits)
       if(is.xts(splits) && is.xts(div) && nrow(splits) > 0 && nrow(div) > 0)
         div <- div * 1/adjRatios(splits=merge(splits, index(div)))[,1]



More information about the Quantmod-commits mailing list