IdeaCredIdeaCred

sogeking30/CLUSTERING-MARKET-REGIMES

58

๐Ÿ“Š Detect market regimes by clustering probability distributions using Wasserstein K-means for more accurate financial analysis and insights.

What's novel

๐Ÿ“Š Detect market regimes by clustering probability distributions using Wasserstein K-means for more accurate financial analysis and insights.

Code Analysis

9 files read ยท 3 rounds

Implements the Wasserstein k-means clustering algorithm from Horvath et al. (2021) to detect bull/bear market regimes in financial time series, with synthetic data generators (GBM, Merton Jump Diffusion), MMD-based validation metrics, and extensive visualization.

Strengths

The core algorithm is a genuine, mathematically correct implementation of 1D Wasserstein k-means with proper barycenter computation, MMD validation, and both real-data (SPY) and synthetic experiment pipelines that faithfully reproduce the paper's methodology. Code is well-documented with references to specific equations and definitions from the source paper.

Weaknesses

Zero test coverage, the README contains nonsensical installation instructions (pip install a .zip, python a .zip URL), and there are performance issues (O(nยฒ) loops in accuracy scoring and distance computation) that would make it impractical for large datasets. The package.json with a 'claude' dependency is irrelevant noise, and requirements.txt lists unused packages (POT, hmmlearn).

Score Breakdown

Innovation
5 (25%)
Craft
50 (35%)
Traction
8 (15%)
Scope
61 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+1
Concept Novelty+2

Craft

Ci+0
Tests-1
Polish+1
Releases+0
Has License+0
Code Quality+16
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+2
Has Dependency Mgmt+5

Traction

Forks+0
Stars+6
Hn Points+0
Watchers+0
Early Traction+0
Devto Reactions+0
Community Contribs+2

Scope

Commits+5
Languages+3
Subsystems+5
Bloat Penalty+0
Completeness+6
Contributors+6
Authored Files+12
Readme Code Match+3
Architecture Depth+5
Implementation Depth+8

Evidence

Commits

8

Contributors

2

Files

51

Active weeks

3

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

1

Forks

0

License

โ€”