Jensen VBA Code Step by Step

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Jensen's Alpha

motivated by e-mail from Ron Mc.

There's this thing called Jensen's alpha, designed to measure how well a mutual fund
manager does ... compared to "the market".

>The market?
Yeah, maybe the Wilshire 5000, maybe the DOW, maybe the S&P500, maybe ...
>And does Jensen's thing work?
Define "work".

Anyway, let's take a look at Jensen's alpha (invented my Michael Jensen in the
1970s):

We collect the returns for


some stock (or mutual fund)
over the past n months
(weeks? years?)
We do the same for some
market index, say the
S&P500.
Then, using these returns, we
generate a scatter plot and
identify the slope of the "best
line" fit: that's called beta.
Then we calculate
the CAPM according to the
magic formula:

CAPM Return = Rf + beta


(Rmkt - Rf)
where Rf = risk-free return
and Rmkt = (average or
"expected") market return

CAPM (presumably) gives Figure 1 (using daily returns over one year)
the "expected" stock return
... unless that stock didn't
behave like the market as a
whole.

>Huh?
If the stock behaved "like the
market", then we'd expect beta = 1,
meaning a 1% change in the market
return would be reflected in a 1%
change in the stock return.
After all, the slope of that "best line
fit" is (change in GE return) /
(change in mkt return).
In Figure 1, since beta is
significantly larger than 1, it seems
that market changes are amplified in
GE returns.
Indeed, for the situation in Fig. 1 we
have:
beta = 1.470, Rmkt = 0.117% and
(let's assume) Rf = 0.01% so CAPM
return = 0.01+ 1.470 (0.117 - 0.01)
= 0.167%

>And if the stock did NOT behave like the market?


Aah, that's where Jensen comes in.
Now we take a look at the (average or "expected") stock return to see if'n it did much
better (or worse) than would be the case if it just followed market machinations.
To do that, we ...

>You calculate how much better the stock did, right?


Yes.

Jensen's alpha = Rstock - [ Rf + beta (Rmkt - Rf)]


where Rstock = (average or "expected") stock return
CAPM = 0.167% says that we'd
expect the (daily) returns of GE
stock to average 0.167% if it just
followed the market.
However, if we calculate
the actual (average) GE return over
the past year, we get 0.066%.

>So GE underperformed the market,


right?
That's how it'd be interpreted. In fact,
we'd get J-alpha = Rstock - CAPM =
0.066 - 0.167 = - 0.101% and that
ain't good.

>Uh ... but I can see that from the


chart in Fig. 2 so why that ritual to
calculate J-alpha?
You asking me? I just write about
these things. I don't have to
understand 'em.
Our conclusion about how well (or
poorly) a stock or fund did
(compared to "the market"), will
depend upon beta.
In our GE vs S&P example, I've Figure 2 : performance for year 2009
used daily returns over the past year.
One normally uses monthly returns
... maybe over several years.
However, beta depends upon
whether you take end-of-month
returns or mid-month returns ... or
whatever.

For example, check out Beta here,


Beta there.

It's worthwhikle noting that beta is also a measure of correlation and volatilities of the
two stocks involved.
If GE, for example, had a high correlation with the market (which is usually does) and
its volatility is significantly larger than the market volatility, then beta will be large.
That's because:
Beta[x,y] = r SD[y] / SD[x]
where r is the (Pearson) correlation and SD[y]/SD[x] is the ratio of Standard Deviations.

Another thing: we look at historical returns. That tells us what happened in the past,
but does it tell us anything about what'll happen in the future?
Further, the derivation of the magic formula for the Capital Asset Pricing Model
(CAPM) involves the standard deviation of returns as the measure of risk.
I really dislike that association. Besides ...

>Do you have a spreadsheet?


Of course. It looks like this:

Click the picture to download


Note the following:

1. Three years worth of data is downloaded from Yahoo and monthly returns are
calculated.
2. The values of beta and CAPM and the mean stock return Rstock are calculated.
In the above example (GE vs S&P): beta = 1.688, CAPM = -1.07%, annual risk-free = 4% (so monthly rate
= 0.33%) and mean GE return = -1.66%
3. Then Jensen's alpha is calculated. (In the above example: J-alpha = - 0.59%)

Note: If you'd like to consider only deviations from the Rf (the risk-free return), stick
a y into cell O5.
Then, the risk-free return is subtracted from all returns and beta is calculated as the
slope of the modified regression line.

Note that, if J-alpha = 0%, then (Rstock - Rf) / (Rmkt - Rf) = beta.

Note, too, that the spreadsheet uses the S&P500 as the "market".
If you calculate the S&P500 vs the S&P500, you get (surprise!) J-alpha = 0%.
If you calculate the DOW vs the S&P500, you get J-alpha = 0.07%.

I might point out the Jensen's "alpha" ain't the same as the intercept of the regression
line which is also called alpha ?!#$@!*?

>So what do you conclude?


GE didn't do good over the past three years ... compared to the S&P500.
However, note something interesting: monthly GE stock returns amplified changes in
market returns, 'cause beta = 1.688 was pretty large.
In other words, if an S&P return changed by X% then we'd expect GE return (for the
same period) to change by 1.688X%.
That's the interpretation of the regression line: that "best line fit" in the right graph.

