Wednesday, December 23, 2015

How to interpret Beta?

How to interpret beta?

sensitivity of the expected excess asset returns, E(Ri) - Rf, to the expected excess market returns, E(Rm) - Rf
so, beta = (E(Ri) - Rf) / (E(Rm) - Rf)

in other words, beta tells u how many times your instrument should return above rfr given the market return above rfr

say the market return = 5%, rfr = 2%, and your stock has a 1.5 beta
beta tells you that your instrument should be getting 6.5% return
if your instrument returns above 6.5%, ALPHA!!  :D
if below, then why are u investing in that instrument rather than the market portfolio?


how to calculate beta?

Cov(Ri, Rm)/Var(Rm)
= (corr(Ri, Rm) * sigma i * sigma m) / (sigma m)^2
= corr(Ri, Rm) * sigma i / sigma m


putting in back to capm
Ri = rfr + beta * (Rm - rfr)
Ri - rfr = corr(Ri, Rm) * sigma i * (Rm-rfr)/sigma m
(Ri -rfr) /sigma i = corr(Ri, Rm) * (Rm-rfr)/sigma m

now we can interpret the corr(Ri, Rm) as
the ratio between sharpe ratio of the instrument and the sharpe ratio of the market


what is variance?
avg squared deviation from mean
= E[(X-E[X])^2]

can also be thought of as the covariance with itself
= Cov(X,X)
= E[(X-E[X])(X-E[X])]

which brings us to the covariance of 2 diff variables
Cov(X,Y)
= E[(X-E[X])(Y-E[Y])]

Tuesday, December 8, 2015

setup linux vm in 64-bit Windows host without installation

Download binary from lassauge.free.fr/qemu and extract

Create a 40G hard disk by running
qemu-img create hd.img 40G

Install by Linux os with
qemu-system-x86_64 \
-drive file=hd.img,index=0,media=disk,format=raw \
-L Bios -m 1024 \
-cdrom fedora-install.iso


Start your vm with ssh port forwarded with
qemu-system-x86_64 \
-drive file=hd.img,index=0,media=disk,format=raw \
-L Bios -m 1024 \
-redirect tcp:2222::22

ssh -p 2222 localhost
to get to your vm