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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jul 10 20:57:16 CEST 2011


Author: gsee
Date: 2011-07-10 20:57:16 +0200 (Sun, 10 Jul 2011)
New Revision: 669

Added:
   pkg/FinancialInstrument/man/build_series_symbols.Rd
   pkg/FinancialInstrument/man/build_spread_symbols.Rd
Modified:
   pkg/FinancialInstrument/NAMESPACE
   pkg/FinancialInstrument/R/build_symbols.R
Log:
 roxygen updates

Modified: pkg/FinancialInstrument/NAMESPACE
===================================================================
--- pkg/FinancialInstrument/NAMESPACE	2011-07-10 18:01:58 UTC (rev 668)
+++ pkg/FinancialInstrument/NAMESPACE	2011-07-10 18:57:16 UTC (rev 669)
@@ -1,5 +1,8 @@
 export(buildHierarchy)
 export(buildSpread)
+export(fn_SpreadBuilder)
+export(formatSpreadPrice)
+export(build_series_symbols)
 export(build_spread_symbols)
 export(is.instrument)
 export(instrument)
@@ -9,6 +12,7 @@
 export(future_series)
 export(option)
 export(option_series)
+export(option_series.yahoo)
 export(currency)
 export(is.currency)
 export(exchange_rate)
@@ -18,13 +22,13 @@
 export(load.instruments)
 export(setSymbolLookup.FI)
 export(getSymbols.FI)
+export(.to_daily)
+export(buildRatio)
+export(redenominate)
 export(synthetic)
 export(synthetic.ratio)
 export(synthetic.instrument)
 export(spread)
+export(butterfly)
 export(guaranteed_spread)
-export(butterfly)
-export(formatSpreadPrice)
-export(fn_SpreadBuilder)
 export(volep)
-export(option_series.yahoo)

Modified: pkg/FinancialInstrument/R/build_symbols.R
===================================================================
--- pkg/FinancialInstrument/R/build_symbols.R	2011-07-10 18:01:58 UTC (rev 668)
+++ pkg/FinancialInstrument/R/build_symbols.R	2011-07-10 18:57:16 UTC (rev 669)
@@ -13,8 +13,8 @@
 #' @param roots data.frame containing at least columns \code{primary_id} and \code{month_cycle}, see Details
 #' @author Brian G. Peterson
 #' @seealso \code{\link{load.instruments}}
+#' @TODO add more flexibility in input formats for \code{roots}
 #' @export
-#' TODO: add more flexibility in input formats for \code{roots}
 build_series_symbols <- function(roots, yearlist=c(0,1)) {
 	symbols<-''
 	id_col<-grep('primary_id',colnames(roots)) #TODO: check length
@@ -60,7 +60,6 @@
 #' @seealso 
 #' \code{\link{load.instruments}}
 #' \code{\link{build_series_symbols}}
-#' @aliases calendar speread
 #' @export
 build_spread_symbols <- function(data=NULL,file=NULL,outputfile=NULL,start_date=Sys.Date())
 {

Added: pkg/FinancialInstrument/man/build_series_symbols.Rd
===================================================================
--- pkg/FinancialInstrument/man/build_series_symbols.Rd	                        (rev 0)
+++ pkg/FinancialInstrument/man/build_series_symbols.Rd	2011-07-10 18:57:16 UTC (rev 669)
@@ -0,0 +1,18 @@
+\name{build_series_symbols}
+\alias{build_series_symbols}
+\title{construct a series of symbols based on root symbol and suffix letters...}
+\usage{build_series_symbols(roots, yearlist=c(0, 1))}
+\description{construct a series of symbols based on root symbol and suffix letters}
+\details{The columns needed by this version of the function are \code{primary_id} 
+and \code{month_cycle}. \code{primary_id} should match the \code{primary_id} 
+of the instrument describing the root contract. 
+\code{month_cycle} should contain a comma delimited string describing the 
+month sequence to use, e.g. \code{"F,G,H,J,K,M,N,Q,U,V,X,Z"} for all months
+using the standard futures letters, or \code{"H,M,U,Z"} for quarters, or 
+\code{"Mar,Jun,Sep,Dec"} for quarters as three-letter month abbreviations, etc.  
+The correct values will vary based on your data source.}
+\author{Brian G. Peterson}
+\seealso{\code{\link{load.instruments}}}
+\section{TODO}{add more flexibility in input formats for \code{roots}}
+\arguments{\item{yearlist}{vector of year suffixes to be applied, see Details}
+\item{roots}{data.frame containing at least columns \code{primary_id} and \code{month_cycle}, see Details}}

Added: pkg/FinancialInstrument/man/build_spread_symbols.Rd
===================================================================
--- pkg/FinancialInstrument/man/build_spread_symbols.Rd	                        (rev 0)
+++ pkg/FinancialInstrument/man/build_spread_symbols.Rd	2011-07-10 18:57:16 UTC (rev 669)
@@ -0,0 +1,34 @@
+\name{build_spread_symbols}
+\alias{build_spread_symbols}
+\title{build symbols for exchange guaranteed (calendar) spreads...}
+\usage{build_spread_symbols(data, file, outputfile, start_date=Sys.Date())}
+\description{build symbols for exchange guaranteed (calendar) spreads}
+\details{The columns needed by this version of the function are \code{primary_id}, 
+\code{month_cycle}, and code \code{contracts_ahead}. 
+
+\code{primary_id} should match the \code{primary_id} 
+of the instrument describing the root contract. 
+
+\code{month_cycle} should contain a comma delimited string describing the 
+month sequence to use, e.g. \code{"F,G,H,J,K,M,N,Q,U,V,X,Z"} for all months
+using the standard futures letters, or \code{"H,M,U,Z"} for quarters, or 
+\code{"Mar,Jun,Sep,Dec"} for quarters as three-letter month abbreviations, etc.  
+The correct values will vary based on your data source.
+
+\code{contracts_ahead} should contain a comma-delimited string describing 
+the cycle on which the guaranteed calendar spreads are to be consructed,
+e.g. '1' for one-month spreads, '1,3' for one and three month spreads, 
+'1,6,12' for 1, 6, and 12 month spreads, etc.
+
+\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.
+
+One of \code{data} or \code{file} must be populated for input data.}
+\author{Ilya Kipnis <Ilya.Kipnis<at>gmail.com>}
+\seealso{\code{\link{load.instruments}}
+\code{\link{build_series_symbols}}}
+\arguments{\item{data}{data.frame containing at least columns \code{primary_id}, \code{month_cycle}, amd \code{contracts_ahead}, see Details}
+\item{file}{if not NULL, will read input data from the file named by this argument, in the same folrmat as \code{data}, above}
+\item{outputfile}{if not NULL, will write out put to this file as a CSV}
+\item{start_date}{date to start building from, of type \code{Date} or an ISO-8601 date string, defaults to \code{\link{Sys.Date}}}}



More information about the Blotter-commits mailing list