# refraction-ray/xalpha

基金投资管理回测引擎

Repository: https://github.com/refraction-ray/xalpha
Canonical: https://ross.abutalabs.com/products/xalpha
Homepage: https://xalpha.readthedocs.io
Language: Python
License: MIT
License Family: permissive
Topics: finance, quantitative-trading, backtest, investment, ai-agents
Last push: 2026-07-25T13:45:32+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 94, release rhythm 60, longevity 100
- inputs: {"age_days": 2953, "days_push": 39, "days_rel": 57, "gap_med": 201, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2685, forks 488 (observed 2026-08-28T04:07:10.226580+00:00)

## What it is
xalpha is a Python library for full-lifecycle management of fund and stock investments, including fetching fund/stock net values and market data, recording and analyzing investment accounts, and simple strategy backtesting. It is especially suited for dollar-cost averaging and grid trading with frequent cash flows, and offers rich visualizations plus AI agent support.

## Use cases
- backtest fund investment strategies in python
- track and analyze my mutual fund portfolio transactions
- fetch historical daily prices for Chinese stocks and funds
- predict QDII fund net value in real time
- analyze fund underlying stock holdings and sector exposure
- visualize PE/PB valuation history for indexes and funds
- price convertible bonds
- get reminders for scheduled periodic investing

## When to choose
- you invest in Chinese funds/stocks and need account tracking with cent-accurate trade records
- you want one-line access to multi-market daily and realtime financial data
- you do DCA or grid investing and need portfolio overview and cost analysis
- you want to run it in Jupyter or on the JoinQuant quant platform

## When to avoid
- you need high-frequency or intraday backtesting with order-book data
- you need a full production trading system with live broker execution
- your focus is non-Chinese markets without the supported data sources

## Facets
- artifact type: library
- maturity: active
- function: data-visualization, analytics, data-science, trading
- domain: fintech, data-visualization, analytics
- platform: python
- tags: fund-investment, backtesting, quantitative-finance, mutual-funds, portfolio-analysis, dca-investing, china-markets, financial-data

## Member repositories
- refraction-ray/xalpha (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:10.226580+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:17:50.322708+00:00, confidence not recorded.
  - readme: https://github.com/refraction-ray/xalpha (fetched 2026-08-28T04:07:10.226580+00:00, sha eb49d5577384)
  - registry_pypi: https://pypi.org/pypi/xalpha/json (fetched 2026-08-29T10:00:31.844130+00:00, sha aeaf810a8005)
- Data as of 2026-08-30T08:39:29.467469+00:00.
