25.11.2015 Views

The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.1. PORTFOLIO OPTIMIZATION 101<br />

is nicer than<br />

∥<br />

∥G T x ∥ ∥ ≤ γ<br />

x T Σx ≤ γ 2<br />

for small and values of γ. For instance assume a γ of 10000 then γ 2 would 1.0e8 which introduces a<br />

scaling issue in the model. Hence, using conic formulation it is possible to work with the standard<br />

deviation instead of the variance, which usually gives rise to a better scaled model.<br />

8.1.2.2 Implementing the portfolio model<br />

<strong>The</strong> model (8.3) can not be implemented as stated using the <strong>MOSEK</strong> <strong>optimizer</strong> <strong>API</strong> because the <strong>API</strong><br />

requires the problem to be on the form<br />

where ˆx is referred to as the <strong>API</strong> variable.<br />

maximize<br />

c T ˆx<br />

subject to l c ≤ Aˆx ≤ u c ,<br />

l x ≤ ˆx ≤ u x ,<br />

ˆx ∈ K.<br />

<strong>The</strong> first step in bringing (8.3) to the form (8.4) is the reformulation<br />

(8.4)<br />

maximize µ T x<br />

subject to e T x = w + e T x 0 ,<br />

G T x − t = 0<br />

[s; t] ∈ Q n+1 ,<br />

x ≥ 0,<br />

s 0.<br />

where s is an additional scalar variable and t is a n dimensional vector variable. <strong>The</strong> next step is to<br />

define a mapping of the variables<br />

(8.5)<br />

ˆx = [x; s; t] =<br />

⎡<br />

⎣ x s<br />

t<br />

⎤<br />

⎦ . (8.6)<br />

Hence, the <strong>API</strong> variable ˆx is concatenation of model variables x, s and t. In Table (8.1) the details of<br />

the concatenation are specified. For instance it can be seen that<br />

because the offset of the t variable is n + 2.<br />

ˆx n+2 = t 1 .<br />

Given the ordering of the variables specified by (8.6) the data should be defined as follows

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!