Skip to content

treynor black (1973)

2 messages · Geoffrey Smith, ssmith88 at umd.edu

#
Not familiar with the theory, but i googled it and made this as an exercise.  I assumed you had all the inputs already though you'll probably want to start from raw price data.  Shouldn't be too hard to write something to find the inputs from the price data and then follow with this function.  Note this is sloppy as all variables are saved globally, you can clean it as you like.  Also, not sure if there is a package for this already or not. Hope this helps, there's an example below.       


treynorBlack<-function(mret,mvar,beta,alpha,var)
{
#n mispriced assets
#beta,alpha,var are vectors of length n
#mvar and mret are the market variance/return
num<<-numeric(length(beta))

for(i in 1:(length(beta)))
{
num[i]=(alpha[i])/(var[i])
}
denom<<-sum(num)
weights<<-numeric(length(beta))
for(i in 1:length(beta))
{
weights[i]<<-num[i]/denom
}
activeAlpha<<-weights%*%alpha
activeBeta<<-weights%*%beta
activeVar<<-weights%*%var
w<<-(activeAlpha/activeVar)/(mret/mvar)
activeFraction<<-w/(1+w*(1-activeBeta))
passiveFraction<<-1-activeFraction
}
[1,] 0.1395909
[1,] 0.860409
0.3786192 0.1670379 0.4543430