[Blotter-commits] r1137 - in pkg/FinancialInstrument: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 27 20:41:07 CEST 2012


Author: gsee
Date: 2012-08-27 20:41:07 +0200 (Mon, 27 Aug 2012)
New Revision: 1137

Modified:
   pkg/FinancialInstrument/DESCRIPTION
   pkg/FinancialInstrument/NAMESPACE
   pkg/FinancialInstrument/R/buildSpread.R
Log:
 import xts to prevent masking of xts functions 

Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION	2012-08-26 13:30:15 UTC (rev 1136)
+++ pkg/FinancialInstrument/DESCRIPTION	2012-08-27 18:41:07 UTC (rev 1137)
@@ -9,12 +9,13 @@
     Ulrich, Brian G. Peterson, Garrett See
 Description: Infrastructure for defining meta-data and 
     relationships for financial instruments.
-Version: 1.0
+Version: 1.0.1
 URL: https://r-forge.r-project.org/projects/blotter/
 Date: $Date$
 Depends:
     R (>= 2.12.0),
     quantmod(>= 0.3-17),
+    xts,
     zoo(>= 1.7-5)
 Suggests:
     foreach,

Modified: pkg/FinancialInstrument/NAMESPACE
===================================================================
--- pkg/FinancialInstrument/NAMESPACE	2012-08-26 13:30:15 UTC (rev 1136)
+++ pkg/FinancialInstrument/NAMESPACE	2012-08-27 18:41:07 UTC (rev 1137)
@@ -127,6 +127,7 @@
 export(update_instruments.yahoo)
 export(volep)
 importFrom(zoo,as.Date)
+import(xts)
 S3method(all.equal,instrument)
 S3method(expires,character)
 S3method(expires,instrument)

Modified: pkg/FinancialInstrument/R/buildSpread.R
===================================================================
--- pkg/FinancialInstrument/R/buildSpread.R	2012-08-26 13:30:15 UTC (rev 1136)
+++ pkg/FinancialInstrument/R/buildSpread.R	2012-08-27 18:41:07 UTC (rev 1137)
@@ -230,6 +230,7 @@
 #' #download data and plot the closing values of a spread in one line
 #' chartSeries(Cl(fn_SpreadBuilder(getSymbols(c("SPY","DIA")),auto.assign=FALSE)))
 #' }
+#' @import xts
 #' @export
 fn_SpreadBuilder <- function(prod1, prod2, ratio=1, currency='USD', from=NULL, 
     to=NULL, session_times=NULL, notional=TRUE,
@@ -305,6 +306,7 @@
             Data.2 <- do.call("getSymbols", c(Symbols=prod2, gS.args, dargs))
         }
     }
+
     
     if ( (all(has.Op(Data.1), has.Cl(Data.2)) && !(all(has.Op(Data.2), has.Cl(Data.2)))) || 
 	(is.BBO(Data.1) && !is.BBO(Data.2)) ||



More information about the Blotter-commits mailing list