Macroeconomic Policy Simulator
Short‑Run AD‑AS Framework Simulator (Shiny, R)
Shiny
    R
    Economics
    Visualization
  Eduardo built a full‑stack Shiny application that stress‑tests the short‑run Aggregate‑Demand/Aggregate‑Supply framework. The tool simulates inflation, output gaps, Taylor‑rule dynamics, and nominal interest‑rate paths across 5 – 100 periods, comparing up to four simultaneous policy or shock scenarios against a counterfactual baseline.
Key engineering achievements
| Focus | Highlights | 
|---|---|
| Modular architecture | Business math lives in simulate_solow()andmathformulas.R; UI logic stays clean and reactive. | 
| Experiment engine | Helper factories generate four independent DT tables with add/delete buttons, Excel uploads, and reactive storage—users can queue complex exogenous‑shock schedules in seconds. | 
| Endogenous overrides | A parallel helper lets users overwrite core variables (inflation, output, Taylor‑rule paths) for single‑period “what‑if” adjustments. | 
| Math‑explanation module | A namespaced module renders MathJax equations with live numeric substitution for any selected period—perfect for teaching or model auditing. | 
| Reactive plot cache | All ggplot objects are stored in a reactiveValueslist, rendered on demand, and zipped to PNGs for download. | 
Visual analytics & UX
- Ten high‑resolution ggplot panels: inflation & output under three policy rules, nominal rate, demand‑shock parameters, etc.
 
- Toggle switches layer counterfactual, 2nd‑, 3rd‑, and 4th‑scenario lines without cluttering the view.
 
- Custom bslib theme, centered titles, and point‑thinning keep plots readable even for long horizons.
 
- CSV export of any simulation plus one‑click ZIP of all plots.
Economic rigor
- Implements full short‑run dynamics: inflation Phillips curve, output gap equations, Taylor‑rule feedback, and nominal rate composition.
 
- AS/AD schematic (placeholder) ready for diagrammatic extensions.
 
- Multivariable‑calculus‑based formulas embedded with step‑by‑step numeric substitution.
Software craftsmanship
- Version‑tagged comments (v0.1–v4.3) document iterative development.
 
- Defensive validation (modals for missing experiments), informative tooltips, and namespaced UI modules prevent conflicts.
 
- Production‑ready for shinyapps.io or RStudio Connect deployment.
Technologies showcased
| Domain | Evidence | 
|---|---|
| Advanced R | reactive programming, functional helpers, tidy data | 
| Shiny | dynamic tabsets, DT tables, file I/O, downloads | 
| Data viz | ggplot2 with thematic consistency and legend control | 
| Macroeconomics | short‑run AD‑AS mechanics, Taylor‑rule feedback | 
| Software design | modular sources, version control markers | 
Employer takeaway
Eduardo translates complex short‑run macro theory into an elegant, interactive web tool—demonstrating deep economics expertise, polished R/Shiny craftsmanship, and clean, maintainable code.