[Blotter-commits] r702 - in pkg/FinancialInstrument: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 26 17:51:14 CEST 2011
Author: gsee
Date: 2011-07-26 17:51:13 +0200 (Tue, 26 Jul 2011)
New Revision: 702
Modified:
pkg/FinancialInstrument/R/buildSpread.R
pkg/FinancialInstrument/R/redenominate.R
pkg/FinancialInstrument/man/buildRatio.Rd
pkg/FinancialInstrument/man/buildSpread.Rd
pkg/FinancialInstrument/man/fn_SpreadBuilder.Rd
pkg/FinancialInstrument/man/redenominate.Rd
Log:
update some roxygen blocks. mostly formatting
Modified: pkg/FinancialInstrument/R/buildSpread.R
===================================================================
--- pkg/FinancialInstrument/R/buildSpread.R 2011-07-26 15:19:33 UTC (rev 701)
+++ pkg/FinancialInstrument/R/buildSpread.R 2011-07-26 15:51:13 UTC (rev 702)
@@ -16,8 +16,8 @@
#' @param prefer price column to use to build structure.
#' @param auto.assign assign the spread? If FALSE, the xts object will be returned
#' @param env environment in which to assign spread.
-#' @return If \code{auto.assign} is FALSE, a univariate xts object
-#' otherwise, the xts object will be assigned to \code{spread_id} and the \code{spread_id} will be returned.
+#' @return If \code{auto.assign} is FALSE, a univariate xts object.
+#' Otherwise, the xts object will be assigned to \code{spread_id} and the \code{spread_id} will be returned.
#' @seealso
#' \code{\link{fn_SpreadBuilder}}
#' \code{\link{spread}} for instructions on defining the spread
@@ -141,7 +141,7 @@
#' Alternatively, \code{prod2} can be omitted, and a vector of 2 instrument names can be given to \code{prod1}.
#' See the last example for this usage.
#'
-#' It will try to get data for \code{prod1} and \code{prod2} from .GlobalEnv.
+#' If \code{prod1} and \code{prod2} are names (not xts data), it will try to get data for \code{prod1} and \code{prod2} from .GlobalEnv.
#' If it cannot find the data, it will get it with a call to getSymbols.
#' Prices are multiplied by multipliers and exchange rates to get notional values in the currency specified.
#' The second leg's notional values are multiplied by the ratio.
Modified: pkg/FinancialInstrument/R/redenominate.R
===================================================================
--- pkg/FinancialInstrument/R/redenominate.R 2011-07-26 15:19:33 UTC (rev 701)
+++ pkg/FinancialInstrument/R/redenominate.R 2011-07-26 15:51:13 UTC (rev 702)
@@ -86,6 +86,7 @@
#'
#' Calculates time series of ratio of 2 instruments using available data.
#' Returned object will be ratios calculated using Bids, Asks, and Mids, or Opens, Closes, and Adjusteds.
+#'
#' \code{x} should be a vector of 2 instrument names. An attempt will be made to \code{get} the data
#' for both instruments. If there are no xts data stored under either of the names, it will try to
#' return prebuilt data with a call to \code{\link{.get_rate}}.
@@ -263,6 +264,8 @@
#' Redenominate (change the base of) an instrument
#'
+#'
+#'
#' If \code{x} is the name of an instrument, old_base is not required
#' and will become whatever is in the currency slot of the instrument.
#' Otherwise, old_base must be provided.
Modified: pkg/FinancialInstrument/man/buildRatio.Rd
===================================================================
--- pkg/FinancialInstrument/man/buildRatio.Rd 2011-07-26 15:19:33 UTC (rev 701)
+++ pkg/FinancialInstrument/man/buildRatio.Rd 2011-07-26 15:51:13 UTC (rev 702)
@@ -19,13 +19,15 @@
Calculates time series of ratio of 2 instruments using
available data. Returned object will be ratios calculated
using Bids, Asks, and Mids, or Opens, Closes, and
- Adjusteds. \code{x} should be a vector of 2 instrument
- names. An attempt will be made to \code{get} the data for
- both instruments. If there are no xts data stored under
+ Adjusteds.
+}
+\details{
+ \code{x} should be a vector of 2 instrument names. An
+ attempt will be made to \code{get} the data for both
+ instruments. If there are no xts data stored under
either of the names, it will try to return prebuilt data
with a call to \code{\link{.get_rate}}.
-}
-\details{
+
If the data are not of the same frequency, or are not of
the same type (OHLC, BBO, etc.) An attempt will be made
to make them compatible. Preference is given to the
Modified: pkg/FinancialInstrument/man/buildSpread.Rd
===================================================================
--- pkg/FinancialInstrument/man/buildSpread.Rd 2011-07-26 15:19:33 UTC (rev 701)
+++ pkg/FinancialInstrument/man/buildSpread.Rd 2011-07-26 15:51:13 UTC (rev 702)
@@ -24,8 +24,8 @@
\item{env}{environment in which to assign spread.}
}
\value{
- If \code{auto.assign} is FALSE, a univariate xts object
- otherwise, the xts object will be assigned to
+ If \code{auto.assign} is FALSE, a univariate xts object.
+ Otherwise, the xts object will be assigned to
\code{spread_id} and the \code{spread_id} will be
returned.
}
Modified: pkg/FinancialInstrument/man/fn_SpreadBuilder.Rd
===================================================================
--- pkg/FinancialInstrument/man/fn_SpreadBuilder.Rd 2011-07-26 15:19:33 UTC (rev 701)
+++ pkg/FinancialInstrument/man/fn_SpreadBuilder.Rd 2011-07-26 15:51:13 UTC (rev 702)
@@ -54,14 +54,15 @@
of 2 instrument names can be given to \code{prod1}. See
the last example for this usage.
- It will try to get data for \code{prod1} and \code{prod2}
- from .GlobalEnv. If it cannot find the data, it will get
- it with a call to getSymbols. Prices are multiplied by
- multipliers and exchange rates to get notional values in
- the currency specified. The second leg's notional values
- are multiplied by the ratio. Then the difference is taken
- between the notionals of leg1 and the new values for
- leg2.
+ If \code{prod1} and \code{prod2} are names (not xts
+ data), it will try to get data for \code{prod1} and
+ \code{prod2} from .GlobalEnv. If it cannot find the data,
+ it will get it with a call to getSymbols. Prices are
+ multiplied by multipliers and exchange rates to get
+ notional values in the currency specified. The second
+ leg's notional values are multiplied by the ratio. Then
+ the difference is taken between the notionals of leg1 and
+ the new values for leg2.
\sQuote{make.index.unique} uses the xts function
\code{make.index.unique} \sQuote{least.liq} subsets the
Modified: pkg/FinancialInstrument/man/redenominate.Rd
===================================================================
--- pkg/FinancialInstrument/man/redenominate.Rd 2011-07-26 15:19:33 UTC (rev 701)
+++ pkg/FinancialInstrument/man/redenominate.Rd 2011-07-26 15:51:13 UTC (rev 702)
@@ -27,11 +27,13 @@
currency (base).
}
\description{
+
+}
+\details{
If \code{x} is the name of an instrument, old_base is not
required and will become whatever is in the currency slot
of the instrument. Otherwise, old_base must be provided.
-}
-\details{
+
If you want to convert to JPY something that is
denominated in EUR, you must have data for the EURJPY (or
JPYEUR) exchange rate. If you don't have data for EURJPY,
More information about the Blotter-commits
mailing list