Reproduction Package for "Forced Flows and the Robustness of the Speed Asymmetry of Markets"
Description
Code and public data reproducing the results of "Forced Flows and the Robustness of the Speed Asymmetry of Markets" (Physica A). The paper argues that the gain–loss (speed) asymmetry of markets — declines reach a given threshold in fewer days than matching advances — is robust: it survives even a short squeeze, the one regime that hands the forcing function to the buy side, because forced buying is transient and self-terminates into a faster forced-selling collapse. The mechanism is formalized as an asymmetric signed Hawkes process.
The package has two tiers. A deterministic core of seeded simulations (asymmetric-Hawkes inversion, threshold/drift robustness, the leverage gauge, and a depleting-forcing model) reproduces the paper's headline model and simulation numbers and figures exactly, with no network access, via a single command (python3 run_all.py); validate_claims.py then checks each headline number against a machine-readable claims manifest. An empirical tier computes the cross-sectional and event-time results on real equities, using bundled public data — FINRA Consolidated Equity Short Interest (264 tickers) and FRED margin-debt series BOGZ1FL663067003Q — together with Yahoo Finance prices fetched at run time.
Code is released under the MIT License. Bundled FINRA and FRED data are public-source and remain subject to their providers' terms; Yahoo Finance prices are not redistributed. Requires Python 3.10+ (NumPy, pandas, matplotlib, SciPy, yfinance≥1.2).
Files
Additional details
Software
- Programming language
- Python