# Discuss detrending of lagged trend_var

Consider

```
var gd, gu;
trend_var(growth_factor=gu) Bu;
trend_var(growth_factor=gd) Bd;
varexo vd,vu;
parameters gamu,gamd,thetadu;
gamu=.01;
gamd=.003;
thetadu=0.3;
model;
log(gu)=log(1+gamu)+vu;
log(gd)=log(1+gamd)+thetadu*log(Bu(-1)/Bd(-1))+thetadu*log((1+gamu)/(1+gamd))+vd;
end;
initval;
gu=1.01;
gd=1.003;
vd = 0; vu=0;
end;
steady;
check;
shocks;
var vd; stderr 0.02;
var vu; stderr 0.02;
end;
write_latex_dynamic_model;
collect_latex_files;
stoch_simul(irf=150,order=1) gu gd;
```

from https://forum.dynare.org/t/impulse-responses-with-cointegrated-stochastic-trends/22756
Internally, we replace the lagged `trend_var Bu`

, i.e. `Bu(-1)`

, by its definition `Bu/gu`

. The problem is that we then use the normalization `Bu=1`

, i.e. we fix today's value of the trend and have `gu`

implicitly determine the predetermined value yesterday. As a consequence, the variable `gd`

on the left suddenly reacts contemporaneously to `gu`

, although in the original equation everything on the right was predetermined. My understanding is that for a stochastic `growth_factor`

this detrending approach is problematic as we are violating predeterminedness. What is the solution to this issue? Normalizing an endogenous object at time `t`

to 1 seems to be poor practice. At a minimum, we need to document the current behavior.