I am trying to calculate the turnover for a portfolio strategy.
First I generate some random data and assign it dates:
data <- replicate(6,rnorm(1000)) data <- as.data.frame(data) dates<-seq(as.Date("1932/09/01"), as.Date("2015/12/01"), by = "1 month",tzone="GMT")-1 rownames(data)<-dates
I convert it to xts format:
Then I use the Return.portfolio() function to calculate the rebalanced weights assuming an equal weighted strategy:
library(PerformanceAnalytics) results <- Return.portfolio(data,rebalance_on="months",geometric=F,verbose=T)
In order to calculate the turnover I'm assuming that I need the beginning of period weights and end of period weight.
I extract these from the results:
bop <- results$BOP.Weight #beginning of period weights eop <- results$EOP.Weight #end of period weights
Then to calculate the turnover I substract
eop and take the absolute value:
Finally, to calculate the turnover I use the following formula:
However, when I test this on real-data (where I know what the turnover should be) I get huge, unrealistic numbers with this method.
What am I doing wrong?
My definition of turnover comes from: Demiguel et al Constraining Portfolio Norms http://faculty.london.edu/avmiguel/DeMiguelGarlappiNogalesUppalMS.pdf page 806
The definition is: