[Blotter-commits] r888 - in pkg/FinancialInstrument: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 23 03:45:03 CET 2011
Author: gsee
Date: 2011-12-23 03:45:03 +0100 (Fri, 23 Dec 2011)
New Revision: 888
Modified:
pkg/FinancialInstrument/DESCRIPTION
pkg/FinancialInstrument/R/format_id.R
pkg/FinancialInstrument/R/parse_id.R
pkg/FinancialInstrument/man/format_id.Rd
Log:
- Use 1xCY suffix_id format for SSF, and no longer support xxCY
so that 4 char roots are recognized in parse_id.
Modified: pkg/FinancialInstrument/DESCRIPTION
===================================================================
--- pkg/FinancialInstrument/DESCRIPTION 2011-12-22 20:35:48 UTC (rev 887)
+++ pkg/FinancialInstrument/DESCRIPTION 2011-12-23 02:45:03 UTC (rev 888)
@@ -11,7 +11,7 @@
meta-data and relationships. Provides support for
multi-asset class and multi-currency portfolios. Still
in heavy development.
-Version: 0.9.16
+Version: 0.9.17
URL: https://r-forge.r-project.org/projects/blotter/
Date: $Date$
Depends:
Modified: pkg/FinancialInstrument/R/format_id.R
===================================================================
--- pkg/FinancialInstrument/R/format_id.R 2011-12-22 20:35:48 UTC (rev 887)
+++ pkg/FinancialInstrument/R/format_id.R 2011-12-23 02:45:03 UTC (rev 888)
@@ -7,7 +7,7 @@
#' Formats for the suffix_id include
#' 'CY', 'CYY', and 'CYYYY' where C is the month code and Y is numeric.
#' 'MMMY', 'MMMYY', 'MMMYYYY' where MMM is an uppercase month abbreviation.
-#' 'xxCY', 'xxCYY', 'xxCYYYY' where xx can be any 2 characters.
+#' '1xCY', '1xCYY', '1xCYYYY' for single-stock-futures.
#'
#' There are currently only 2 formats available for \code{\link{option_series}}: 'opt2' and 'opt4'
#' where opt2 uses a 2 digit year and opt4 uses a 4 digit year.
Modified: pkg/FinancialInstrument/R/parse_id.R
===================================================================
--- pkg/FinancialInstrument/R/parse_id.R 2011-12-22 20:35:48 UTC (rev 887)
+++ pkg/FinancialInstrument/R/parse_id.R 2011-12-23 02:45:03 UTC (rev 888)
@@ -341,7 +341,7 @@
suff <- parse_suffix(substr(x,3,nchar(x)),silent=silent)
month <- suff$month
year <- suff$year
- format <- paste('xx', suff$format, sep="")
+ format <- paste('1x', suff$format, sep="")
} else if (nchar(x) == 2) { #U1
if (substr(x,1,1) %in% M2C() && !is.na(suppressWarnings(as.numeric(substr(x,2,2))))) {
type <- c("outright","future")
@@ -368,12 +368,12 @@
out <- parse_suffix(suff,silent=silent) #call recursively with 2 character suffix
out$format <- 'MMMY'
return(out)
- } else if (substr(x,3,3) %in% M2C() && !is.na(as.numeric(substr(x,4,4)))) {
- #xxU1, VXU1 #ignore the 1st 2 characters, and call recursively with 2 character suffix
- suff <- parse_suffix(substr(x,3,4),silent=silent)
- month <- suff$month
- year <- suff$year
- format <- 'xxCY'
+# } else if (substr(x,3,3) %in% M2C() && !is.na(as.numeric(substr(x,4,4)))) {
+# #xxU1, VXU1 #ignore the 1st 2 characters, and call recursively with 2 character suffix
+# suff <- parse_suffix(substr(x,3,4),silent=silent)
+# month <- suff$month
+# year <- suff$year
+# format <- 'xxCY'
} else if (!is.na(as.numeric(x))) {
#0911
#convert to U11 and call recursively
Modified: pkg/FinancialInstrument/man/format_id.Rd
===================================================================
--- pkg/FinancialInstrument/man/format_id.Rd 2011-12-22 20:35:48 UTC (rev 887)
+++ pkg/FinancialInstrument/man/format_id.Rd 2011-12-23 02:45:03 UTC (rev 888)
@@ -32,8 +32,8 @@
Formats for the suffix_id include 'CY', 'CYY', and
'CYYYY' where C is the month code and Y is numeric.
'MMMY', 'MMMYY', 'MMMYYYY' where MMM is an uppercase
- month abbreviation. 'xxCY', 'xxCYY', 'xxCYYYY' where xx
- can be any 2 characters.
+ month abbreviation. '1xCY', '1xCYY', '1xCYYYY' for
+ single-stock-futures.
There are currently only 2 formats available for
\code{\link{option_series}}: 'opt2' and 'opt4' where opt2
More information about the Blotter-commits
mailing list