Add CryptoQuant client and regime detection analysis

- Introduced `CryptoQuantClient` for fetching data from the CryptoQuant API.
- Added `regime_detection.py` for advanced regime detection analysis using machine learning.
- Updated dependencies in `pyproject.toml` and `uv.lock` to include `scikit-learn`, `matplotlib`, `plotly`, `requests`, and `python-dotenv`.
- Enhanced `.gitignore` to exclude `regime_results.html` and CSV files.
- Created an interactive HTML plot for regime detection results and saved it as `regime_results.html`.
This commit is contained in:
2026-01-13 16:13:57 +08:00
parent 44fac1ed25
commit e6d69ed04d
6 changed files with 566 additions and 1 deletions

19
uv.lock generated
View File

@@ -843,8 +843,13 @@ version = "0.1.0"
source = { virtual = "." }
dependencies = [
{ name = "ccxt" },
{ name = "matplotlib" },
{ name = "numpy" },
{ name = "pandas" },
{ name = "plotly" },
{ name = "python-dotenv" },
{ name = "requests" },
{ name = "scikit-learn" },
{ name = "ta" },
{ name = "vectorbt" },
]
@@ -857,9 +862,14 @@ dev = [
[package.metadata]
requires-dist = [
{ name = "ccxt", specifier = ">=4.5.32" },
{ name = "matplotlib", specifier = ">=3.10.0" },
{ name = "numpy", specifier = ">=2.3.2" },
{ name = "pandas", specifier = ">=2.3.1" },
{ name = "plotly", specifier = ">=5.24.0" },
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.0" },
{ name = "python-dotenv", specifier = ">=1.2.1" },
{ name = "requests", specifier = ">=2.32.5" },
{ name = "scikit-learn", specifier = ">=1.6.0" },
{ name = "ta", specifier = ">=0.11.0" },
{ name = "vectorbt", specifier = ">=0.28.2" },
]
@@ -1522,6 +1532,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" },
]
[[package]]
name = "python-dotenv"
version = "1.2.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/f0/26/19cadc79a718c5edbec86fd4919a6b6d3f681039a2f6d66d14be94e75fb9/python_dotenv-1.2.1.tar.gz", hash = "sha256:42667e897e16ab0d66954af0e60a9caa94f0fd4ecf3aaf6d2d260eec1aa36ad6", size = 44221, upload-time = "2025-10-26T15:12:10.434Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/14/1b/a298b06749107c305e1fe0f814c6c74aea7b2f1e10989cb30f544a1b3253/python_dotenv-1.2.1-py3-none-any.whl", hash = "sha256:b81ee9561e9ca4004139c6cbba3a238c32b03e4894671e181b671e8cb8425d61", size = 21230, upload-time = "2025-10-26T15:12:09.109Z" },
]
[[package]]
name = "pytz"
version = "2025.2"