Robust LQC - Special Case


Regarding Robust LQC, is it possible to specify matrices Q and B in a way that resembles the pure forecasting problem formulation from “Robustness” (pg. 171) where Q and B are nxn matrices of zeros and the optimization problem reduces to minimizing worst-case shock Wt?

Given the current formulation, when assigning Q and B as nxn matrices of zeros an error is produced when calculating the Ricatti equation (by definition, matrix P depends on B when control U is defined).

Hope this was clear, thank you!

Hi @ashkrelja,

I’m not totally clear on what you want to do. If Q and B are zero, then the matrix F in equation (7) of the lecture is not well defined, since we’re trying to invert a matrix of zeros. Presumably that’s the source of the error.

I guess if B is zero then you have no control, so any policy is as good as any other.

Can you give me a more exact link to what you want to do — a link to the web version of the lecture? Or are you referring to Tom’s book on robustness?

Regards, John.

Hi John,

Thank you for replying.

Yes, agreed that the source of error is matrix F being ill defined in the case of Q=B=0 which is leading to errors when using methods in quantecon.

The case I’m referring to is “The Pure Forecasting Problem” as it’s labeled in Tom’s book on robustness (pg. 171) and is not contained in the linked lecture.

My question is: Is it possible to solve for Riccatti equation (matrix P) and worst-case scenario (matrix K) using quantecon’s methods given the form of minimizing agents problem on pg.171 of Robustness (where Q and B are essentially 0, so no max player)?

If unclear then I’ll reply with the problem formulation, thanks again for your help!



Hi Anthony,

That functionality isn’t currently built in to RLBQ but Tom’s PhD student Balint Szoke read your request and has submitted a pull request that adds it. See here. You can wait for the pull request to be accepted or you can grab the code here.

Regards, John.

Hi John,

Excellent, thank you!!!




Silly question - now that the pull request is complete, I’m assuming it’s safe to define Q=B=0 in

stuff1 = quantecon.robustlq.RBLQ(Q,R,A,B,C,beta,theta)

as the new code detects a pure forecast problem. But if Q and B are defined in this manner, I’m getting a singular matrix error when using the following code (when other matrices/scalars are well defined)


Help! Apologies if this is the wrong section to bring up this error.



Hi @ashkrelja would you mind posting what you have used for Q, R, A, B, C, beta and theta.

Hi @mamckay

The matrices and their elements are defined as:




#RBLQ Matrices








Hi @ashkrelja

I think you are using a too low theta parameter.

In robust control theory, there is a so called breakdown point \underline{theta} (that depends on model parameters), so that if theta < \underline{\theta}, the minimizing agent’s objective function ceases to be convex and the minimum becomes -\infty. See the Robustness book by Hansen and Sargent for a more detailed discussion (e.g. p32). Given the error message (doubling algorithm fails to converge), this seems to be the most likely reason.

The easiest way to avoid this issue is to start with a relatively large value for theta (e.g. in your example, theta=2000 seems to do the job) and potentially start decreasing it if one wants to make the decision maker more concerned about misspecification.

Section 7.9 in Robustness (p161) describes a more sophisticated way to assure that theta > \underline{theta}.

I hope this helps.

1 Like

Hi @szokeb87

Thank you for your comments ( a long while ago!)

For whatever reason, after importing the quantecon library the additional code of detecting a pure forecasting problem to robust_rule() (among other functions in the file) are not being reflected in on my end.

Unsure if it’s a Python IDE issue, any help with this is appreciated!



hi @ashkrelja are you looking at the code in a repository or the file located in your site-packages where python installs packages? Can you let me know where you’re looking at the file?