Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: Return-based style analysis / Shape's Quadratic Programming technique

 From "Christopher Garlich" To Subject st: Return-based style analysis / Shape's Quadratic Programming technique Date Sat, 10 Sep 2011 14:12:04 +0200

```Hi everybody,

studying mutual funds, I would like to rebuild Sharpe's (1988/92) Quadratic
Programming technique (which is a return-based style analysis) within STATA.

Basically, it's a simple regression of portfolio returns on the returns of a
set of asset classes (e.g. stocks, bonds, etc.).
So if you had just 2 asset classes, it would look something like this:
R(portfolio) =  b1*R(stocks) + b2*R(bonds)

But in order to determine portfolio weights that actually make sense to an
(long-only) investor, one has to impose 2 restrictions:
b1 + b2 + ... + bn = 1
and 0 <= b <= 1, for all b

In forums I have seen suggestions that using nonlinear least-squares [nl]
will do the trick if you respecify the coefficients to be estimated in the
following way:
b1 = 1/(1+exp(b'2))
a2 = exp(b'2)/(1+exp(b'2))
...and then recover the betas that you are looking for by using:
nlcom (1/(1+exp(_b[/b2]) ///
exp(_b[/b2])/(1+exp(_b[/b2])

But isn't there a more intuitive way? Additionally, I would definitely need
the R2 from this regression but I wouldn't know how to recover this from the
transformation above.
Has anyone encountered this (or a similar) problem before?

Thanks and regards,
Chris

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```