Óscar Romero Quincoces

Projects / Master's coursework

Causal graphs

Correlation against causation, by sector

2026MIAX master's, Instituto BME
Causal graphs between sectors in four market periods, with the PC algorithm
Figure 1. Causal graphs between sectors in four market periods, with the PC algorithm

Summary

Learns causal graphs between six US sector ETFs from 2000 to 2024 with PC, Hill Climbing, LiNGAM and Granger tests. The graph changes between calm and crisis periods, and a worked example shows how controlling for the wrong variable distorts the result.

What it does

Correlation is symmetric; causation has a direction. Using six US sector ETFs from 2000 to 2024, it learns directed acyclic graphs with the PC algorithm, Hill Climbing and LiNGAM, adds Granger tests for timing, and checks robustness with bootstrap and different significance levels. The graph changes between calm and crisis periods and between bull and bear markets.

The factor mirage

A worked example shows how controlling for a collider, a variable caused by two others, creates a correlation that isn't there.

Figures

Sector correlations, 2000–2024: symmetric, with no direction
Figure 2. Sector correlations, 2000–2024: symmetric, with no direction
Granger p-values and a lagged PC graph
Figure 3. Granger p-values and a lagged PC graph
The factor mirage: what controlling for a collider does to an estimate
Figure 4. The factor mirage: what controlling for a collider does to an estimate

Built with

PythonpgmpylingamstatsmodelsnetworkxPlotly