Displaying 2 results from an estimated 2 matches for "mktcap".
2013 Mar 01
7
Conditional Weighted Average (ddply or any other function)
...EPS22 MKT22
N2 T2 S2 I2 C2 FY-2 ROE23 EPS23 MKT23
N2 T2 S2 I2 C2 FY-2 ROE24 EPS24 MKT24
N2 T2 S2 I2 C2 FY0 ROE25 EPS25 MKT25
N2 T2 S2 I2 C2 FY2 ROE26 EPS26 MKT26
N2 T2 S2 I2 C2 FY2 ROE27 EPS27 MKT27
with colnames:
(Name,Ticker,Sector,Industry,Country,Year,ROE,EPS,MKTCAP)
I want to compute
1) Weighted ROE based on Sector and Fiscal Year.
For firm N1 of Sector S1 and Fiscalyear FY-3 weight is
MKT1 / SUM(MKT, where Sector = S1, Fiscalyear FY-3)
2) Weighted ROE based on Country and Fiscal Year.
For firm N1 of Country C1 and Fiscalyear FY-3 weight is
MKT1 / SUM(MKT,...
2007 Jul 10
1
exces return by mktcap decile for each year
I have a data frame, lets call it dat,
with 3 columns ( mc, yr, ret) which represent market
cap, year, and return. mc is a factor, mc, and ret are
real numbers.
I want to add a column to the data calculated as
follows.
For each year, I want to split the data by mc decile,
then calculate the mean ret within that mc decile, and
finally subtract that year's decile mean from the raw
return. Then