This is a quick overview of the functions used for carrying out CLA on the standard sum-to-one constrained portfolio problem that commonly occurs in finance.
These functions aren't actually part of the algorithm themselves, but they carry out calculations or operations the results of which the algorithm uses.
-
max_bounded
: maximum value in$\boldsymbol{x}$ satisfying$x_i < x_{\text{bound}}$ -
inverse_grow
: adjust the inverse if gaining a row and column -
inverse_shrink
: adjust the inverse if removing row and column$i$
These two functions carry out a KKT check on a solution to a problem with the corresponding input variables. They make use of a vector
kkt_full
: perform a full KKT check on a constrained CLA problemkkt_partitioned
: equivalent KKT checks for constrained CLA
These four functions make up the key part of the algorithm; finding the starting solution, handling the case when an asset moves to its bound, handling the case when an asset become free, and then calculating the turning points themselves through CLA.
starting_solution
: return starting solution for CLAbecomes_free
: handle the CLA case where an asset becomes freemove_to_bound
: handle CLA case where an asset moves to its boundcalculate_turningpoints
: return portfolios for CLA turning points