Detecting Price Bubble Formation in NFT and DeFi Markets
OverviewThis deposit provides the full research code and executable analysis pipeline used to produce the results for Chapter 2 of the doctoral dissertation “Risk Management in Digital Finance: Assessment and Pricing in an Emerging Fintech Era” (Lennart John Baals). The chapter studies price bubble formation in NFT and DeFi markets using a reproducible R/Quarto workflow that combines PSY bubble tests (SADF/GSADF), LPPLS robustness layer, and an empirical liquidity analysis. The deposit is designed as a replication package: it contains the Quarto notebooks, modular R scripts, and the figure/table outputs used in the chapter. Due to third-party licensing restrictions, raw and processed price/liquidity data are not redistributed; users must obtain the underlying data from the original vendors under their own access rights (see “Data access” below). Contents of this deposit (high-level structure)The workflow is organized into four Quarto notebooks and a set of modular R scripts: Quarto notebooks (main entry points) 01_data_descriptives.qmd — data loading, cleaning, alignment, descriptive statistics 02_gsadf.qmd — PSY bubble tests (SADF/GSADF), date-stamping, Monte-Carlo critical values, bubble statistics, plots 03_lppls.qmd — LPPLS rolling-window robustness, confidence indicators, bubble intervals, plots 04_extension_BC.qmd — liquidity analysis (volume/turnover with bubble flags) R source scripts (modular implementation)src/data_io.R, src/preprocessing.R, src/gsadf.R, src/lppls.R, src/liquidity.R, src/metrics.R OutputsThe pipeline generates publication-ready figures (PNG) and intermediate objects/tables (e.g., GSADF objects, bubble interval CSVs, and summary statistics) typically written to outputs/figures/ and data/processed/ (when local data are available). The chapter’s main summary table includes the stacked bubble statistics output (e.g., bubble_stats_extended.csv). What the code reproduces (methods and outputs) Bubble detection (PSY framework): per-asset SADF/GSADF tests using the exuber package, including BSADF sequences, finite-sample critical values via Monte Carlo simulation, and bubble date-stamping. Bubble period statistics: duration and intensity summaries across assets (e.g., bubble duration shares and magnitude proxies as defined in the pipeline). Robustness (LPPLS): rolling LPPLS fits, confidence indicators for positive/negative exuberance, LPPLS-implied bubble intervals, and comparative visual overlays. Liquidity extension: construction and comparison of liquidity proxies (e.g., log-volume and turnover) during bubble vs non-bubble periods, including statistical tests and visualization. Software requirements R (≥ 4.0 recommended) Quarto (or RStudio with Quarto support) Key R packages include: tidyverse, tseries, moments, exuber, arrow, patchwork, janitor (plus common tidyverse dependencies such as rlang and purrr). Recommended run order (full replication)For a clean run on a new machine (after placing the locally obtained data into the expected folders): Render 01_data_descriptives.qmd once to build the cleaned, aligned price panel. Render 02_gsadf.qmd for each asset (set target_asset and re-render) to generate PSY test objects, bubble intervals, and GSADF/SADF plots. Render 03_lppls.qmd for each asset (set target_asset and re-render) to generate LPPLS confidence indicators, bubble intervals, and robustness plots. Render 04_extension_BC.qmd once to run the liquidity and predictive-performance extensions across the full asset set. All figures referenced in the chapter are produced into the output folder(s) configured in the notebooks, and intermediate objects/tables are saved under the processing directories referenced by the pipeline. Data access and redistribution noteThis deposit does not include raw or processed market data (prices, volumes, market capitalizations) because these are sourced from third-party vendors and may be subject to redistribution restrictions (e.g., data obtained via CoinGecko and WorldCoinIndex, depending on the asset). To reproduce the full pipeline, users should obtain the same underlying data directly from the original sources under their own access rights and place them into the expected data/raw/ structure. The notebooks and src/data_io.R / src/preprocessing.R document the expected variable naming, alignment, and preprocessing steps required to build the processed panels used downstream. Intended useThis deposit is intended for: transparent replication of the chapter’s empirical results (subject to data access constraints), reuse of the PSY + LPPLS combined workflow for other digital-asset panels, and extension of the liquidity and predictive evaluation layers to additional assets, higher-frequency data, or alternative robustness checks.
Authors
- Lennart John Baals (ORCID: https://orcid.org/0000-0002-7737-9675)
Institutions
- University of Twente (NL)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-01-05
- DOI
- https://doi.org/10.5281/zenodo.18154902
- Primary Topic
- FinTech, Crowdfunding, Digital Finance
- Type
- article
- Field-Weighted Citation Impact
- 0.00