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



![Author ORCID: We display the ORCID iD icon alongside authors names on our website to acknowledge that the ORCiD has been authenticated when entered by the user. To view the users ORCiD record click the icon. [opens in a new tab]](https://www.cambridge.org/engage/assets/public/coe/logo/orcid.png)