Getting the Math to Actually Work

You build the equilibrium conditions first, you iterate to clear the markets, and then you see whether the Keynesian multipliers actually transmit through the system. I have spent years watching people skip straight to the solution algorithm without checking whether their price rigidity assumptions are even consistent with general equilibrium existence. The math is simple enough. Getting it to converge in practice is where most projects fall apart. Here is how I approach it. You start with the goods market clearing condition. Then you layer in the labor market. After that you add the money market. The Keynesian twist is that prices and wages do not adjust instantaneously, so you need a temporary equilibrium framework where quantities adjust instead. This changes the whole problem from a standard Walrasian system into something that requires either excess demand functions or quantity constraints as the primary variables. My standard workflow for the General Equilibrium Model In Keynesian Economic Model uses a fixed-point iteration on the constrained demand side. You specify a nominal wage floor or price ceiling, solve for the short-side of each market, feed those quantity constraints back into household and firm optimization, and iterate until the constraint values stabilize. This usually takes between three and eight iterations for a clean two-sector model with Calvo-style price stickiness. When it does not converge, the issue is almost always that the wage rigidity is too tight relative to the shock size, which creates a discontinuity in the excess demand function. I resolve this by adding a small smoothing parameter to the constraint adjustment rule, which converts the discontinuity into a steep but continuous slope. It does not change the qualitative results at all. The computational cost is negligible.

General Equilibrium Model In Keynesian Economic Model

The core idea is straightforward. In a standard Neoclassical general equilibrium, prices clear all markets simultaneously. In the Keynesian version, you allow for persistent disequilibrium in at least one market, typically labor, because wages are slow to adjust downward. Agents then make consumption and investment decisions based on the quantities they can actually trade, not the quantities that would prevail under full market clearing. This generates the multiplier mechanism at the aggregate level rather than just within a single representative agent's budget constraint. I ran into a specific edge case last year working with a three-sector open economy model. I had set up a fixed exchange rate regime with incomplete capital mobility and a binding minimum wage in the manufacturing sector. The standard iteration scheme kept cycling between two equilibrium points instead of converging to a single fixed point. What I eventually discovered was that the intertemporal budget constraint on the foreign sector was creating a second equilibrium branch that my solver was bouncing between. The fix was to impose the external balance condition as a hard constraint on the capital account rather than letting it float through the interest parity condition. Once I reformulated it that way, convergence was immediate, typically reaching tolerance within four iterations. This is not something you find in the textbook treatments. The textbook assumes a single stable branch exists. There is a counter-intuitive point about these models that people miss. Adding more price rigidity does not always make the Keynesian results stronger. In some configurations, enough rigidity actually collapses the equilibrium because the system cannot find a fixed point where all agents are optimizing given the constraints. I saw this clearly when I pushed the wage adjustment speed below a certain threshold in a dynamic stochastic version of the model. The simulation simply broke down. The economy was over-constrained. The workaround is to introduce a gradualist adjustment rule rather than a hard constraint, even if you want the qualitative implications of rigid prices.

Another common pitfall involves the treatment of expectations. If you assume adaptive expectations for price levels, the equilibrium dynamics behave very differently than under rational expectations, and most people mixing the two frameworks accidentally create an inconsistent model. I check this by verifying that the expectation formation rule is internally consistent with the law of iterated expectations. It takes about five minutes to verify, and it saves you from building a model that looks correct on the surface but has a logical gap in the intertemporal structure. The main limitation of this approach is that it becomes computationally expensive fast. A two-sector closed economy with one rigid price runs in seconds on a laptop. Add two more sectors, introduce multiple periods of stickiness, and include a stochastic shock process, and you are looking at hours of compute time per parameter calibration. That is why I usually build the simple version first and only add complexity once the baseline logic is verified. People who start complex tend to waste weeks debugging convergence issues that exist only because the foundation was wrong. For implementation, I use a Newton-type solver with a line search. The Jacobian is sparse in most Keynesian general equilibrium setups because the cross-market linkages are limited. Exploiting that sparsity cuts computation time significantly compared to a dense matrix approach. I estimate it reduces runtime by roughly seventy percent for models with five or more markets. If your setup is small enough, a simple Gauss-Seidel iteration works fine and is easier to code quickly.

Get the Full Details

Meeting 8 - Keynesian model of unemployment (Macroeconomics) | PPTX
Meeting 8 - Keynesian model of unemployment (Macroeconomics) | PPTX

The output you should always check first is whether the constrained equilibria actually satisfy the second-order conditions for household and firm optimization. A lot of implementations skip this verification and trust the solver output blindly. I check it every time. It adds maybe ten minutes to the workflow and has prevented me from reporting spurious equilibria several times.