Inferring Hidden Economic Connections from Financial Shock Propagation
A reproducible Track A prototype that asks whether repeated delayed responses to company-specific shocks contain useful evidence for reconstructing a sparse, static, undirected company network.
The repository contains a complete synthetic benchmark, four baselines, robustness sweeps, a real-price workflow, an offline-capable Streamlit dashboard, tests and final-submission material. Real-data rankings are exploratory statistical evidence. They do not prove causality, supplier relationships, ownership, contracts or direction of influence.
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install -r requirements.txt
python -m pytest -q
python -m experiments.compare_methods
python -m experiments.run_robustness --seeds 10
python -m experiments.run_real_data
streamlit run app.pyThe app works offline when data/real/us_large_caps_2022_2025.csv is present. To refresh genuine data while online:
python -m experiments.acquire_real_dataIf acquisition fails, upload an adjusted-close CSV in the dashboard. The first column must contain dates; remaining columns must contain companies and a broad market index such as SPY. The software raises an error rather than substituting synthetic observations.
- Generate a seeded sparse undirected graph and stable linear propagation process.
- Inject signed company shocks with configurable separation and complete event windows.
- Standardize each company series, mapping zero-variance columns to zero.
- Compute event-conditioned SRCS from the largest lag-decayed, sign-consistent response, its mean and consistency across events.
- Symmetrize directed evidence without consulting the hidden adjacency matrix.
- Calibrate a threshold on separate development seeds.
- Evaluate on independent seeds, counting each undirected pair once.
- Compare random ranking, Pearson, maximum lagged correlation, pairwise Granger-style predictive gain and SRCS.
- Repeat experiments across noise, propagation and shock count, reporting mean and standard deviation.
- For real prices, compute log returns, remove a market-model component, detect cooldown-separated shocks and rank candidate pairs.
reports/results/comparison/: raw and summary method metrics, rankings, configuration and F1 plotreports/results/robustness/: raw trials, grouped mean/SD tables, configurations and three robustness figuresreports/results/real_data/: detected events, candidate rankings, event evidence, heatmap, case figures and provenance-aware metadatareports/figures/: true network, inferred network, propagation and SRCS heatmapreports/black_book.md: editable manuscript sourcereports/final_submission/: rendered DOCX, PDF and validated defense presentationreports/DEMO_SCRIPT.mdandreports/VIVA_QA.md: submission support
python -m pytest -q
streamlit run app.py --server.headless=true
docker build -t hidden-economic-connections .
docker run --rm -p 8501:8501 hidden-economic-connectionsGitHub Actions repeats unit tests, quick experiment integrations and a Streamlit startup smoke test. For Streamlit Community Cloud, select this repository and branch, set app.py as the entry point and deploy. No secrets are required for the packaged dataset. Deployment remains unverified until a maintainer connects the repository in Streamlit Community Cloud.
app.py Streamlit interface
src/ reusable scientific modules
experiments/ reproducible experiment entry points
configs/ recorded default parameters
data/synthetic/ packaged synthetic sample
data/real/ cached genuine adjusted prices and provenance
tests/ unit and integration tests
reports/ results and university submission material
The prototype establishes whether the method recovers edges in a controlled synthetic setting. The real-data phase provides ranked candidates and event-level traces for inspection. Common news, sector exposure, nonsynchronous trading, volatility clustering, model misspecification and multiple testing can all produce high scores. Independent economic evidence is required before describing any candidate as a real business connection.