Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/rpsg_riskconstrprog.R
Finds a minimum for the problem
min_x [risk1(x) + d\cdot x]
subject to
risk2 ≤q r
A \cdot x= b
Aeq \cdot x= beq
lb ≤q x ≤q ub
where
A, Aeq are matrices;
d, x are vectors;
b, beq, lb, ub are vectors or scalars;
risk1(x), risk2(x) functions are linear combinations of PSG risk functions, PSG deterministic functions, or PSG utility functions. List of PSG functions for riskprog
1  rpsg_riskconstrprog(model, stroptions = NULL)

model 
list with data for the optimization problem. Some components are optional. Names of list members:

stroptions 
list with additional optimization options:

list results
with solution results:
results$status
status of solved problem;
results$objective
optimal value of objective function;
results$gap
difference between objective value in obtained point and Lower estimate of optimal value;
results$optimal.point
optimal point;
results$risk.constraint.value
optimal values of left hand sides of risk constraint;
results$risk.constraint.residual
residual of risk constraint;
results$ineq.constraint.value
optimal values of left hand sides of linear inequality constraint;
results$ineq.constraint.residual
residual of linear inequality constraint;
results$eq.constraint.value
optimal values of left hand sides of linear equality constraint;
results$eq.constraint.residual
residual of linear equality constraint;
results$function.value
optimal values of PSG functions defined in problem;
results$loading.time
data loading time;
results$preprocessing.time
preprocessing time;
results$solving.time
solving time.
Exponential Utility, Logarithmic Utility, Power Utility, Logarithms Sum, and Logarithms Exponents Sum functions are included in the objective with the negative coefficient 1 by default. However, you should not set any coefficient for these functions, riskprog sets it automatically.
linear, pr_dev, pr_dev_g, pr_pen, and pr_pen_g PSG functions should NOT be combined with the vector d.
Relative Entropy function (entropyr) can have up to 100,000,000 decision variables if stroptions$linearization=1 is specified. This option may dramatically speedup calculations. In this case,a BULDOZER solver is recommended (options$solver < "buldozer").
Stan Uryasev [aut, cre, cph], Grigoriy Zrazhevsky [aut], Viktor Kuzmenko [aut], Alex Zrazhevsky [aut]
Maintainer: Stan Uryasev <[email protected]>
American Optimal Decisions
Portfolio Safeguard Help
rpsg_riskprog
rpsg_riskratioprog
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  #Problem of CVaR minimization with constraint on the mean profit:
#Find x = (x1,x2,x3,x4) minimizing
#risk(x) = CVaR(0.95,x)
#subject to
#Average Gain(x)>4.5
#x1+x2+x3+x4 = 1
#x1>=0, x2>=0, x3>=0, x4>=0
input.model < list()
input.model$risk1 < "cvar_risk"
input.model$w1 < 0.95
input.model$H1<matrix(c(1,4,8,3, 7,5,4,6, 2,8,1,0,0,3,4,9),nrow=4, byrow=TRUE)
input.model$c1 < c(0.2, 0.11, 0.6, 0.1)
input.model$risk2 < "avg"
input.model$H2<matrix(c(1,4,8,3, 7,5,4,6, 2,8,1,0,0,3,4,9),nrow=4, byrow=TRUE)
input.model$c2 < c(0.2, 0.11, 0.6, 0.1)
input.model$rineq < 4.5
input.model$Aeq < matrix(c(1, 1, 1, 1),nrow=1)
input.model$beq < 1
input.model$lb<c(0, 0, 0, 0)
options<list()
options$solver < "van"
options$precision < 7
options$stages < 30
results < rpsg_riskconstrprog(input.model,options)
print(results)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.