Wednesday, March 16, 2011

Tutorial: Portfolio Optimization Using R

I wrote a tutorial on how to implement some portfolio optimizers in R for a class. The tutorial implements three types of factor models:

  • A Fama-French three factor model

  • An industry cross-sectional model

  • A principal component analysis model

This is for instructional purposes only: it's not a software for you to plug in your portfolio and start investing. However, if you make millions doing so, I wouldn't mind a 10% cut.

Two things that are not in the tutorial but that are important if you really want to implement something for real use are:

  • Selecting the data that will be used for optimization (I use the Dow Jones Industrial Average from 2006 to 2010)

  • Optimizing Sharpe ratios by combining the portfolio with a risk-free asset (such as T-bills)

Download Factor Models

No comments: