[R-SIG-Finance] fPortfolio - Status - New Functionalities ...

Diethelm Wuertz wuertz at itp.phys.ethz.ch
Sun Jan 11 13:16:27 CET 2009

About the current status and new functionalities of Portfolio analysis 
and optimization in Rmetrics.
Hpefully, it would help to clarify some frequently asked questions on 


Currently there are two packages on the *** CRAN *** server for 
portfolio optimization: "fPortfolio" which is dependent on another 
portfolio specific package, "fAssets". Please note, the portfolio 
packages rely on the "timeDate" and "timeSeries" packages.


fPortfolio can currently handle the following two problems:

1. Mean-Variance portfolio optimization with a quadratic objective and 
linear constraints using the "quadprog" solver from R for quadratic 
programming problems. Note, to this class of problems do not belong the 
problems of maximizing the return for a given risk, and also not 
problems with quadratic or nonlinear constraints like portfolios with 
covariance risk budgeting, or 130/30 portfolios. These portfolios are 
more complex and require solvers which can handle quadratic and/or 
nonlinear constraints.

2. Mean-CVaR portfolios which belong to the class of scenario 
optimization problems with a linear objective function and linear 
constraints. The default solver for this kind of portfolio is the solver 
from the package "Rglpk". Again yo cannot solve more complex problems 
which add quadratic or non-linear  constraints.


To solve more complex portfolio models we started some time ago to write 
a package called "fPortfolioSolver". We also started to write some  
portfolio specific interface packages named  "Ripop" (interior point 
optimization),  "Rscop" (second order cone programming) among others. 
And we have slightly modified packages like "Rdonlp2",  "RlpsolveAPI" 
among others to support our needs for more complex portfolio 
optimization. We also provided a package "fPortfolioBacktest" including 
functions for rolling backtesting and partly for rolling benchmarking 
and rolling performance analysis. All these packages are under *** 
current development *** . They are therefore not yet or less documented 
and in many cases also less or even not yet fully tested.

*** Nevertheless, we share the code with you on r-forge, here is the link:
*** Evenmore, the repository also contains the most recent versions of 
all Rmetrics packages

You should not expect that you get a free portfolio software ready for 
commercial use running without any problems! Rmetrics is open source 
mainly for educational purposes and we have programmed it for *** our 
needs *** and and for *** our fun ***! We are willing to share our 
software code with others who are interested to use part of this code or 
functions for their personal investigations. Look at the packages on 
r-forge as a code reservoir, and feel free to adapt and modify it for 
your personal needs. We are open to any discussions on the software, to 
get recommendations and improvements, and to get any other kind of help. 
And even more important, we are *** dependent *** on financial support 
from you and other parties and institutions which would definitely help 
us to continue Rmetrics, to continue a recently started documentation 
project for portfolio optimization, and to speed up code development by 
financing new Student Internships, Bachelor, Masters and PhD thesis 
projects for Rmetrics. If you like Rmetrics, feel free to tell us your 
wishes and to report us your needs. Please, contact us 
(wuertz[at]phys.ethz.ch) if you like to support Rmetrics in any of  the 
mentioned directions!

We wish you a successful 2009

Diethelm Wuertz

More information about the R-SIG-Finance mailing list