Demand-Side Macro Shock Analysis Skill
This skill builds an Excel workbook that analyzes the GDP impact of a large investment spending shock on a small open economy using the demand-side macro accounting framework.
Workflow
-
Data Collection: Fetch IMF WEO data (real GDP growth, nominal GDP) and download Supply-Use Tables from the country statistics office (geostat.ge for Georgia). Also download GDP data files from geostat.
-
WEO_Data Sheet: Populate with real GDP growth rates, nominal GDP, real GDP, GDP deflator index, and deflator growth. Extend projections using the 2027 growth rate as fixed anchor and average recent-4-year deflator growth.
-
SUT Sheets: Copy SUPPLY and USE (38-38) sheets from the downloaded SUT file into the workbook.
-
SUT Calc Sheet: Link construction-industry data from the SUT sheets to calculate the estimated import content share for construction.
-
NA Sheet: Build three scenario tables:
- Scenario 1: Demand multiplier = 0.8 (small open economy default)
- Scenario 2: Demand multiplier = 1.0
- Scenario 3: Import content share = 0.5
Each scenario uses bell-shaped project allocation over 8 years, converts USD investment to GEL, and calculates GDP impact with formulas.
Entry Point
pythonimport sys sys.path.insert(0, '/app/environment/skills/evo-demand-shock/scripts') from utils import build_complete_workbook, validate_workbook # Build the complete workbook output_path = '/root/test_demand.xlsx' build_complete_workbook(output_path) # Validate validate_workbook(output_path)
Key Functions
fetch_imf_weo_data(country_code)- Fetch WEO indicators from IMF APIdownload_sut_file(url, output_path)- Download SUT Excel filedownload_geostat_gdp_files(output_dir)- Download GDP data from geostat.geextract_geostat_annual_gdp(file, label)- Extract annual GDP valuesfind_latest_sut_url()- Find latest SUT file URL on geostat.gecopy_sut_sheet(src_wb, src_name, tgt_wb, tgt_name)- Copy sheet between workbooksbuild_weo_data_sheet(wb, weo_data, geostat_data)- Build WEO_Data sheetbuild_sut_calc_sheet(wb, supply_name, use_name)- Build SUT Calc sheetbuild_na_sheet(wb, ...)- Build NA scenario tablebuild_complete_workbook(output_path, ...)- End-to-end orchestrationvalidate_workbook(path)- Check workbook structure and completenessbell_shape_allocation(n_years)- Generate bell-shaped allocation profile


