Why Portfolio Safeguard

Simplicity of codding of optimization problems.

 

Example Problem 1. Maximize expected return with constraint on Value-at-Risk and budget constraint:

                   

subject to

where =  vector of average rate of returns and =  matrix of return scenarios of instrument; = vector of decision variables (instrument positions), = Value-at-Risk (VaR function with confidence parameter ).

 

PSG code in MATLAB Environment (call of optimization subroutine):

 

riskconstrprog([], 'var_risk', [], [], [], [], 0.95, B, [], [], r, 0.02, [], [], C, 1, lb, ub);

 

PSG code in Run-File (text) Environment:

 

maximize

 linear(matrix_r)

Constraint: <= 0.02

 var_risk(0.95, matrix_B)

Constraint: == 1

 linear(matrix_C)

Box: >= point_lb, <= point_ub

 

The matrix_r contains vector of average rate of returns. The matrix_B is the matrix of return scenarios of instrument. The matrix_C=(1,…,1) is included in the linear budget constraint.

 

See Problem 2 of the Case Study VaR vs Probability Constraints.

 

You can move VaR to constraint or replace VaR by some other risk function precoded in PSG, such as Standard Deviation, Variance, CVaR, Drawdown, Partial Moment, and Probability.

 

 

Example Problem 2. Logistic regression with cardinality constraint.

subject to

where = matrix of values of factors, = column with 0/1 outcomes, =  unit vector; = vector of coefficients of logistic regression model, = log-likelihood function in Logistic Regression (see Logarithms Exponents Sum), = Cardinality function.

 

PSG code in MATLAB Environment (call of optimization subroutine):

 

riskconstrprog({-1,'logexp_sum'}, 'cardn', [], A, a, [], 0.000001, B, [], [], [], 4)

 

 

PSG code in Run-File (text) Environment:

maximize

 logexp_sum(matrix_Aa)

Constraint: <= 4

 cardn(0.000001, matrix_B)

 

The matrix_Aa contains columns of factors "A" (observations) and column "a" with 0/1 outcomes , the matrix_B = unit vector. The maximum number of nonzero factors equals . The factor is considered to be zero if the factor value is below value 0.000001.

 

 

See Problem 3 of the Case Study Logistic Regression and Regularized Logistics Regression Applied to Estimating  Probabilities.

 

Example Problem 3. Estimating quantiles (quantile regression) and estimating CVaR (mixed quantile regression) .

 

The following optimization problem estimates quantiles using Quantile Regression.

 

 

where =  extended design matrix; = vector of coefficients of the Quantile Regression function, = rescaled Koenker and Basset error function, where (see inRockafellarR.T. and S. Uryasev, 2013, Example 2: A Quantile-Based Quadrangle).

PSG code in MATLAB Environment (call  of optimization subroutine):

 

riskprog('kb_err', 0.1, A, b)

 

PSG code in Run-File (text) Environment:

 

minimize

 kb_err(0.1, matrix_Ab)

 

The matrix_Ab contains extended design matrix . The confidence level equals,.

 

See Problem 1 of the Case Study Quantile Regression: Style Classification of Portfolio

 

The following optimization problem estimates CVaR with linear regression.

 

 

where = extended design matrix; = vector of coefficients of quantile regression, = Rockafellar Error function.

PSG code in Run-File (text) Environment:

 

minimize

 ro_err(matrix_Ab, matrix_param)

 

The matrix_Ab contains the extended design matrix ; matrix_param contains vectors and , = Rockafellar error (see in RockafellarR.T. and S. Uryasev, 2013, Example 10:A Mixed-Quantile-Based Quadrangle).

 

See Problem 1 of the Case Study Mixed Quantile Regression: Estimation of CVaR with Explanatory Factors

 

[1] Rockafellar R.T. and S. Uryasev.The Fundamental Risk Quadrangle in Risk Management, Optimization, and Statistical Estimation.Surveys in Operations Research and Management Science, 18, 2013.

 

Example Problem 4. Intensity-Modulated Radiation Therapy (IMRT) treatment planning problem.

where = decision vector,= vector; = matrix; index denotes -th component of  a vector.

PSG code in MATLAB Environment (call of optimization subroutine):

 

riskprog(‘pm2_pen_g’, 0, A, b)

 

PSG code in Run-File (text) Environment:

 

minimize

 pm2_pen_g(0, matrix_Ab)

 

where pm2_pen_g denotes PSG function  which is called Partial Moment Two , matrix matrix_Ab contains and .

 

See the Case Study Intensity-Modulated Radiation Therapy Treatment Planning Problem

 


 

Portfolio Safeguard (PSG) is a mixed-integer nonlinear optimization package. Although, it is a general optimization package, mostly it is focused on solving problems in uncertain environment.

 

PSG contains precoded major classes of nonlinear functions and can optimize these functions in analytic format.

 

PSG has two main advantages:

1) Simplicity of programming in analytic functional format;

2) High efficiency (for very large dimensions) resulting from specialized algorithms for precoded functions.

 

PSG addresses a wide range of optimization problems. Here are some areas where PSG is used:

Financial Engineering (Mortgage Pipeline Hedging, Portfolio Optimization with Mixed CVaR Profile, Portfolio Optimization with Nonlinear Transaction Costs, and others)
Advanced Statistics (Estimation of CVaR through Explanatory Factors with Mixed Quantile Regression, Spline Regression, Support Vector Machines Based on Tail Risk Measures, Data Envelopment Analysis,and others)
Stochastic Programming (Stochastic Two Stage Linear Problem, Supply Chain Planning Problem, and others)
Logistics (Optimal Allocation of Stock Levels and Stochastic Customer Demands to a Capacitated Resource, Stochastic Multicommodity Network Flow Problem, and others)
Medical Applications (Optimizing Intensity-Modulated Radiation Therapy Treatment Planning Problem)
Mechanics  (Optimization of Parameters of Beam Excitation Waveform).

 

 

PSG incorporates precoded nonlinear functions in various areas.

 

Nonlinear and Discrete Functions:

1.Norms, such as L1, L2, L Infinity, and CVaR norm.
2.Functions for Mixed-Integer programming, such as Cardinality (counting nonzero decision variables), Fixed Charge (assigning costs for project initiation), and Buy-In (to assign low limit for nonzero variables).

 

Functions for Uncertainty Analysis:

1.Risk Functions in uncertainty analysis, such as Variance, Standard Deviation, VaR (percentile), CVaR (Conditional Value-at-Risk), Probability, Partial Moment (expected penalty), Maximum Likelihood for Logistic Regression and Entropy.
2.Error Functions in Statistics, such as Mean Square  (L2), Mean Absolute (L1),  Koenker and Basset (for percentile estimation), Rockafellar (for CVaR estimation)
3.Maximum Likelihood Functions in Statistics, such as Maximum Likelihood for Logistic Regression.
4.Distances Between Distributions, Kolmogorov-Smirnov, Kantorovich, and CVaR Distance.
5.Spline Functions, for fitting with different Error and Risk Functions (e.g., finding optimal splines for preprocessing variables for Logistic Regression).