[Blotter-commits] r800 - pkg/FinancialInstrument/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 27 16:18:08 CEST 2011


Author: gsee
Date: 2011-09-27 16:18:08 +0200 (Tue, 27 Sep 2011)
New Revision: 800

Modified:
   pkg/FinancialInstrument/R/instrument.R
Log:
 -reallow arbitrary names of future_/option_series. (revert rev 787)

Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R	2011-09-27 05:25:54 UTC (rev 799)
+++ pkg/FinancialInstrument/R/instrument.R	2011-09-27 14:18:08 UTC (rev 800)
@@ -266,11 +266,11 @@
       #then primary_id is really root_id and we need to replace primary_id
       root_id <- primary_id
       primary_id <- paste(root_id, suffix_id, sep="_")
-  } else if (is.null(suffix_id) && parse_id(primary_id)$type == 'root') {
-      #primary_id is actually a root_id, and suffix_id is NULL. we need to build suffix_id
-      #using expires so that we can build a new primary_id.  Call recursively to handle this.
-      return(future_series(root_id=primary_id, first_traded=first_traded, expires=expires, 
-                        identifiers=identifiers, ...=...))
+  #} else if (is.null(suffix_id) && parse_id(primary_id)$type == 'root') {
+  #    #primary_id is actually a root_id, and suffix_id is NULL. we need to build suffix_id
+  #    #using expires so that we can build a new primary_id.  Call recursively to handle this.
+  #    return(future_series(root_id=primary_id, first_traded=first_traded, expires=expires, 
+  #                      identifiers=identifiers, ...=...))
   }    
 
   pid <- parse_id(primary_id)
@@ -377,11 +377,11 @@
           #then primary_id is really root_id and we need to replace primary_id
           root_id <- primary_id
           primary_id <- paste(root_id, suffix_id, sep="_")
-    } else if (is.null(suffix_id) && parse_id(primary_id)$type == 'root') {
-        #primary_id is actually a root_id, and suffix_id is NULL. we need to build suffix_id so that
-        #we can build a new primary_id.  Call recursively to handle this.
-        return(option_series(root_id=primary_id, first_traded=first_traded, expires=expires, 
-                            callput=callput, strike=strike, identifiers=identifiers, ...=...))
+    #} else if (is.null(suffix_id) && parse_id(primary_id)$type == 'root') {
+    #    #primary_id is actually a root_id, and suffix_id is NULL. we need to build suffix_id so that
+    #    #we can build a new primary_id.  Call recursively to handle this.
+    #    return(option_series(root_id=primary_id, first_traded=first_traded, expires=expires, 
+    #                        callput=callput, strike=strike, identifiers=identifiers, ...=...))
     }    
     pid <- parse_id(primary_id)
     if (is.null(root_id)) root_id <- pid$root



More information about the Blotter-commits mailing list