Learn R Programming

parma (version 1.5-3)

constraints: NLP custom constraint functions

Description

Provides a number of custom constraints and their jacobians for use with the NLP representation (both minimum risk and the fractional problem).

Usage

ineqfun.turnover.min(w, optvars, uservars)
ineqjac.turnover.min(w, optvars, uservars)
ineqfun.bsturnover.min(w, optvars, uservars)
ineqjac.bsturnover.min(w, optvars, uservars)
ineqfun.turnover.opt(w, optvars, uservars)
ineqjac.turnover.opt(w, optvars, uservars)
ineqfun.bsturnover.opt(w, optvars, uservars)
ineqjac.bsturnover.opt(w, optvars, uservars)
ineqfun.variance.opt(w, optvars, uservars)
ineqjac.variance.opt(w, optvars, uservars)
ineqfun.variance.min(w, optvars, uservars)
ineqjac.variance.min(w, optvars, uservars)

Arguments

w

The decision weight vector.

optvars

Problem specific list (not for use by user).

uservars

User specific list with some required parameters to be set (see details).

Value

Used internally by the NLP solver. The fun return a scalar, while the jac return a matrix with n.cols equal to the length of the decision vector (which may be greater than the length of the weights as in the fractional problem which contains the fractional multiplier as well as other formulations which have additional decision variables).

Details

Functions preceded be “ineqfun” denote the functions which may be passed to the ineqfun option in the parmaspec function, while “eqfun” to the eqfun option. Functions which include “jac” in the first part of the name denote the jacobians of the equivalent constraints and should be passed to the ineqgrad or eqgrad options in parmaspec. Functions ending with “min” denote formulations for use with the minrisk type problems while functions ending with “opt” denote the fractional risk formulation. For the simple turnover constraint, the uservars list must contain an entry called ‘wold’ denoting the previous vector of weights with which the comparison will be made. Additionally, an entry called ‘turnover’ is required which denotes the (positive) value for the maximum turnover. For the buy and sell turnover constraint (bsturnover), there should instead be (positive) ‘buyturnover’ and ‘sellturnover’ entries in the uservars list. Finally note that when using this type of constraints in a fractional programming setup, care should be taken that the combination of bounds, turnover limits and the forecast return vector do not result in a negative expected return in which case the problem is not solvable. The variance constraint allows the targeting of a maximum acceptable variance. The extra arguments which must be passed to the uservars list are ‘Cov’ for the asset covariance matrix and ‘varbound’ representing the maximum acceptable upper variance.