eastmoney-monthly  by yuu-ramsey

Regime-adaptive financial analysis for China A-shares

Created 1 month ago
341 stars

Top 80.7% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a regime-adaptive analysis system for China A-share equities, designed to identify risk and avoid losses rather than chase profits. It targets researchers and technically savvy users by integrating statistical factors, machine learning models, and LLM-based interpretation within a framework that adapts to changing market conditions. The system's core benefit lies in its ability to flag when signals conflict or confidence is low, advising users when not to act.

How It Works

The system employs a layered architecture: Perception (multi-scale features), Regime Detection (majority vote from independent HMM, volatility, and trend detectors), Expert Pool (regime-validated signals), and Output (weighted signal combined with LLM interpretation). Key design principles include eliminating single points of failure, isolating the LLM to generate explanations only (never influencing signal routing), and using mechanical gating via hardcoded lookup tables for regime-to-weight mapping. Signal sources include external transformers like Kronos, ML models (LightGBM, GRU), statistical factors (Momentum, Reversal), and LLMs (Anthropic/DeepSeek) acting as interpreters.

Quick Start & Requirements

  • Prerequisites: Node.js 18+, Python 3.10+, Chrome browser.
  • Installation: Clone the repository, run npm install for Node.js dependencies, pip install -r requirements.txt for Python ML dependencies, and python kronos/download_weights.py to fetch pretrained Kronos weights.
  • Usage: Analyze stocks via the Chrome Extension (load unpacked) on Eastmoney pages or use the Node.js CLI for batch processing (node cli/index.js batch) and single-stock analysis (node cli/index.js analyze 600519).
  • Links: GitHub Repository, Architecture Docs.

Highlighted Details

  • Survivorship Bias: Quantified at 8.4 percentage points using Baostock data (including delisted stocks), invalidating prior conclusions from survivor-only pools.
  • Regime-Dependent Performance: Momentum and LightGBM signals yield +20.6% in bear markets but turn negative in bull markets.
  • LLM Interpretation: LLM acts as a conservative interpreter, achieving a +26% alpha on strong_bull predictions, though 70.9% of its outputs are neutral.
  • Unbiased Evaluation: Utilizes a 24-timepoint, unbiased evaluation pool including delisted stocks via Baostock for robust signal validation.

Maintenance & Community

This is explicitly a "personal research project, not a commercial product." Updates, bug fixes, backward compatibility, and continued development are not guaranteed and occur on the author's schedule. Use is entirely at the user's own risk. No community links (e.g., Discord, Slack) are provided.

Licensing & Compatibility

The project's core code and the Kronos components/weights are released under the MIT License. This license is permissive and generally compatible with commercial use and linking within closed-source projects.

Limitations & Caveats

The system is for educational and research purposes only and is not financial advice. It does not guarantee profits, execute trades, or connect to brokerages. Signals are monthly frequency, not real-time. The LLM is noted as being too conservative in its predictions. The short leg for PEAD/SUE analysis is not executable in A-shares.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
230 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.