[Uwgarp-commits] r181 - in pkg/GARPFRM: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jun 11 15:38:27 CEST 2014
Author: tfillebeen
Date: 2014-06-11 15:38:26 +0200 (Wed, 11 Jun 2014)
New Revision: 181
Added:
pkg/GARPFRM/man/PCA.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/is.bond.Rd
pkg/GARPFRM/man/linearHedge.Rd
pkg/GARPFRM/man/plot.PCA.Rd
pkg/GARPFRM/man/plot.loadings.Rd
pkg/GARPFRM/man/ytmSolve.Rd
Modified:
pkg/GARPFRM/R/riskMetricsAndHedges.R
Log:
Rd files
Modified: pkg/GARPFRM/R/riskMetricsAndHedges.R
===================================================================
--- pkg/GARPFRM/R/riskMetricsAndHedges.R 2014-06-11 05:12:16 UTC (rev 180)
+++ pkg/GARPFRM/R/riskMetricsAndHedges.R 2014-06-11 13:38:26 UTC (rev 181)
@@ -182,5 +182,4 @@
lines(pca$loading[,2], col="blue",lty=2)
lines(pca$loading[,3], col="red",lty=2)
legend("topleft",legend=c("PCA1","PCA2","PCA3"),bty="n",lty=c(1,2,2),col=c("black","blue","red"), cex=0.8)
-
}
\ No newline at end of file
Added: pkg/GARPFRM/man/PCA.Rd
===================================================================
--- pkg/GARPFRM/man/PCA.Rd (rev 0)
+++ pkg/GARPFRM/man/PCA.Rd 2014-06-11 13:38:26 UTC (rev 181)
@@ -0,0 +1,23 @@
+\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/bondConvexity.Rd
===================================================================
--- pkg/GARPFRM/man/bondConvexity.Rd (rev 0)
+++ pkg/GARPFRM/man/bondConvexity.Rd 2014-06-11 13:38:26 UTC (rev 181)
@@ -0,0 +1,20 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,24 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,31 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,23 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,28 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,19 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,29 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,22 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,16 @@
+\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/is.bond.Rd
===================================================================
--- pkg/GARPFRM/man/is.bond.Rd (rev 0)
+++ pkg/GARPFRM/man/is.bond.Rd 2014-06-11 13:38:26 UTC (rev 181)
@@ -0,0 +1,18 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,20 @@
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,25 @@
+\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/plot.loadings.Rd
===================================================================
--- pkg/GARPFRM/man/plot.loadings.Rd (rev 0)
+++ pkg/GARPFRM/man/plot.loadings.Rd 2014-06-11 13:38:26 UTC (rev 181)
@@ -0,0 +1,25 @@
+\name{plot.loadings}
+\alias{plot.loadings}
+\title{Plotting method for PCA}
+\usage{
+\method{plot}{loadings}(x, y, ..., main = "CAPM")
+}
+\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 13:38:26 UTC (rev 181)
@@ -0,0 +1,28 @@
+\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