[Eventstudies-commits] r396 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 24 07:24:19 CET 2014


Author: chiraganand
Date: 2014-11-24 07:24:18 +0100 (Mon, 24 Nov 2014)
New Revision: 396

Modified:
   pkg/R/eventstudy.R
   pkg/R/excessReturn.R
Log:
Fixed running of excess return function from eventstudy, removed old comments.

Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R	2014-11-23 10:22:36 UTC (rev 395)
+++ pkg/R/eventstudy.R	2014-11-24 06:24:18 UTC (rev 396)
@@ -190,11 +190,10 @@
           return(NULL)
         }
         estimation.period <- attributes(firm)[["estimation.period"]]
-        model <- excessReturn(firm$z.e[estimation.period, "firm.returns"],
-                              firm$z.e[estimation.period, "market.returns"])
+        model <- excessReturn(firm$z.e[event.period, "firm.returns"],
+                              firm$z.e[event.period, "market.returns"])
 
         abnormal.returns <- model
-
         return(abnormal.returns)
       })
 

Modified: pkg/R/excessReturn.R
===================================================================
--- pkg/R/excessReturn.R	2014-11-23 10:22:36 UTC (rev 395)
+++ pkg/R/excessReturn.R	2014-11-24 06:24:18 UTC (rev 396)
@@ -1,15 +1,3 @@
-###############
-# 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:
-# Value: Excess market return
-
-excessReturn <- function(firm.returns, market.returns){
-  ## Getting market return
-  ma.ret <- firm.returns - market.returns
-  return(ma.ret)
+excessReturn <- function(firm.returns, market.returns) {
+    return(firm.returns - market.returns)
 }



More information about the Eventstudies-commits mailing list