Description Usage Arguments Value Examples
View source: R/optbypairwiseiter.r
This will attempt to maximize a supplied objective function within box constraints. The algorithm begins by finding all the asset classes with weights that can be increased and those that can be decreased. Using pairs of classes within the same account, it increases one and decreases the other finding the best pair to change. If a pair improves the objective value, the process is repeated. If no pair is found the maxdelta is halved and the process is repeated until the delta is <= 0.00001.
1 | maximize_pairwise(x, LB, UB, objFun, maxdelta, ...)
|
x |
Initial set of weights. Must sum to 1 (or whatever sum is desired). Weights across accounts must be correct. |
LB |
Box minimum |
UB |
Box maximum |
objFun |
Objective function |
maxdelta |
Initial setting of delta. |
... |
Parameters to be passed to the objective function |
List with MaxObj the value of the objective; x the corresponding portfolio weights, and Iter the number of iterations
1 | maximize_pairwise(x, LB, UB, objFun, maxdelta, ...)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.