Sixty-Forty rule

Quick blog post about the sixty forty rule rebalanced annually.
As always this is not investment advice.

Whipped it up using SPY for stocks and BND for bonds, I used adjusted closes, you could use closes or whatever you like, you can also change rebal to a different number of days.

my_matrix = merge.xts(ROC(Ad(BND),type='discrete'),ROC(Ad(SPY),type='discrete'))['2008/2014']
init_w = c(0.4,0.6)
wmat = xts(matrix(ncol=2,nrow=nrow(my_matrix)),
##(rebal in days)
rebal = 252
wmat[1,] = init_w
for(i in 2:nrow(wmat)){
  wmat[i,] = wmat[i-1,]*(1+my_matrix[i-1,] )
  wmat[i,] = wmat[i,]/sum(wmat[i,])
portfolio_performance = xts(rowSums(wmat*my_matrix),
colnames(portfolio_performance) = c('sixty_forty')

Created by Pretty R at


sixty forty


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: