Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 3.56 KB

File metadata and controls

31 lines (23 loc) · 3.56 KB

thesis-temporal-graph-finance

Temporal Graph Centrality Measures

This repository contains the MATLAB source code, datasets, and the theoretical report of my Bachelor's Thesis in Mathematics at the University of Pisa (A.Y. 2024-2025), titled "Misure di centralità per grafi temporali" (Temporal graph centrality measures).

The project develops, implements, and optimizes high-performance computational algorithms to analyze node importance within high-dimensional dynamic financial networks.

📈 Financial Context & Datasets

The effectiveness and performance of the centrality metrics were tested and validated on complex temporal graphs constructed from approximately 1.2 million real-world observations extracted via Python from Yahoo Finance and Binance:

  • Equity Dataset: The top 100 highest-capitalization stocks of the S&P 100 index (15-minute granularity).
  • Crypto Dataset: 90 cryptocurrencies traded on Binance against the USDT stablecoin (30-minute granularity).

Daily dynamic networks were modeled by computing sample correlation matrices, which were then converted into Mantegna Distances and filtered by extracting their respective Minimum Spanning Trees (MST) using Prim's algorithm for dense graphs.

🧮 Mathematical Methods & Implemented Centralities

Leveraging the tensorial unfolding technique, the temporal graph is reinterpreted as a single large block adjacency matrix (up to $\sim 10^4$ total nodes), capturing dynamic walks while respecting the arrow of time. Three metrics were implemented:

  1. Eigenvector Centrality ($C_{ev}$): A temporal generalization based on computing the dominant right eigenvector.
  2. Resolvent Centrality ($C_{re}$): A parametric broadcast-type metric based on the concept of running dynamic communicability (exponential damping over the length and age of the walks).
  3. Von Neumann Centrality ($C_{vn}$): A novel approach proposed in this work based on the concept of Von Neumann quantum entropy, extended to strictly asymmetric matrices (directed graphs) through the redefinition of the Chung Normalized Laplacian. It measures the variation in the network's topological complexity upon the partial or total removal of a node.

💻 Algorithmic Optimization (MATLAB)

The computational core of the repository lies in the optimization of numerical methods compared to standard approaches in literature, drastically reducing their algorithmic complexity:

  • GMRES (Generalized Minimal Residual): Employed instead of lsqr to solve large-scale linear systems related to resolvent centrality, reducing the total cost to $\mathcal{O}(Mn)$ by exploiting sparse matrices.
  • Arnoldi / Lanczos Method: Implemented to bypass the non-convergence of the classical power method caused by the presence of multiple eigenvalues of maximum modulus within the spectrum of financial transition matrices.
  • XTRACE Algorithm: Adopted for the randomized, stochastic approximation of the matrix function trace ($x \log_2 x$), drastically lowering the computational cost of the Von Neumann entropic calculation from prohibitive barriers to an efficient $\mathcal{O}(M^2n^2)$.

📂 Repository Structure

  • /src: MATLAB scripts and functions for computing the centralities (centr1.m, centr2.m, centr3.m) and various plotting routines for the results.
  • /data: Python and MATLAB scripts for downloading and formatting intraday historical data, as well as the output results from the centrality applications.
  • /docs: Contains the full text of the theoretical thesis report and the Beamer presentation developed for the defense.