Skip to content

Portfolio performance metrics/ratios

2 messages · Spencer Graves, Sankalp Upadhyay

#
Have you considerred RMetrics (www.rmetrics.org)?  If yes, and if you 
would still like more help from this list, I suggest you review the 
Posting Guide for r-help (www.R-project.org/posting-guide.html) and 
submit a more specific question, preferably with some code that 
illustrates what you are trying to do and helps describe where you would 
like further assistance.

	  spencer graves
Sankalp Upadhyay wrote:

  
    
1 day later
#
As I had written, these are portfolio performance metrics - those that
an investor or evaluator of a fund would calculate given the return
series. So in that sense there is not much statistics in it and
functions are standard and straight forward - this is the reason I
thought that some package must contain them,

Anyways, it is done now. e.g.

sortino <- function(returns, MAR = 0) {
	if (length (returns) <= 1) NA
	else mean (returns - MAR) / downDeviation(returns, MAR)
}

trackingError <- function (portfolio, benchmark) {
	if (length (portfolio) != length (benchmark)) NA
	else if (length (portfolio) <= 1) NA
	else sd (portfolio - benchmark)
}

informationRatio <- function (portfolio, benchmark) {
	if (length (portfolio) != length (benchmark)) NA
	else if (length (portfolio) <= 1) NA
	else mean (portfolio - benchmark) / trackingError (portfolio, benchmark)
}

In case anyone needs these let me know - there are a lot of them. I
can clean them up and send it,
Thanks for the help,

Sankalp
On 10/10/05, Spencer Graves <spencer.graves at pdf.com> wrote:
--
--
Sankalp Upadhyay
Investment Analyst
Roulac Global Funds