Sharpe's Returns Based Style Analysis

Use this forum for posting example programs or short bits of sample code.
vmadhavan
Posts: 7
Joined: Thu Jun 30, 2011 9:58 am

Sharpe's Returns Based Style Analysis

Unread post by vmadhavan »

I tried running Sharpe's Returns Based Style Analysis framework using nonlin function in RATS. I used this because I need to impose two restrictions on a multiple regression. I am regressing monthly returns of a mutual fund (dependent variable) with four passive portfolio indices (independent variables) .
All factor loadings need to be between 0 and 1 and sum of all weights/factor loadings should be equal to 1. These are the restrictions for Sharpe's Quadratic Programing technique.

nonlin b1_stbi b2_mbi b3_ldi b4_ddi b1_stbi+b2_mbi+b3_ldi+b4_ddi==1.0 b1_stbi>=0 b2_mbi>=0 b3_ldi>=0 b4_ddi>=0
frml eq3 = b1_stbi*stbi+b2_mbi*mbi+b3_ldi*ldi+b4_ddi*ddi
com b1_stbi=b2_mbi=b3_ldi=b4_ddi=0.0
nlls(frml = eq3) ab

I do not get convergence at all. How can I overcome this problem? I increased the number of iterations by using iters=10000. But it did not help.

Nonlinear Least Squares - Estimation by BFGS Restricted
NO CONVERGENCE IN 100 ITERATIONS
LAST CRITERION WAS 1.#QNAN00
Dependent Variable AB
Monthly Data From 2010:04 To 2020:03
Usable Observations 120
Degrees of Freedom 116
Centered R^2 1.#QNAN00
R-Bar^2 1.#QNAN00
Uncentered R^2 1.#QNAN00
Mean of Dependent Variable 0.0064705150
Std Error of Dependent Variable 0.0126335556
Standard Error of Estimate 1.#QNAN00000
Sum of Squared Residuals 1.#QNAN0
Log Likelihood 1.#QNBe+000
Durbin-Watson Statistic 1.#QNBe+000

Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. B1_STBI 1.#QNAN0 0.000000 0.00000 0.00000000
2. B2_MBI 1.#QNAN0 0.000000 0.00000 0.00000000
3. B3_LDI 1.#QNAN0 0.000000 0.00000 0.00000000
4. B4_DDI 1.#QNAN0 0.000000 0.00000 0.00000000
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Sharpe's Returns Based Style Analysis

Unread post by TomDoan »

You should probably be using quadratic programming. Have you looked at the portfolio.rpf example?

In your setup, you are starting from an infeasible solution. Try starting with everything equal to .25.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Sharpe's Returns Based Style Analysis

Unread post by TomDoan »

I tried your calculation (as is) with random data and it seems to work fine. You should check your data (the four independent variables in particular---the dependent variable looks to be fine).
Post Reply