Skip to content

ImanNasrEsfahani/DS-LPPLS

Repository files navigation

DS-LPPLS Model for Financial Bubble Detection

This repository implements the DS-LPPLS (Diagnostic of Super-exponential Log-Periodic Power Law Singularity) model for detecting financial bubbles and crashes in cryptocurrency and traditional markets in real-time.

Overview

The DS-LPPLS model is a sophisticated tool for detecting and diagnosing financial bubbles in their development phase. It combines:

  • Log-Periodic Power Law (LPPL) pattern recognition
  • Multi-scale analysis
  • Quantile regression methods
  • Ensemble forecasting techniques

The model generates two key indicators:

  • DS LPPLS Confidence™: Measures the sensitivity of bubble patterns across different time windows
  • DS LPPLS Trust™: Quantifies how well the theoretical LPPL model matches empirical price data

Key Features

  • Real-time bubble detection in cryptocurrency and traditional markets
  • Robust pattern recognition across multiple time scales
  • Ensemble forecasting to improve prediction reliability
  • Both positive (price increase) and negative (price decrease) bubble detection
  • Detailed visualization tools for analysis

Installation

  1. Clone this repository:
git clone https://github.com/ImanNasrEsfahani/DS-LPPLS
cd DS-LPPLS
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows
  1. Install required packages:
pip install -r requirements.txt

Usage

Run the main program:

python setup.py

Follow the interactive prompts to:

  1. Select a currency pair/asset
  2. Set date range
  3. Choose operations:
    • Download data
    • Run model
    • Apply filters
    • Display charts

Available visualization options:

  1. Confidence and Trust indicators
  2. Simulated Price trajectories
  3. Critical Time predictions

System Requirements

  • Python 3.10+
  • Recommended: 16+ CPU cores for optimal performance
  • Sufficient storage space (1+ GB per year of data analyzed)
  • Minimum 16GB RAM recommended
  • Minimum 20GB HDD free space recommended

Data Storage

  • Model results are saved in chunks of 250 rolling windows
  • Each chunk is approximately 500-750MB
  • Results stored in both .joblib and .csv formats
  • Expect ~1GB storage per year of analyzed data

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Submit a pull request

For major changes, please open an issue first to discuss proposed changes.

License

MIT License

Support and Contact

If you have questions, need help, or want to contribute to this project, feel free to:

I welcome feedback and contributions to improve this tool for detecting financial bubbles. Whether you want to report a bug, request a feature, or collaborate on development, I'm happy to help!

Citations:

  1. Early Warning Signals of Financial Crises [[1]]
  2. Everything You Always Wanted to Know About LPPLS [[2]]
  3. MPRA Paper on Log-Periodic Power Law Models [[3]]
  4. Log-Periodic Power Law Analysis in Financial Markets [[4]]
  5. ArXiv Paper on DS-LPPLS Model Applications [[5]]
  6. University of Pretoria Working Paper on Financial Bubbles [[6]]
  7. SSRN Paper on Bubble Detection Techniques [[7]]
  8. LPPLS Appliance GitHub Repository [[8]]
  9. Imperial College London Thesis on Financial Risk Modeling [[9]]
  10. Politecnico di Milano Thesis on LPPLS for Bubble Detection [[10]]
  11. PyPI Package for LPPLS Implementation [[11]]
  12. ETH Zurich Dissertation on Entrepreneurial Risks [[12]]
  13. Wiley Article on LPPLS Methodology [[13]]
  14. ResearchGate Paper on LPPLS Indicators Over Two Centuries [[14]]
  15. DS-LPPLS Confidence Indicator Visualization [[15]]
  16. ETH Zurich FCO Report on Financial Crises [[16]]
  17. Detection of Financial Bubbles Using LPPLS [[17]]
  18. Open University Thesis on LPPLS Applications [[18]]

About

DS-LPPLS - LPPLS (Log-Periodic Power Law Singularity)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages