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) .

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.

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.

Usage

Instant gratification

# Load the package
library(portfolio.optimization)
# Use any scenario data, e.g. the one provided with the package
data(sp100w17av30s)
# Do a portfolio optimization in one line
weights(optimal.portfolio(scenario.set))

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 %>%
weights
# 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 %>%
weights

Further examples

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