[R-SIG-Finance] Réf. : Re: R-project and the risk measurement for mutual and hedge funds

ngottlieb at marinercapital.com ngottlieb at marinercapital.com
Thu Jun 7 15:42:02 CEST 2007


Fabrice:

I am jumping into the middle of this thread but your issue of Performance
Attribution for Funds caught my attention.

Not sure what type of performance attribution you need
but you can do Style Analysis on funds And good results.

Suggest looking at William Sharpe's 19992 paper on Style Analysis.
If you web search you will find it.

In essence, and I am VERY new to R myself but:

You would want to build a factor model of return series
for each fund along with proxies such as S&P Industry Indexes
or FTSE sect/industry classes (this helps for international stuff).

>From what I can tell with R, there is Principal Components(PCA)
capability. Build a correlation matrix, decompose the matrix
via PCA or Single Value Decomposition(SVD) to get eigenvectors.

>From experience rotate them so they are orthogonal. That would be 
using a promax technique if R has such.

The last step is to load your factor model with an optimizer
with the benchmark, objective function, the fund itself and the
Tableau containing the underlying factors for the indices you use.

See the Sharpe Paper 1992, it's good explanation
but his categories for style analysis is not perfect.

Hope this helps as my first contribution to R threads
And being TOTALLY new to using R. 

from a former SPSS and IMSL programmer!
Neil

-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Brian G. Peterson
Sent: Thursday, June 07, 2007 7:58 AM
To: Fabrice McShort
Cc: R-SIG-Finance
Subject: Re: [R-SIG-Finance] Réf. : Re: R-project and the risk measurement for mutual and hedge funds

Fabrice McShort writes:
> Thanks for your help!
> 
> R project will enable me to have CVaR, Modified Sharpe Ratio, etc. 
> But, I guess that I cannot use R project to produce "automatically" 
> Risk management report and performance attribution for the funds. 
> Is it true? I will be happy to know what software is appropriated
 > for this task?
> 
> PS: I need to produce 500 risk management reports per month!!!
> 
> Thanks!

guillaume.nicoulaud at halbis.com wrote:
 > One convenient way to do that is to build a R - TeX architecture.
 > If your raw data is stored in a database you may build pdf reports  > for as many funds you want in just one click.
 > G


Giullaume is correct.  I'll provide a little more context.

The primary tool that you want is Sweave, which allows you to run R code from inside a LaTeX document.  This is straightforward, but I wouldn't call it simple if you're not familiar with LaTeX and as a newcomer to R.

I would recommend starting by choosing a LaTeX editor that can be used with Sweave, such as Lyx.  There are HOWTO's available online describing how to configure Lyx for use with Sweave.

Then, you'll construct your risk report.  Basically, I'd look at the charts and tables in the PerformanceAnalytics package for ideas on how you might build R functions to compile statistics you need for your report into tabular data and for charts that you may wish to display. 
Many of the charts and tables in PerformanceAnalytics may be appropriate starting places for your mutual fund reports because many of them were developed for analysis of portfolios of hedge funds. I also mention it because as one of the authors, I'm most familiar with it.

You'll probably want to use Lyx or some other LaTeX editor to help you lay out your Sweave document into a nice printable report structure.  As Guillaume mentioned, if your historical data is stored in a database, you can automate the task of loading the data and generating one report per fund.  If your historical data is in files or available via a web download interface, this could be automated also.  Ask the list if you run into specific problems on this that you are having trouble sorting through yourself.

Once you have a layout that works, running Sweave in an automated or semiautomated fashion for producing the reports is pretty straightforward.  There was an R News article specifically on this topic a while back that I'm sure a little Google searching could help you locate.

Hopefully this adds a little more context to Guillaume's suggestion. 
The list will be happy to help with specifics as you get closer.  Please consider sharing the LaTeX/noweb document that you develop with the community.  I'm sure others would benefit from your experience.

Regards,

    - Brian

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. 
-- If you want to post, subscribe first.
--------------------------------------------------------

 
 
This information is being sent at the recipient's request or with their specific understanding. The recipient acknowledges that by sending this information via electronic means, there is no absolute assurance that the information will be free from third party access, use, or further dissemination. This e-mail contains information that is privileged and/or confidential and may be subject to legal restrictions and penalties regarding its unauthorized disclosure or other use. You are prohibited from copying, distributing or otherwise using this information if you are not the intended recipient. Past performance is not necessarily indicative of future results. This is not an offer of or the solicitation for any security which will be made only by private placement memorandum that may be obtained from the applicable hedge fund. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from your system. Thank You.



More information about the R-SIG-Finance mailing list