# Risk free rate for Performance Analytics

In [R] one can pass either a vector or scalar as the risk free rate. What is better? If I pass a vector to (for example) chart.riskreturnscatter then the sharpe ratio lines disappear.

chart.RiskReturnScatter(managers[,c(1,2,3)],0.01)
chart.RiskReturnScatter(managers[,c(1,2,3)],managers[,10])


So is this a feature?

Thanks, Raghu

This is a feature, when you pass a vector it's because the risk free rate has changed over time. E.g. you can assume a constant or changing risk free rate as each period of returns can have an associated risk free rate.

• Kyle - Thanks for the response. I appreciate why one would want a varying Rf but if I pass a vector I can't get the Sharpe lines on the graph. Do Sharpe line not make sense with a varying Rf rate? – Raghu Ramachandran Jan 9 '15 at 21:21
• Try playing the graphical parameters to ensure your lines are not out of range of the graph. – Kyle Balkissoon Jan 9 '15 at 21:44
• In chart.RiskReturnScatter, Sharpe lines are added using abline(a = (Rf * 12), b = add.sharpe[line], col = "gray", lty = 2) } (where b = c(1,2,3)) This won't work if Rf is a vector because a has to be a scalar. – Raghu Ramachandran Jan 12 '15 at 16:30
• # @todo: Drawing Sharpe ratio lines currently throws warnings; change test statement, from the source code, likely it's a work in progress. – Kyle Balkissoon Jan 16 '15 at 22:13