[Eventstudies-commits] r186 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 16 11:23:18 CET 2014
Author: chiraganand
Date: 2014-03-16 11:23:18 +0100 (Sun, 16 Mar 2014)
New Revision: 186
Modified:
pkg/R/excessReturn.R
pkg/man/excessReturn.Rd
Log:
Added object classes, modified description, added FIXME to the code.
Modified: pkg/R/excessReturn.R
===================================================================
--- pkg/R/excessReturn.R 2014-03-08 17:47:51 UTC (rev 185)
+++ pkg/R/excessReturn.R 2014-03-16 10:23:18 UTC (rev 186)
@@ -2,6 +2,7 @@
# Excess return
###############
# Argument:
+## FIXME: data.object??
# 1. data.object: This is a time series object with firm return and market return
# 2. market.name: It is the market (index) column name in the data object
# Output:
@@ -9,6 +10,6 @@
excessReturn <- function(firm.returns, market.returns){
## Getting market return
- ma.ret <- firm.returns-market.returns
+ ma.ret <- firm.returns - market.returns
return(ma.ret)
}
Modified: pkg/man/excessReturn.Rd
===================================================================
--- pkg/man/excessReturn.Rd 2014-03-08 17:47:51 UTC (rev 185)
+++ pkg/man/excessReturn.Rd 2014-03-16 10:23:18 UTC (rev 186)
@@ -3,15 +3,18 @@
\title{A function that estimates excess return}
-\description{ This function estimates excess return. If the the firm return is rj and market return is market.returns then output will be firm.returns less market.returns.
-}
+\description{ This function estimates excess returns. If the firm return
+ is \dQuote{firm.returns} and market return is \dQuote{market.returns},
+ then output will be \dQuote{firm.returns} less
+ \dQuote{market.returns}. }
\usage{excessReturn(firm.returns, market.returns)}
\arguments{
- \item{firm.returns}{Firm returns of which excess return from market is to be calculated}
- \item{market.returns}{Market index returns}
-
+ \item{firm.returns}{a \pkg{zoo} timeseries with firm returns from
+ which excess returns from market are to be calculated.}
+ \item{market.returns}{a \pkg{zoo} object containing market index
+ returns.}
}
\value{Excess market return}
@@ -22,7 +25,6 @@
data(nifty.index)
er.result <- excessReturn(firm.returns = StockPriceReturns,
market.returns = nifty.index)
-
}
-\keyword{excessReturn}
\ No newline at end of file
+\keyword{excessReturn}
More information about the Eventstudies-commits
mailing list