Contemporary Portfolio Optimization

Simplify your portfolio optimization process by applying a contemporary modeling way to model and solve your portfolio problems. While most approaches and packages are rather complicated this one tries to simplify things and is agnostic regarding risk measures as well as optimization solvers. Some of the methods implemented are described by Konno and Yamazaki (1991) , Rockafellar and Uryasev (2001) and Markowitz (1952) .

© 2013-2018 Ronald Hochreiter / [email protected]

This package aims at implementing something along the lines of a tidy portfolio optimization framework, simplifying the whole process from data to decision as good as possible.

More about Finance with R can be found at

Main Motivation

The main motivation is to create a R package that simplifies the process of portfolio optimization as much as possible. Furthermore providing an approach to portfolio optimization which is completely agnostic to risk measures and optimization methods. Finally the approach should naturally fit into the contemporary R piping concept using packages like magrittr.


Instant gratification

# Load the package

# Use any scenario data, e.g. the one provided with the package

# Do a portfolio optimization in one line

Piping using magrittr

Furthermore, everything should be pipeable and such is the design of the package, i.e.

# The above initial portfolio optimization can be piped as follows 
scenario.set %>% 
  optimal.portfolio %>% 

# Of course, this is interesting if you change lots of parameters and keeps your
# portfolio models readable and well-shaped for communication
scenario.set %>% 
  portfolio.model %>% 
  objective("expected.shortfall") %>% 
  alpha(0.1) %>% 
  upper.bound(0.2) %>%
  optimal.portfolio %>% 

Further examples

There are some tutorials built into the package, which you may e.g. open with the following commands:




  • Version 1.0-0 submitted to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0-0 by Ronald Hochreiter, a year ago

Browse source code at

Authors: Ronald Hochreiter [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Depends on xts, MASS, magrittr, modopt.matlab

See at CRAN