Parameter change in a stochastic model with "varexo_det"

Which Dynare version are you using? In 4.4.3 there was a bug. Please try the unstable version or use [Problem with varexo_det/ forecast + 2nd order approximati)
You might also be interested in github.com/DynareTeam/dynare/blob/master/tests/forecast/Hansen_exo_det_forecast.mod
Note that initval/endval are not appropriate for setting initial conditions in stochastic settings. See github.com/DynareTeam/dynare/pull/1182