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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 22 19:13:26 CET 2010


Author: braverock
Date: 2010-11-22 19:13:26 +0100 (Mon, 22 Nov 2010)
New Revision: 462

Modified:
   pkg/FinancialInstrument/NAMESPACE
   pkg/FinancialInstrument/R/synthetic.R
Log:
- add guaranteed_spread constructor

Modified: pkg/FinancialInstrument/NAMESPACE
===================================================================
--- pkg/FinancialInstrument/NAMESPACE	2010-11-22 12:04:35 UTC (rev 461)
+++ pkg/FinancialInstrument/NAMESPACE	2010-11-22 18:13:26 UTC (rev 462)
@@ -10,6 +10,7 @@
 export(is.currency)
 export(exchange_rate)
 export(getInstrument)
+export(guaranteed_spread)
 export(load.instruments)
 export(synthetic)
 export(synthetic.ratio)

Modified: pkg/FinancialInstrument/R/synthetic.R
===================================================================
--- pkg/FinancialInstrument/R/synthetic.R	2010-11-22 12:04:35 UTC (rev 461)
+++ pkg/FinancialInstrument/R/synthetic.R	2010-11-22 18:13:26 UTC (rev 462)
@@ -30,6 +30,7 @@
 #' synthetic
 #' spread 
 #' synthetic.ratio
+#' guaranteed_spread
 #' @export
 synthetic.ratio <- function(primary_id , currency , multiplier=1, identifiers = NULL, ..., type=c("synthetic.ratio","synthetic","instrument"), members, memberratio)
 {
@@ -66,3 +67,9 @@
 {
     synthetic.ratio(primary_id , currency , multiplier=multiplier, identifiers = NULL, type=c("spread","synthetic.ratio","synthetic","instrument"), members=members, memberratio=memberratio, ...=..., assign_i=TRUE)
 }
+
+#' @export
+guaranteed_spread <- function(primary_id , currency , members, memberratio=c(1:1), ..., multiplier=1, identifiers = NULL)
+{
+	synthetic.ratio(primary_id , currency , multiplier=multiplier, identifiers = NULL, type=c("guaranteed_spread","spread","synthetic.ratio","synthetic","instrument"), members=members, memberratio=memberratio, ...=..., assign_i=TRUE)
+}



More information about the Blotter-commits mailing list