This is a bit of an open question but the fund manager my super with has over two hundred funds I can move my investment around in. Using R I typically focus on a handful of funds, plotting MACD's and and just relying on visualisation methods like that but I was hoping for some pointers on more objective measures re risk, return that are practical to apply to several hundred investment funds. To be fair, many of the funds are "me too" so it wouldn't hurt to cull this to a significantly smaller set. I have some code which downloads the daily fund entry and exit prices into an sqlite database which I read directly with R. Any tips for me (an engineer not a statistician) would be most appreciated. cheers
making sense of 100's of funds
4 messages · paul sorenson, Brian G. Peterson, Gabor Grothendieck
paul sorenson wrote:
This is a bit of an open question but the fund manager my super with has over two hundred funds I can move my investment around in. Using R I typically focus on a handful of funds, plotting MACD's and and just relying on visualisation methods like that but I was hoping for some pointers on more objective measures re risk, return that are practical to apply to several hundred investment funds. To be fair, many of the funds are "me too" so it wouldn't hurt to cull this to a significantly smaller set. I have some code which downloads the daily fund entry and exit prices into an sqlite database which I read directly with R. Any tips for me (an engineer not a statistician) would be most appreciated.
Well, your simplest first cut would be to find a good benchmark for each style you're interested in. Then you can do correlations to the benchmark for all the funds in each style. Funds with a very high correlation to the benchmark could probably be replaced more cheaply with index ETF's, unless they are low-fee index funds. For risk, you need to decide which risk measures matter to you. variance is the most common measure of risk, but it also has many issues in assuming a normal distribution. You may wish to choose a measure such as Sortino's Upside Potential Ratio that utilizes a return target called the minimum acceptable return. Then you could stack-rank the funds in a given style, or across styles, by UPR to aid your choice. I wrote a short overview of multiple Performance and Risk measures as the package level help for the PerformanceAnalytics package. You could download the pdf documentation from CRAN, and take a look at section PerformanceAnalytics-package. Regards, - Brian
Ok - thanks for the tips off list Brian and Patrick.
After reading through some of the PerformanceAnalytics docs one of the
first things I tried to do was convert the daily unit prices to returns.
Just looking at the resulting time series is enlightening in its own
right (I guess I should be surprised).
The next bit it more of an R style question. I currently have the data
in one data frame with the fund name as a factor.
> names(funds)
[1] "fundname" "tier" "region" "assetClass" "security"
[6] "style" "geared" "hedged" "pdate" "EntryPrice"
[11] "ExitPrice" "Group"
Plotting the raw prices is almost a trivial matter with xyplot's formula
interface, with or without groups:
print(xyplot(ExitPrice ~ pdate | fundname, data=funds, type='l',
layout=c(2,4),
par.strip.text=list(cex=0.7)))
It may just be my inexperience with lattice but once I start dealing
with zoo objects, then lattice doesn't seem to be quite so convenient.
I could cbind the returns back into the the dataframe and continue using
xyplot but it seems that would be throwing away the features of zoo.
What do people on the list do?
cheers
paul sorenson wrote:
This is a bit of an open question but the fund manager my super with has over two hundred funds I can move my investment around in. Using R I typically focus on a handful of funds, plotting MACD's and and just relying on visualisation methods like that but I was hoping for some pointers on more objective measures re risk, return that are practical to apply to several hundred investment funds. To be fair, many of the funds are "me too" so it wouldn't hurt to cull this to a significantly smaller set. I have some code which downloads the daily fund entry and exit prices into an sqlite database which I read directly with R. Any tips for me (an engineer not a statistician) would be most appreciated.
On 8/11/07, paul sorenson <sf at metrak.com> wrote:
Ok - thanks for the tips off list Brian and Patrick. After reading through some of the PerformanceAnalytics docs one of the first things I tried to do was convert the daily unit prices to returns. Just looking at the resulting time series is enlightening in its own right (I guess I should be surprised). The next bit it more of an R style question. I currently have the data in one data frame with the fund name as a factor.
> names(funds)
[1] "fundname" "tier" "region" "assetClass" "security"
[6] "style" "geared" "hedged" "pdate" "EntryPrice"
[11] "ExitPrice" "Group"
Plotting the raw prices is almost a trivial matter with xyplot's formula
interface, with or without groups:
print(xyplot(ExitPrice ~ pdate | fundname, data=funds, type='l',
layout=c(2,4),
par.strip.text=list(cex=0.7)))
It may just be my inexperience with lattice but once I start dealing
with zoo objects, then lattice doesn't seem to be quite so convenient.
I could cbind the returns back into the the dataframe and continue using
xyplot but it seems that would be throwing away the features of zoo.
What do people on the list do?
Read the documentation in ?xyplot.zoo and ?plot.zoo .