How cjseven007/foi_analysis works
This repository is a reproducible de-dollarisation research pipeline. Its main workflow downloads market and macroeconomic series, cleans and validates them alongside manually entered observations, then produces RQ1 figures and RQ3 portfolio-analysis figures and tables. Separate extractors transform World Gold Council and IMF COFER downloads into analysis inputs. The README also identifies RQ2, but no distinct RQ2 analysis module appears in the supplied tree. Connections below reflect sampled code or README documentation; unsampled analysis details are not inferred.
Main entry points: config.py Shared settings · manual Manual observations · clean Analysis datasets · 01_download.py Series downloader
Components 18
Data acquisition
- Series downloader
scripts/01_download.py - Raw datasets
data/raw - Manual observations
data/manual
Preparation
- Gold extractor
scripts/03_extract_wgc_gold.py - COFER extractor
scripts/04_extract_cofer.py - Data cleaner
scripts/02_clean.py - Analysis datasets
data/clean - Shared settings
scripts/config.py
Research analysis
- RQ1 figures
scripts/05_plot_rq1.py - RQ3 analysis
scripts/rq3/run_rq3_analysis.py
Research outputs
- Research figures
figures - Research tables
tables
Other components
- Researcher
- FRED
- Yahoo Finance
- WGC export
- IMF COFER export
- Manual source documents
Connections 26
- Researcher → Series downloader: runs
scripts/01_download.py - FRED → Series downloader: provides series
scripts/01_download.py - Yahoo Finance → Series downloader: provides prices
scripts/01_download.py - Series downloader → Raw datasets: writes downloads
scripts/01_download.py - WGC export → Gold extractor: input workbook
scripts/03_extract_wgc_gold.py - Gold extractor → Manual observations: writes gold data
scripts/03_extract_wgc_gold.py - Gold extractor → Analysis datasets: writes year-end gold
scripts/03_extract_wgc_gold.py - IMF COFER export → COFER extractor: input CSV
scripts/04_extract_cofer.py - COFER extractor → Manual observations: writes USD share
scripts/04_extract_cofer.py - COFER extractor → Analysis datasets: writes composition
scripts/04_extract_cofer.py - Manual source documents → Manual observations: entered observations
README.md - Raw datasets → Data cleaner: reads raw series
scripts/02_clean.py - Manual observations → Data cleaner: checks observations
scripts/02_clean.py - Data cleaner → Analysis datasets: writes validated data
scripts/02_clean.py - Shared settings → Series downloader: configures paths
scripts/01_download.py - Shared settings → Data cleaner: configures paths
scripts/02_clean.py - Shared settings → Gold extractor: configures paths
scripts/03_extract_wgc_gold.py - Shared settings → COFER extractor: configures paths
scripts/04_extract_cofer.py - Shared settings → RQ1 figures: configures paths
scripts/05_plot_rq1.py - Shared settings → RQ3 analysis: configures paths
scripts/rq3/run_rq3_analysis.py - Analysis datasets → RQ1 figures: reads inputs
scripts/05_plot_rq1.py - Manual observations → RQ1 figures: reads observations
scripts/05_plot_rq1.py - RQ1 figures → Research figures: writes figures
scripts/05_plot_rq1.py - Analysis datasets → RQ3 analysis: reads inputs
scripts/rq3/run_rq3_analysis.py - RQ3 analysis → Research figures: writes figures
scripts/rq3/run_rq3_analysis.py - RQ3 analysis → Research tables: writes tables
scripts/rq3/run_rq3_analysis.py