Dear Jack,

Thank you for your answer and your useful comments, I see the point your are 
making. As I am not very well trained in econometrics, I have to apologize for 
not being more formal or precise in the way I stated my problem. I understand 
that this is quite bothering. Maybe it is not as simple as I thought or at 
least not as simple to implement in Gretl.

You might have already guessed what I am doing, I am trying to run a style 
analysis on investment funds in the spirit of William Sharpe (1988, 1992). 
Therefore it would be ideal to have at every step of the iteration a restricted 
regression where the insignificant coefficients would be dropped afterwards. 
Then the model should be re-estimated until there are only significant 
regressors, whose coefficients sum to one.

I have noticed by now, that the omit command works on the unrestricted model 
only. I thought that using restrict command first, and then the omit command 
would apply the omit algorithm to the restricted model, because the restriction 
is some kind of an estimation command.  I guess that this would make the 
iterative process easier. However, restricting the model first and then 
omitting variables works, but as you state the coefficients don't sum to one 
anymore, which means that the model should be re-estimated so that the 
restriction holds again.  

The next best solution, which corresponds to your third alternative (estimate 
U, drop, restrict), would be to estimate the unrestricted model first, then 
omit the insignificant coefficients, then re-estimate the reduced model with 
the portfolio constraint. It might be that once significant coefficient become 
insignificant after restricting the portfolio weights, but I would guess that 
it is unlikely, because the sensitivity of a fund's return to a factor would 
remain, even if I restrict the regression, wouldn't it?

Nonetheless, if there should be any insignificant coefficients after 
restricting the reduced model, then the process shall start again. 

One problem that remains is, that you don't know exante which coefficients will 
become insignificant during the iteration. Therefore the restriction has to be 
"dynamic", which I tried to implement via an if..elif..else..endif block within 
the restriction block. Unfortunately, this did not work (parsing error).

Furthermore, I want as an output the time series of significant coefficients 
only. Therefore I need a matrix (T by n), where the n-coefficients are always 
written into the same column, depending on the name of the regressor and not on 
the coefficient number, as the coefficient b[2] can vary throughout time due to 
restricting the model.

I know that if I would do Sharpe's style "econometrically correct", I would 
select the indexes that span the manager's investment universe up front and do 
a check for (near) multicollinearity, so that the results would be sensible. In 
that case I could end here and start the constrained rolling regression, which 
would yield a time series of average "portfolio-weights".

Again, I really appreciate your comments and I am aware that I am mining the 
data so that the results might be spurious.

Kind regards,

Jan

-----Ursprüngliche Nachricht-----
Von: Plus.line MailSystem [mailto:cyrus(a)mailer.plusline.de] Im Auftrag von 
Riccardo (Jack) Lucchetti
Gesendet: Freitag, 31. August 2012 15:40
An: Gretl list
Betreff: Re: [Gretl-users] data mining with rolling regression and restricted 
coefficients

On Wed, 29 Aug 2012, Jan Tille wrote:

> Dear gretl users,
>
> first of all let me thank you, that you have already provided me with 
> solutions on other topics. Unfortunately, I need your help again.

No problem, that's what the mailing list is for.

> The problem I am now trying to solve is the following.

[... rolling regression with constraints ...]

IMHO, your problem can be solved, once it's stated less ambiguously. Allow me 
to explain (and to apologise in advance for being pedantic).

Suppose you have 3 regressors instead of 10. Then you have

y_t = b0 + x_{1t} b1 + x_{2t} b2 + x_{3t} b3 + u_t

Let's call this model U (for unrestricted). Once you impose the restriction 
b1+b2+b3=1, you can write the same model as

y_t - x_3 = b0 + (x_{1t} - x_{3t}) b1 + (x_{2t} - x_{3t}) b2 + u_t

Call this model R (restricted). Running OLS on model R, you get exactly the 
constrained estimates you're after. Then, you can recover you estimate of b3 as 
1 - b1 - b2 and compute its standard error as sqrt(V(b1+b2)), which is easy to 
do.

Do you want to NOW drop those coefficients whose t-statistic is less than a 
predefined threshold? But in this case, the remaining ones won't sum to
1 anymore.

Or perhaps, you want run model R, trim it to your liking and then compute
b3 as 1 - (sum of surviving betas). But then, what guarantee do you have that 
that b3 will itself be significant? Because if it isn't, you have the option of 
dropping it (and have the sum being different from 1) or keeping it (but why 
should you treat b3 specially?).

Or maybe you want to run model U first, drop the "excess" variables and then 
force the coefficients to sum to 1? Because in this case, you have no guarantee 
that the surviving coefficients will be "significant" (whatever that means).

I don't mean to be patronizing, but I think that before you think of the hansl 
syntax to do what you want, you should think a little harder about what you 
actually want! :)

--------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Economia

  Università Politecnica delle Marche
  (formerly known as Università di Ancona)

  r.lucchetti(a)univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
--------------------------------------------------

Reply via email to