6
$\begingroup$

I am performing a returns analysis. The idea is to regress a time-series of returns on the returns of various asset classes. The beta coefficients must be constrained such that sum of the coefficients is 1 and no coefficient is less than 0 or greater than 1. These beta coefficients can then be interpreted as explaining what % of returns are explained by exposure to the various asset classes.

Are there any packages in R that let me setup the above regression and benefit from the attendant reporting on model fit statistics? Or do I need to do some homework on setting up constrained least squares optimization in R (please provide any references to recommended R packages)?

$\endgroup$
0

2 Answers 2

2
$\begingroup$

I've used the MGCV package to fit a constrained regression where the coefficients could not be negative:

Constrained Regression

Also the 'quadprog' package with the solve.QP function may be useful.

Both, however, have a little bit of a learning curve, at least for me.

$\endgroup$
0
$\begingroup$

You can use ConsReg package.

cran.r-project.org/web/packages/ConsReg/index.html

It's very easy to use

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.