[Uwgarp-commits] r184 - pkg/GARPFRM/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jun 11 17:29:20 CEST 2014


Author: rossbennett34
Date: 2014-06-11 17:29:19 +0200 (Wed, 11 Jun 2014)
New Revision: 184

Added:
   pkg/GARPFRM/man/PCA.Rd
   pkg/GARPFRM/man/backtestVaR.Rd
   pkg/GARPFRM/man/bondConvexity.Rd
   pkg/GARPFRM/man/bondDuration.Rd
   pkg/GARPFRM/man/bondFullPrice.Rd
   pkg/GARPFRM/man/bondPrice.Rd
   pkg/GARPFRM/man/bondSpec.Rd
   pkg/GARPFRM/man/bondYTM.Rd
   pkg/GARPFRM/man/compoundingRate.Rd
   pkg/GARPFRM/man/discountFactor.Rd
   pkg/GARPFRM/man/getLoadings.Rd
   pkg/GARPFRM/man/getWeights.Rd
   pkg/GARPFRM/man/is.bond.Rd
   pkg/GARPFRM/man/linearHedge.Rd
   pkg/GARPFRM/man/plot.PCA.Rd
   pkg/GARPFRM/man/ytmSolve.Rd
Log:
man files after conflicts resolved

Added: pkg/GARPFRM/man/PCA.Rd
===================================================================
--- pkg/GARPFRM/man/PCA.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/PCA.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,22 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{PCA}
+\alias{PCA}
+\title{Estimate PCA loadings and creat PCA object}
+\usage{
+PCA(data, nfactors, rotate = "none")
+}
+\arguments{
+\item{data}{time series data}
+
+\item{nfactors}{number of components to extract}
+
+\item{rotate}{"none", "varimax", "quatimax", "promax", "oblimin", "simplimax", and "cluster" are possible rotations/transformations of the solution.}
+}
+\value{
+pca object loadings
+}
+\description{
+This function estimates the delta for hedging a particular bond
+given bond data
+}
+

Added: pkg/GARPFRM/man/backtestVaR.Rd
===================================================================
--- pkg/GARPFRM/man/backtestVaR.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/backtestVaR.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,47 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{backtestVaR}
+\alias{backtestVaR}
+\title{Backtest Value-at-Risk (VaR)}
+\usage{
+backtestVaR(R, window = 100, p = 0.95, method = "historical",
+  bootstrap = FALSE, replications = 1000, bootParallel = FALSE)
+}
+\arguments{
+\item{R}{xts or zoo object of asset returns}
+
+\item{window}{size of the moving window in the rolling VaR estimate.}
+
+\item{p}{confidence level for the VaR estimate.}
+
+\item{method}{method for the VaR calculation. Valid choices are "modified", "guassian", "historical", and "kernel"}
+
+\item{bootstrap}{TRUE/FALSE use the bootstrap estimate for the VaR calculation, (default FALSE).}
+
+\item{replications}{number of bootstrap replications.}
+
+\item{bootParallel}{TRUE/FALSE run the bootstrap in parallel, (default FALSE).}
+}
+\description{
+Backtesting Value-at-Risk estimate over a moving window.
+}
+\details{
+The size of the moving window is set with the \code{window} argument. For
+example, if the window size is 100, periods 1:100 are used to estimate the
+VaR level for period 101.
+}
+\examples{
+data(crsp_weekly)
+R <- largecap_weekly[, 1]
+backtest <- backtestVaR(R, window=100, p=0.95, method=c("gaussian", "historical", "modified"))
+backtest
+
+head(getVaREstimates(backtest))
+head(getVaRViolations(backtest))
+}
+\author{
+Ross Bennett
+}
+\seealso{
+\code{\link[PerformanceAnalytics]{VaR}}, \code{\link{bootVaR}}
+}
+

Added: pkg/GARPFRM/man/bondConvexity.Rd
===================================================================
--- pkg/GARPFRM/man/bondConvexity.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/bondConvexity.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,20 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{bondConvexity}
+\alias{bondConvexity}
+\title{Calculate the convexity of a fixed rate coupon bond}
+\usage{
+bondConvexity(bond, discountCurve)
+}
+\arguments{
+\item{bond}{a \code{bond} object in discountFactorArbitrage}
+
+\item{discountCurve}{vector of discount rates}
+}
+\value{
+convexity of the bond
+}
+\description{
+This function estimates the convexity of a fixed rate coupon bond
+given the discount curve and bond data.
+}
+

