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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Sep 14 13:15:23 CEST 2013


Author: braverock
Date: 2013-09-14 13:15:23 +0200 (Sat, 14 Sep 2013)
New Revision: 1505

Modified:
   pkg/FinancialInstrument/R/build_symbols.R
Log:
- add an example and fix a typo


Modified: pkg/FinancialInstrument/R/build_symbols.R
===================================================================
--- pkg/FinancialInstrument/R/build_symbols.R	2013-09-13 22:50:16 UTC (rev 1504)
+++ pkg/FinancialInstrument/R/build_symbols.R	2013-09-14 11:15:23 UTC (rev 1505)
@@ -51,6 +51,9 @@
 #' \code{active_months} is a numeric field indicating how many months including  
 #' the month of the \code{start_date} the contract is available to trade.  
 #' This number will be used as the upper limit for symbol generation.
+#' 
+#' If \code{type} is also specified, it should be a specific instrument type, 
+#' e.g. 'future_series','option_series','guaranteed_spread' or 'calendar_spread' 
 #'
 #' One of \code{data} or \code{file} must be populated for input data.
 #'
@@ -62,6 +65,11 @@
 #' @seealso
 #' \code{\link{load.instruments}}
 #' \code{\link{build_series_symbols}}
+#' @examples 
+#' build_spread_symbols(data=data.frame(primary_id='CL',
+#'                                      month_sequence="F,G,H,J,K,M,N,Q,U,V,X,Z",
+#'                                      contracts_ahead="1,2,3",
+#'                                      type='calendar_spread')
 #' @export
 build_spread_symbols <- function(data=NULL,file=NULL,outputfile=NULL,start_date=Sys.Date())
 {



More information about the Blotter-commits mailing list