For our final project, we had to stochastically model the US National Deficit.
For that, we created a model based on the past 30 years of data and modelled the next decade (2021 - 2031).
We also came up with probabilities for war, tax cuts, another pandemic, and other catastrophes.
Based on that, we also factored environemental stochasticity.
The simulation is the cool part of the code. Essentially it will sample a random normal variable growth rate for each category of expenditures and income for the US. Based on that, it will used the previous year value to calculate the value for the next year. It will also have a clause if catastrophe occurs.
This was one of the cool projects I got to work on at UCLA!