小白求问!最近刚开始接触资产配置方面的模型
我想用rp函数(Risk-parity optimization)官方的解释如下:
This function determines a risk-parity solution of a long-only portfolio with a budget-constraint.
Usage
rp(x0, P, mrc, optctrl = ctrl())
Arguments
x0
matrix of dimension n \times 1; starting values.
P
matrix of dimension n \times n; dispersion matrix.
mrc
matrix of dimension n \times 1; the marginal risk contributions.
optctrl
An object of S4-class Rcpp_CTRL.
******************************
* Solution of Convex Program *
******************************
Value of primal objective: -3.71793
Value of dual objective: -3.71793
Value of duality gap: 4.61608e-15
Certificate of primal infeasibility: 9.96136e-08
Certificate of dual infeasibility: 3.93034e-10
Value of smallest primal slack: 1.32097e-15
Value of smallest dual slack: 2.04778e-19
Status of solution: optimal
Count of iterations: 19
Solutions are contained in 'PDV'.
Use 'getx()', 'gety()', 'gets()' and 'getz()', respectively.
请问楼主。这个函数跑出来,没有直接显示权重,还要加什么命令吗?
******************************
* Solution of Convex Program *
******************************
Value of primal objective: -3.71793
Value of dual objective: -3.71793
Value of duality gap: 4.61608e-15
Certificate of primal infeasibility: 9.96136e-08
Certificate of dual infeasibility: 3.93034e-10
Value of smallest primal slack: 1.32097e-15
Value of smallest dual slack: 2.04778e-19
Status of solution: optimal
Count of iterations: 19
Solutions are contained in 'PDV'.
Use 'getx()', 'gety()', 'gets()' and 'getz()', respectively.