>So you'd expect that to hold in the future?


Me? Of course not.
In fact, if you change the End Date for the data download (in cell B3) to a few years
earlier your conclusion may be quite different.
For example, GE did worser than the S&P over the period 2004-2006, yet J-alpha was
positive.
So don't think that positive J-alpha means the stock done good, compared to the
market.

>So what do you think?


Me? Think?
I should mention that, at this particular time and this particular "definition" of J-alpha
(i.e. using monthly returns over three years),
our friend GE has the worsest J-alpha on the DOW.

Did I mention that (somewhere on the spreadsheet) you can calculate J-alpha for a gaggle of stocks?

P.S. Here's a list of J-alphas for a couple of hundred ETFs ... compliments of Ron
McEwan:

1 AAXJ 2.09% iShares MSCI All Country Asia ex Japan Index Fund
2 ACWI 0.33% iShares MSCI ACWI (All Country World Index) Index Fund
3 ACWX 0.41% iShares MSCI ACWI ex US Index Fund
4 AFK 0.97% Market Vectors-Africa Index ETF
5 AIA 1.87% iShares S&P Asia 50
6 BIK 2.99% SPDR S&P BRIC 40
7 BJK 0.34% Market Vectors Gaming ETF
8 BKF 3.14% iShares MSCI BRIC Index Fund
9 CGW 0.52% Claymore S&P Global Water Index ETF
-
10 CRO Claymore/Zacks Country Rotation ETF
0.03%
11 CUT 0.67% Claymore/Beacon Global Timber Index ETF
12 CWI 0.46% SPDR MSCI ACWI ex-US ETF
13 DBN 1.02% WisdomTree International Basic Materials Sector Fund
-
14 DBR WisdomTree International Health Care Sector Fund
0.50%
-
15 DBT WisdomTree International Technology Sector Fund
0.31%
-
16 DBU WisdomTree International Utilities Sector Fund
1.70%
17 DDI 0.54% WisdomTree International Industrial Sector Fund
-
18 DEB WisdomTree Europe Total Dividend Fund
0.12%
19 DEM 1.70% WisdomTree Emerging Markets High-Yielding Fund
20 DEW 0.04% WisdomTree Europe High-Yielding Equity Fund
21 DFE 1.62% WisdomTree Europe SmallCap Dividend Fund
-
22 DFJ WisdomTree Japan SmallCap Fund
1.40%
-
23 DGG WisdomTree International Communications Sector Fund
0.73%
24 DGS 3.01% WisdomTree Emerging Market SmallCap Fund
25 DGT 0.03% SPDR DJ Global Titans ETF
26 DIM 0.31% WisdomTree International MidCap Dividend Fund
27 DKA 0.89% WisdomTree International Energy Sector Funds
28 DLS 0.63% WisdomTree International SmallCap Fund
29 DND 1.48% WisdomTree Pacific ex-Japan Total Dividend Fund
30 DNH 2.25% WisdomTree Pacific ex-Japan High-Yielding Equity Fund
-
31 DNL WisdomTree Japan High-Yielding Equity Fund
0.73%
-
32 DOL WisdomTree International LargeCap Dividend Fund
0.10%
33 DOO 0.31% WisdomTree International Dividend Top 100 Fund
34 DPC 0.49% WisdomTree International Consumer Cyclical Sector Fund
35 DPN 0.92% WisdomTree International Consumer Non-Cyclical Sector Fund
36 DRF 0.20% WisdomTree International Financial Sector Fund
37 DRW 0.56% WisdomTree International Real Estate Fund
38 DTH 0.28% WisdomTree DEFA High-Yielding Equity Fund
-
39 DWM WisdomTree DEFA Fund
0.03%
40 DWX 1.55% SPDR S&P International Dividend ETF
-
41 DXJ WisdomTree Japan Total Dividend Fund
1.56%
42 ECH 4.85% iShares MSCI Chile Index Fund
43 EEB 3.31% Claymore/BNY Mellon BRIC ETF
44 EEM 2.17% iShares MSCI Emerging Index Fund
45 EEN 0.35% Claymore/BNY Mellon EW Euro-Pacific LDRs ETF
-
46 EEV ProShares UltraShort MSCI Emerging Markets
7.35%
-
47 EFA iShares MSCI EAFE Index Fund
0.09%
-
48 EFG iShares MSCI Growth Index Fund
0.03%
-
49 EFU ProShares UltraShort MSCI EAFE
1.54%
-
50 EFV iShares MSCI Value Index Fund
0.16%
51 EIS 3.90% iShares MSCI Israel Capped Investable Market Index Fund
52 ENY 1.77% Claymore/SWM Canadian Energy Income Index ETF
53 EPI 3.28% WisdomTree India Earnings Fund
54 EPP 1.78% iShares MSCI Pacific Ex-Japan Index Fund
-
55 EUM ProShares Short MSCI Emerging Markets
3.55%
56 EWA 1.99% iShares MSCI Australia Index Fund
57 EWC 1.57% iShares MSCI Canada Index Fund
58 EWD 1.71% iShares MSCI Sweden Index Fund
-
59 EWG iShares MSCI Germany Index Fund
0.91%
60 EWH 2.08% iShares MSCI Hong Kong Index Fund
-
61 EWI iShares MSCI Italy Index Fund
0.75%
-
62 EWJ iShares MSCI Japan Index Fund
1.44%
63 EWK 1.65% iShares MSCI Belgium Index Fund
-
64 EWL iShares MSCI Switzerland Index Fund
0.34%
65 EWM 2.24% iShares MSCI Malaysia Index Fund
66 EWN 0.87% iShares MSCI Netherlands Index Fund
67 EWO 1.56% iShares MSCI Austria Index Fund
68 EWP 0.15% iShares MSCI Spain Index Fund
-
69 EWQ iShares MSCI France Index Fund
0.17%
70 EWS 2.13% iShares MSCI Singapore Index Fund
71 EWT 2.39% iShares MSCI Taiwan Index Fund
72 EWU 0.71% iShares MSCI United Kingdom Index Fund
73 EWV 1.60% ProShares UltraShort MSCI Japan
74 EWW 1.45% iShares MSCI Mexico Index Fund
75 EWX 3.27% SPDR S&P Emerging Markets Small Cap ETF
76 EWY 1.77% iShares MSCI South Korea Index Fund
77 EWZ 4.99% iShares MSCI Brazil Index Fund
Claymore/Beacon Global Exchanges Brokers & Assets Managers Index
78 EXB 0.35%
ETF
-
79 EXI iShares S&P Global Industrials Sector Index Fund
0.35%
80 EZA 1.16% iShares MSCI South Africa Index Fund
-
81 EZU iShares MSCI EMU Index Fund
0.33%
-
82 FAN First Trust ISE Global Wind Energy ETF
0.27%
83 FCHI 1.45% iShares FTSE China (HK Listed) Index Fund
84 FDD 0.99% First Trust Dow Jones STOXX Select Dividend 30 Index Fund
-
85 FEU SPDR DJ STOXX 50 ETF
0.04%
-
86 FEZ SPDR DJ EURO STOXX 50 ETF
0.46%
-
87 FFR First Trust FTSE EPRA/NAREIT Global Real Estate Index Fund
0.27%
88 FGD 1.40% First Trust DJ Global Select Dividend
-
89 FLM First Trust ISE Global Engineering and Construction Index Fund
0.60%
90 FRN 1.90% Claymore/BNY Mellon Frontier Markets ETF
91 FXI 1.36% iShares FTSE/Xinhua China 25 Index Fund
-
92 FXP ProShares Ultrashort FTSE/Xinhua China
6.63%
93 GAF 1.56% SPDR S&P Middle East & Africa ETF
94 GCC 0.56% GreenHaven Continuous Commodity Index Fund
-
95 GEX Market Vectors Global Alternative Energy ETF
1.96%
-
96 GII SPDR FTSE/Macquarie GI 100 ETF
0.97%
97 GMF 2.22% SPDR S&P Emerging Asia Pacific ETF
98 GML 4.14% SPDR S&P Emerging Latin America ETF
99 GMM 2.33% SPDR S&P Emerging Markets ETF
100 GRI 0.07% Cohen & Steers Global Realty Majors ETF
-
101 GULF WisdomTree Middle East Dividend ETF
1.02%
102 GUR 2.61% SPDR S&P Emerging Europe ETF
-
103 GWL SPDR S&P World ex-US ETF
0.08%
104 GWX 0.63% SPDR S&P International SmallCap ETF
105 GXC 2.02% SPDR S&P China ETF
106 HAO 3.53% Claymore/AlphaShares China Small Cap Index ETF
107 HAP 1.33% Market Vectors Hard Assets Producers ETF
108 HGI 1.40% Claymore/Zacks International Multi-Asset Income Index ETF
-
109 ICLN iShares S&P Global Clean Energy Index Fund
1.99%
110 IDV 1.73% iShares Dow Jones EPAC Select Dividend
-
111 IEV iShares S&P Europe 350 Index Fund
0.02%
112 IFAS 0.36% iShares FTSE EPRA/NAREIT Asia Index Fund
113 IFEU 0.19% iShares FTSE EPRA/NAREIT Europe Index Fund
114 IFGL 0.60% iShares FTSE EPRA/NAREIT Global Real Estate ex-U.S. Index Fund
115 IFSM 0.90% iShares FTSE Developed Small Cap ex-North America Index Fund
-
116 IGF iShares S&P Global Infrastructure
0.55%
117 ILF 3.59% iShares Latin America 40 Index Fund
-
118 IOO iShares S&P Global 100 Index Fund
0.15%
119 IPD 2.61% SPDR S&P International Consumer Discretionary Sector ETF
120 IPF 0.14% SPDR S&P International Financial Sector ETF
121 IPK 0.93% SPDR S&P International Technology Sector ETF
122 IPN 1.35% SPDR S&P International Industrial Sector ETF
123 IPS 0.33% SPDR S&P International Consumer Staples Sector ETF
-
124 IPU SPDR S&P International Utilities Sector ETF
1.27%
125 IPW 1.09% SPDR S&P International Energy Sector ETF
126 IRV 1.63% SPDR S&P International Materials Sector ETF
127 IRY 0.04% SPDR S&P International Health Care Sector ETF
-
128 IST SPDR S&P International Telecommunications Sector ETF
0.61%
-
129 ITF iShares S&P/TOPIX 150 Index Fund
1.51%
130 IXC 0.35% iShares S&P Global Energy Index Fund
-
131 IXG iShares S&P Global Financial Index Fund
0.55%
-
132 IXJ iShares S&P Global Healthcare Index Fund
0.17%
133 IXN 1.88% iShares S&P Global Technology Index Fund
-
134 IXP iShares S&P Global Telecommunications Index Fund
0.46%
-
135 JPP SPDR Russell/Nomura PRIME Japan ETF
1.62%
-
136 JSC SPDR Russell/Nomura Small Cap Japan
1.35%
-
137 JXI iShares S&P Global Utilities Sector Index Fund
1.10%
138 KOL 5.16% Market Vectors Coal ETF
-
139 KWT Market Vectors Solar Energy ETF
1.72%
140 KXI 0.21% iShares S&P Global Consumer Staples Sector Index Fund
141 LVL 1.96% Claymore/S&P Global Dividend Opportunities Index ETF
142 MDD 0.33% SPDR S&P International Mid Cap ETF
-
143 MES Market Vectors Gulf States Index ETF
1.45%
144 MOO 2.54% Market Vectors-Agribusiness ETF
145 MXI 1.75% iShares S&P Global Materials Sector Index Fund
-
146 NLR Market Vectors-Nuclear Energy ETF
0.76%
147 NUCL 0.96% iShares S&P Global Nuclear Energy Index Fund
148 ONEQ 1.42% Fidelity Nasdaq Composite Index Tracking Stock
149 PAF 2.12% PowerShares FTSE RAFI Asia Pacific ex-Japan Portfolio
150 PAGG 2.24% PowerShares Global Agriculture Portfolio
-
151 PAO PowerShares Autonomic Balanced Growth NFA Global Asset Portfolio
0.11%
-
152 PBD PowerShares Global Clean Energy Portfolio
0.04%
153 PBP 0.57% PowerShares S&P 500 BuyWrite Portfolio
-
154 PBTQ PowerShares Global Biotech Portfolio
0.41%
-
155 PCA PowerShares Autonomic Balanced NFA Global Asset Portfolio
0.17%
PowerShares FTSE RAFI Developed Markets ex-U.S. Small-Mid
156 PDN 1.52%
Portfolio
157 PEF 0.78% PowerShares FTSE RAFI Europe Portfolio
158 PFA 0.40% PowerShares Dynamic Developed International Opportunities Portfolio
-
159 PFF iShares S&P US Preferred Stock Fund
0.08%
-
160 PGF PowerShares Financial Preferred
0.17%
161 PGJ 1.99% PowerShares Golden Dragon Halter USX China Portfolio
162 PIE 1.40% PowerShares DWA Emerging Market Technical Leaders? Portfolio
163 PIN 2.64% PowerShares India Portfolio
164 PIO 0.71% PowerShares Global Water Portfolio
165 PIZ 0.49% PowerShares DWA Developed Market Technical Leaders Portfolio
-
166 PJO PowerShares FTSE RAFI Japan Portfolio
1.74%
167 PKN 0.03% PowerShares Global Nuclear Portfolio
168 PKOL 4.92% PowerShares Global Coal Portfolio
-
169 PMNA PowerShares MENA Frontier Countries Portfolio
0.99%
170 PQBW 2.29% PowerShares NASDAQ-100 BuyWrite Portfolio
171 PSAU 1.91% PowerShares Global Gold and Precious Metals Portfolio
-
172 PSP PowerShares Listed Private Equity
0.49%
173 PSTL 1.89% PowerShares Global Steel Portfolio
174 PTO 0.05% PowerShares Autonomic Growth NFA Global Asset Portfolio
175 PTRP 1.36% PowerShares Global Progressive Transportation Portfolio
176 PWND 0.35% PowerShares Global Wind Energy Portfolio
177 PXF 0.14% PowerShares FTSE RAFI Developed Markets ex-U.S. Portfolio
178 PXH 2.01% PowerShares FTSE RAFI Emerging Markets Portfolio
179 PXR 2.99% PowerShares Global Emerging Markets Infrastructure Portfolio
180 PZD 0.41% PowerShares Cleantech Portfolio
181 ROB 1.12% Claymore/Robb Report Global Luxury Index ETF
182 RSX 5.64% Market Vectors TR Russia ETF
-
183 RWO SPDR DJ Wilshire Global Real Estate ETF
0.20%
184 RWX 0.17% SPDR DJ Wilshire Intl Real Estate
185 RXI 0.72% iShares S&P Global Consumer Discretionary Sector Index Fund
-
186 SCJ iShares MSCI Japan Sm Cap
1.45%
187 SCZ 0.89% iShares MSCI EAFE Small Cap
188 SEA 0.19% Claymore/Delta Global Shipping Index ETF
-
189 TAN Claymore/MAC Global Solar Energy Index ETF
1.43%
190 TAO 2.42% Claymore/AlphaShares China Real Estate ETF
-
191 TBH HOLDRS TeleBras
2.59%
192 THD 3.55% iShares MSCI Thailand Investable Market Index Fund
193 TOK 0.42% iShares MSCI Kokusai
194 TUR 3.77% iShares MSCI Turkey Investable Market Index Fund
-
195 VEA Vanguard Europe Pacific
0.09%
196 VEU 0.51% Vanguard FTSE All World Ex US ETF
197 VGK 0.21% Vanguard European ETF
-
198 VPL Vanguard Pacific ETF
0.46%
199 VT 0.37% Vanguard Total World Stock Index
200 VWO 2.74% Vanguard Emerging Markets ETF
-
201 WOOD iShares S&P Global Timber & Forestry Index Fund
0.05%
202 WPS 0.17% iShares S&P World ex-US Property

You might also like