Auxiliary variables location

Supposing I have y(+2), pi(+2) in my model, I understand dynare define two auxiliary variables: AUX_ENDO_LEAD_aa and AUX_ENDO_LEAD_bb. My questions is how I know that AUX_ENDO_LEAD_aa is y(+1) and AUX_ENDO_LEAD_bb is pi(+1). How Dynare links the AUX_ENDO_LEAD to the endo variables we declared in "var ". Thanks in advance for your help.

The corresponding information should be stored in

See also dynare.org/DynareWiki/AuxiliaryVariables

Hi jpfeifer, thank you for your reply. I’ve checked M_.aux_vars(i).orig_index . It strange that it has information when Aux var is for exogenous with a lag. However, M_.aux_vars(i).orig_index does not has information when Aux var is for exogenous with a lead.

Have you tried the unstable version? There might have been a bug.

Yes, I tried the latest unstable version. M_.aux_vars(i).orig_index still shows ].

That is a bug still on our to-do list: github.com/DynareTeam/dynare/issues/773