<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">Hello everyone,</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">I wanted to ask my first-ever question via R-SIG-Finance, with regard to portfolio constraints and the “PortfolioAnalytics”-package in R. </span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">When distinguishing between certain types of investors, the empirical literature often employs certain values for the risk aversion coefficient. I now read a study that additionally makes use of upper volatility bounds (“less than or equal to…”) and was asking myself whether it would be possible to implement something like that for out-of-sample portfolio optimization with PortfolioAnalytics. </span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">So, a code similar to this: </span></span></span></p>

<p style="margin-bottom:11px"> </p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">port <- portfolio.spec(assets = colnames(returns_monthly))</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">port <- add.constraint(port, "long_only")</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">port <- add.constraint(port, "weight_sum", min_weight = 0.99, max_weight = 1.01)</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">port <- add.objective(port, type = "risk", name = "var", risk_aversion = 2)</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">port <- add.objective(port, type = "return", name = "mean")</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">opt <- optimize.portfolio.rebalancing(R = returns_monthly, portfolio = port, optimize_method = "ROI", rebalance_on = "months", training_period = 60, rolling_window = 60)</span></span></span></p>

<p style="margin-bottom:11px"> </p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">that also includes another constraint, which gives an upper volatility bound for the portfolio? </span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">I recently read a dissertation, that stated that such a constraint would be a convex one, which could not be expressed linearly, and therefore not solvable for many packages/solvers.</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">Therefore, I wanted to ask if anyone here might have already implemented an upper volatility/variance constraint with PortfolioAnalytics or knows, whether it would be possible to successfully do this with the package?</span></span></span></p>

<p style="margin-bottom:11px"> </p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">Kind regards</span></span></span></p>

<p style="margin-bottom:11px"><span style="font-size:11pt"><span style="line-height:107%"><span style="font-family:Calibri,sans-serif">Jarno</span></span></span></p>

<p style="margin-bottom:11px"> </p></div></body></html>