It only works with theoretical moments and only at first order as variance decomposition for nonlinear systems are state-dependent. Hence, set order=1 and periods=0.

when i do as u say, the dynare did give a variance decomposition report. but the trouble is that there is only one report. you know, in many papers, the variance decomposition report usually includes several different horizons, such as 1 quarter, 4 quarters, 8 quarters, 16 quarters, 32 quarters, etc. how can i do this in my dynare code? thanks.