Abstract
This paper develops a stochastic Keynesian model linking inflation, unemployment, and GDP. Inflation follows a fractional Brownian motion, capturing persistent shocks, while a temporal convolutional network forecasts conditional paths, allowing machine learning to account for nonlinear interactions and long-memory effects. Unemployment responds conditionally to inflation thresholds, permitting involuntary joblessness, while GDP depends on both variables, reflecting aggregate demand and labor market frictions. The model is applied to Pakistan, simulating macroeconomic dynamics under alternative policy scenarios. We demonstrate that sustained growth is possible even under persistent inflation, reinforcing the empirical relevance of Keynesian theory in contemporary macroeconomic analysis and highlighting the value of machine learning for policy evaluation.
Supplementary materials
Title
Model Python Code
Description
Model Python Code
Actions