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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 27 00:19:30 CEST 2011


Author: gsee
Date: 2011-09-27 00:19:29 +0200 (Tue, 27 Sep 2011)
New Revision: 798

Modified:
   pkg/FinancialInstrument/DESCRIPTION
   pkg/FinancialInstrument/R/instrument.R
Log:
 getInstrument requires exact match when using identifiers.  Otherwise there are problems when identifiers are OSIs for options on same underlying.

Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION	2011-09-26 21:51:10 UTC (rev 797)
+++ pkg/FinancialInstrument/DESCRIPTION	2011-09-26 22:19:29 UTC (rev 798)
@@ -11,7 +11,7 @@
     meta-data and relationships. Provides support for
     multi-asset class and multi-currency portfolios.  
     Still in heavy development.
-Version: 0.6.8
+Version: 0.7
 URL: https://r-forge.r-project.org/projects/blotter/
 Date: $Date$
 Depends:

Modified: pkg/FinancialInstrument/R/instrument.R
===================================================================
--- pkg/FinancialInstrument/R/instrument.R	2011-09-26 21:51:10 UTC (rev 797)
+++ pkg/FinancialInstrument/R/instrument.R	2011-09-26 22:19:29 UTC (rev 798)
@@ -819,7 +819,7 @@
         instr_list<-ls(pos=.instrument)
         for (instr in instr_list){
             tmp_instr<-try(get(instr,pos=.instrument),silent=TRUE)
-            if(inherits(tmp_instr, type) && length(grep(x,tmp_instr$identifiers))) {
+            if(inherits(tmp_instr, type) && any(x == tmp_instr$identifiers)) {
                 return(tmp_instr)
             }
         }



More information about the Blotter-commits mailing list