Sa and Viani

Hello everybody,

I try to replicate the results of the paper “Shifts in Portfolio Preferences of International Investors : An application to Sovereign Wealth Funds” of Filipa Sa and Francesca Viani of 2012.

Nevertheless, I always have the error “Impossible to find the steady state. Either the model doesn’t have a steady state, there are an infinity of steady states, or the guess values are too far from the solution”

However, I have check that the equations are consistent with the steady state.
RP the return on the portfolio appears in two equations (in the Euler equation and in a equation that defines it) but the difference is small.
Also, if I take the calibration of the paper for F/Y=0.17, I find a very different steady state value for F (net debt) with the equation that defines it. I did not use this calibration in my code.

If you can help me, I would be very grateful since I am stuck on that code, and I have to submit my master thesis at the beginning of June :frowning:.

Many thanks,

Hi Clara,

I think the “residuals” show that you have some error in your equations, are you sure you solved the model correclty? Check the equations where the residuals are not zero.


The residuals are not zero in the equations 31 and 32, because of the calibration of the authors. RP (the return on the portfolio) both appears in the Euler equations and another equation that defines it. Indeed, if you calibrate rB (the return on bonds) and the portfolio shares of each country, you cannot calibrate also rE (the return on equities equal to RP at the steady state).

Even if i change the calibration of the authors to have a zero residual for the equations 31 and 32. I still have a non zero residual for equation 35 which is the market clearing condition for the goods produced in the Rest Of the World, and I don’t understand why.

The article is here : … t1112e.pdf

Thanks for your reply ^^!

Replicating papers is hard. This does not look like a Dynare issue. Check your equations over and over again. If the problem persists, you might want to contact the original authors of the study to help you. Sometimes there are typos in the papers that make it impossible to replicate them.

Thanks for your answer!

I actually check again and again and change one hypothesis from the paper,
and now it works.

But I want to have a permanent shock , a 5% point increase of salphaf (which is the exogenous shocks in the equation determining the portfolio share alphaf).

I try to implement it by using the command varexo_det, but I get “All endogenous are constant or non stationary, not displaying correlations and auto-correlations” when I do stoch simul.

If I try to do it by using endval and simul (considering a deterministic model), I don’t have any graphs.

I attach you the mod file.