Added: pkg/GARPFRM/man/bondDuration.Rd
===================================================================
--- pkg/GARPFRM/man/bondDuration.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/bondDuration.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,23 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{bondDuration}
+\alias{bondDuration}
+\title{Calculate the modified duration of a bond}
+\usage{
+bondDuration(bond, discountCurve, percentChangeYield = 0)
+}
+\arguments{
+\item{bond}{a \code{bond} object in discountFactorArbitrage}
+
+\item{discountCurve}{vector of discount rates}
+
+\item{percentChangeYield}{optional elasticity measure}
+}
+\value{
+duration of the bond
+}
+\description{
+The function estimates modified duration of a fixed rate coupon bond
+given the discount curve and bond data. The modified duration is calculated
+using the continuously compounded yield
+}
+

Added: pkg/GARPFRM/man/bondFullPrice.Rd
===================================================================
--- pkg/GARPFRM/man/bondFullPrice.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/bondFullPrice.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,31 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{bondFullPrice}
+\alias{bondFullPrice}
+\title{Estimate price of bond w/ acrrued interest}
+\usage{
+bondFullPrice(bond, yield, cashFlowPd, t0, t1, currentDate)
+}
+\arguments{
+\item{bond}{is a bondSpec object}
+
+\item{yield}{is the yield on the bond}
+
+\item{cashFlowPd}{cash flow period}
+
+\item{t0}{previous coupon date}
+
+\item{t1}{next coupon period}
+
+\item{currentDate}{current date}
+}
+\value{
+price of the bond: clean, dirty and accrued interest
+}
+\description{
+This function calculates the price of a fixed rate coupon bond given coupon rate, yield,
+compoundPd, cashFlowPd, face value, previous coupon date, next coupon date.
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/bondPrice.Rd
===================================================================
--- pkg/GARPFRM/man/bondPrice.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/bondPrice.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,23 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{bondPrice}
+\alias{bondPrice}
+\title{Estimate price of bond}
+\usage{
+bondPrice(bond, discountCurve)
+}
+\arguments{
+\item{bond}{a \code{discountFactorArbitrage} object}
+
+\item{discountCurve}{vector of discount rates}
+}
+\value{
+price of the bond
+}
+\description{
+This function calculates the price of a fixed rate coupon bond given the
+discount curve and bond data. First it converts the discountCurve into CF
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/bondSpec.Rd
===================================================================
--- pkg/GARPFRM/man/bondSpec.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/bondSpec.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,27 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{bondSpec}
+\alias{bondSpec}
+\title{Constructor for bond specification}
+\usage{
+bondSpec(time = seq(from = 0.5, to = 2, by = 0.5), face = 100, m = 2,
+  couponRate = 0.01)
+}
+\arguments{
+\item{time}{vector of sequence of coupon payments in years}
+
+\item{face}{face value of bond}
+
+\item{m}{compounding frequency}
+
+\item{couponRate}{rate the coupon pays}
+}
+\value{
+a \code{bond} object with the bond data used for pricing
+}
+\description{
+Created a bond object \code{bond.spec} with data for bond specification.
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/bondYTM.Rd
===================================================================
--- pkg/GARPFRM/man/bondYTM.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/bondYTM.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,20 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{bondYTM}
+\alias{bondYTM}
+\title{Calculate the yield to maturity of a bond}
+\usage{
+bondYTM(bond, discountCurve)
+}
+\arguments{
+\item{bond}{a \code{bond} object}
+
+\item{discountCurve}{vector of discount rates}
+}
+\value{
+yield to maturity of the bond
+}
+\description{
+This function calculates the yield to maturity of a fixed rate coupon bond
+given the discount curve and bond data.
+}
+

Added: pkg/GARPFRM/man/compoundingRate.Rd
===================================================================
--- pkg/GARPFRM/man/compoundingRate.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/compoundingRate.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,27 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{compoundingRate}
+\alias{compoundingRate}
+\title{Estimate continuously conpounding rate to be used in term structure}
+\usage{
+compoundingRate(dat, initialDate = as.Date("1995-05-15"), m, face = 100)
+}
+\arguments{
+\item{dat}{is a dataset with cusip, issueDate, MaturityDate, Name, Coupon, Bid/Ask}
+
+\item{intialDate}{is the date when the estimation should be conducted: date of reference}
+
+\item{m}{compounding frequency}
+
+\item{face}{face value}
+}
+\value{
+continuously compounding rates
+}
+\description{
+This function calculates the continuously compounding rate given an initial dataset
+with specific format, date of reference coumpounding frequency, and face value
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/discountFactor.Rd
===================================================================
--- pkg/GARPFRM/man/discountFactor.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/discountFactor.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,23 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{discountFactor}
+\alias{discountFactor}
+\title{Estimate discountFactor}
+\usage{
+discountFactor(price, cashFlow)
+}
+\arguments{
+\item{bond}{a \code{discountFactorArbitrage} object}
+
+\item{price}{of a bond}
+}
+\value{
+cashFlow of a bond
+}
+\description{
+This function calculates the discountFactor (DF) given price
+and cashFlows.
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/getLoadings.Rd
===================================================================
--- pkg/GARPFRM/man/getLoadings.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/getLoadings.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,17 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{getLoadings}
+\alias{getLoadings}
+\title{Retrieve PCA loadings}
+\usage{
+getLoadings(object)
+}
+\arguments{
+\item{object}{is a pca object}
+}
+\description{
+Retrieve PCA loadings
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/getWeights.Rd
===================================================================
--- pkg/GARPFRM/man/getWeights.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/getWeights.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,17 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{getWeights}
+\alias{getWeights}
+\title{Retrieve PCA weights}
+\usage{
+getWeights(object)
+}
+\arguments{
+\item{object}{is a pca object}
+}
+\description{
+Retrieve PCA weights
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/is.bond.Rd
===================================================================
--- pkg/GARPFRM/man/is.bond.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/is.bond.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,17 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{is.bond}
+\alias{is.bond}
+\title{To determine if user is specifying bond parameters correctly}
+\usage{
+is.bond(object)
+}
+\arguments{
+\item{object}{a capm object created by \code{\link{bond.spec}}}
+}
+\description{
+To determine if user is specifying bond parameters correctly
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/linearHedge.Rd
===================================================================
--- pkg/GARPFRM/man/linearHedge.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/linearHedge.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,20 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{linearHedge}
+\alias{linearHedge}
+\title{Estimate the delta hedge of for a bond}
+\usage{
+linearHedge(regressand, regressor)
+}
+\arguments{
+\item{regressand}{a \code{bond} object in discountFactorArbitrage}
+
+\item{regressor}{the right hand side}
+}
+\value{
+delta of the hedge
+}
+\description{
+This function estimates the delta for hedging a particular bond
+given bond data
+}
+

Added: pkg/GARPFRM/man/plot.PCA.Rd
===================================================================
--- pkg/GARPFRM/man/plot.PCA.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/plot.PCA.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,25 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{plot.PCA}
+\alias{plot.PCA}
+\title{Plotting method for PCA}
+\usage{
+\method{plot}{PCA}(x, y, ..., main = "Beta from PCA regression")
+}
+\arguments{
+\item{x}{a PCA object created.}
+
+\item{y}{not used}
+
+\item{number}{specify the nunber of loadings}
+
+\item{\dots}{passthrough parameters to \code{\link{plot}}.}
+
+\item{main}{a main title for the plot}
+}
+\description{
+Plot a fitted PCA object
+}
+\author{
+TF
+}
+

Added: pkg/GARPFRM/man/ytmSolve.Rd
===================================================================
--- pkg/GARPFRM/man/ytmSolve.Rd	                        (rev 0)
+++ pkg/GARPFRM/man/ytmSolve.Rd	2014-06-11 15:29:19 UTC (rev 184)
@@ -0,0 +1,28 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{ytmSolve}
+\alias{ytmSolve}
+\title{Solve for the yield to maturity of a bond}
+\usage{
+ytmSolve(ytm, couponRate, m, nPayments, face, targetPrice)
+}
+\arguments{
+\item{ytm}{yield to maturity}
+
+\item{couponRate}{coupon rate}
+
+\item{m}{compounding frequency}
+
+\item{nPayments}{is the number of payments}
+
+\item{face}{is the face value}
+
+\item{targetPrice}{is the price of the bond}
+}
+\value{
+Absolute value of difference between the price and the present value
+}
+\description{
+This function solves for the yield to maturity of a fixed rate coupon bond
+given the discount curve and bond data.
+}
+



More information about the Uwgarp-commits mailing list