diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 00435b7..ac880e7 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -7,7 +7,7 @@ body:
attributes:
value: |
感谢反馈。**安全问题**请走
- [SECURITY.md](https://github.com/rootSunc/ashare-lake/security/advisories/new),
+ [SECURITY.md](https://github.com/rootSunc/cnequity/security/advisories/new),
不要开公开 issue。
- type: textarea
id: what
@@ -22,7 +22,7 @@ body:
label: 复现步骤
description: 尽量精简的命令/配置(打码本机路径与代理)。
placeholder: |
- asl run daily --group reference --config configs/ashare-lake.toml
+ cne run daily --group reference --config configs/cnequity.toml
validations:
required: true
- type: input
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index c651193..ef89bd2 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,14 +1,14 @@
blank_issues_enabled: true
contact_links:
- name: 安全漏洞
- url: https://github.com/rootSunc/ashare-lake/security/advisories/new
+ url: https://github.com/rootSunc/cnequity/security/advisories/new
about: 私密披露 — 请勿开公开 issue
- name: 文档与定位
- url: https://rootsunc.github.io/ashare-lake/comparison/
+ url: https://rootsunc.github.io/cnequity/comparison/
about: 提功能前先看与 akshare / Tushare / Baostock 的差异
- name: 快速开始与 Recipes
- url: https://rootsunc.github.io/ashare-lake/
+ url: https://rootsunc.github.io/cnequity/
about: 先用真实 demo 和可复制 Recipe 验证问题是否已经有答案
- name: 使用帮助与想法
- url: https://github.com/rootSunc/ashare-lake/discussions
+ url: https://github.com/rootSunc/cnequity/discussions
about: 适合开放式问题、使用经验和还没有明确实现范围的想法
diff --git a/.github/ISSUE_TEMPLATE/source_regression.yml b/.github/ISSUE_TEMPLATE/source_regression.yml
index 992fbd0..9728a4d 100644
--- a/.github/ISSUE_TEMPLATE/source_regression.yml
+++ b/.github/ISSUE_TEMPLATE/source_regression.yml
@@ -7,12 +7,12 @@ body:
attributes:
value: |
这张表用于上游数据源回归,不要附带湖数据或代理凭据。
- 安全问题请走私密 [SECURITY.md](https://github.com/rootSunc/ashare-lake/security/advisories/new)。
+ 安全问题请走私密 [SECURITY.md](https://github.com/rootSunc/cnequity/security/advisories/new)。
- type: input
id: source
attributes:
label: 源 key
- description: '`asl sources --only ...` 使用的 key,例如 tdx_protocol、sina、eastmoney_push2。'
+ description: '`cne sources --only ...` 使用的 key,例如 tdx_protocol、sina、eastmoney_push2。'
placeholder: "sina"
validations:
required: true
@@ -32,9 +32,9 @@ body:
id: command
attributes:
label: 最小复现命令与输出
- description: "请打码本地路径、代理地址、token;优先附 `asl sources --vantage --only ` 的输出。"
+ description: "请打码本地路径、代理地址、token;优先附 `cne sources --vantage --only ` 的输出。"
placeholder: |
- asl sources --vantage overseas --only sina
+ cne sources --vantage overseas --only sina
...
validations:
required: true
@@ -42,7 +42,7 @@ body:
id: environment
attributes:
label: 环境
- placeholder: "ashare-lake 0.5.0, Python 3.12, macOS / Linux / Windows, cn / overseas"
+ placeholder: "cnequity 0.5.0, Python 3.12, macOS / Linux / Windows, cn / overseas"
validations:
required: true
- type: checkboxes
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 52976c7..0677388 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -68,7 +68,7 @@ jobs:
pip install -e . --group dev
- name: Test
- run: pytest --cov=ashare_lake --cov-report=term-missing --cov-report=xml
+ run: pytest --cov=cnequity --cov-report=term-missing --cov-report=xml
- name: Upload coverage
if: matrix.python-version == '3.12'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a03e9e1..f4f4a53 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -56,15 +56,15 @@ jobs:
run: twine check dist/*
- name: Smoke-test the built wheel
env:
- SMOKE_ROOT: ${{ runner.temp }}/ashare-lake-wheel-smoke
+ SMOKE_ROOT: ${{ runner.temp }}/cnequity-wheel-smoke
run: |
python -m venv "$SMOKE_ROOT"
wheel=$(find dist -maxdepth 1 -name '*.whl' -print -quit)
test -n "$wheel"
"$SMOKE_ROOT/bin/python" -m pip install --upgrade pip
"$SMOKE_ROOT/bin/pip" install "$wheel"
- "$SMOKE_ROOT/bin/asl" --version
- "$SMOKE_ROOT/bin/asl" demo --help
+ "$SMOKE_ROOT/bin/cne" --version
+ "$SMOKE_ROOT/bin/cne" demo --help
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
@@ -79,7 +79,7 @@ jobs:
id-token: write
environment:
name: pypi
- url: https://pypi.org/p/ashare-lake
+ url: https://pypi.org/p/cnequity
steps:
- name: Download distributions
uses: actions/download-artifact@v4
diff --git a/.github/workflows/source-health.yml b/.github/workflows/source-health.yml
index 08dfe8a..ae12065 100644
--- a/.github/workflows/source-health.yml
+++ b/.github/workflows/source-health.yml
@@ -3,7 +3,7 @@ name: Source health
on:
schedule:
# Weekly, after the weekend, from GitHub's overseas runners. The report is
- # a vantage point, not a universal SLA; mainland users should run `asl
+ # a vantage point, not a universal SLA; mainland users should run `cne
# sources --vantage cn` in their own scheduler as well.
- cron: "17 3 * * 1"
workflow_dispatch:
@@ -33,15 +33,15 @@ jobs:
pip install .
- name: Probe public sources
env:
- HEALTH_ROOT: ${{ runner.temp }}/ashare-lake-health
+ HEALTH_ROOT: ${{ runner.temp }}/cnequity-health
run: |
set -o pipefail
mkdir -p "$HEALTH_ROOT"
- asl config init \
- --config "$HEALTH_ROOT/ashare-lake.toml" \
+ cne config init \
+ --config "$HEALTH_ROOT/cnequity.toml" \
--data-root "$HEALTH_ROOT/data"
- asl sources \
- --config "$HEALTH_ROOT/ashare-lake.toml" \
+ cne sources \
+ --config "$HEALTH_ROOT/cnequity.toml" \
--vantage github-actions \
--only tdx_protocol,sina,eastmoney_push2,eastmoney_push2his,cninfo \
--out "$HEALTH_ROOT/source-health.json" \
@@ -49,7 +49,7 @@ jobs:
- name: Add report to job summary
if: always()
env:
- HEALTH_ROOT: ${{ runner.temp }}/ashare-lake-health
+ HEALTH_ROOT: ${{ runner.temp }}/cnequity-health
run: |
if [ -f "$HEALTH_ROOT/source-health.txt" ]; then
{
@@ -70,7 +70,7 @@ jobs:
with:
name: source-health-${{ github.run_id }}
path: |
- ${{ runner.temp }}/ashare-lake-health/source-health.json
- ${{ runner.temp }}/ashare-lake-health/source-health.txt
+ ${{ runner.temp }}/cnequity-health/source-health.json
+ ${{ runner.temp }}/cnequity-health/source-health.txt
if-no-files-found: warn
retention-days: 30
diff --git a/.gitignore b/.gitignore
index 773ab34..a7269a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,8 +25,8 @@ env/
# Secrets & local config
.env
configs/*.local.toml
-configs/ashare-lake.toml
-configs/ashare-lake.demo.toml
+configs/cnequity.toml
+configs/cnequity.demo.toml
# Data lake artifacts (never commit generated data)
data/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d00f33..ba7dbe7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,19 @@ the project adheres to [Semantic Versioning](https://semver.org/).
## [Unreleased]
+## [0.7.0] — 2026-08-15
+
+### Changed
+
+- **Renamed the project from `ashare-lake` to `CNEquity`.** The old name
+ collided with established projects in the same space (mpquant/Ashare,
+ AKShare) and did not surface in searches for "A股 数据湖". Package:
+ `pip install cnequity` (`ashare-lake` on PyPI will no longer be updated).
+ CLI: `cne` (was `asl`). Import: `from cnequity...` (was `from
+ ashare_lake...`). Config/data defaults: `cnequity.toml`, `data/cnequity/`
+ (was `ashare-lake.toml`, `data/ashare-lake/`) — existing local configs and
+ data directories are not renamed automatically.
+
## [0.6.0] — 2026-08-10
### Fixed
@@ -140,7 +153,7 @@ the project adheres to [Semantic Versioning](https://semver.org/).
[Apache-2.0](LICENSE); third-party notices (including vendored tdxpy, still
MIT) live in [NOTICE](NOTICE). Landed market data remains outside the
software license — see [legal](docs/legal-and-data-sources.md).
-- **README hero rebranded to ASL · ashare-lake.** Shorter pitch, survivorship
+- **README hero rebranded to ASL · cnequity.** Shorter pitch, survivorship
chart and demo up front; cropped serve scorecard and architecture diagram in
their own sections. No upgrade step for existing lakes.
- **`asl servers test` and `asl push2his` are off the top-level command list.**
@@ -179,7 +192,7 @@ the project adheres to [Semantic Versioning](https://semver.org/).
official `mcp` SDK, which resolves to 15 additional packages — cryptography,
pyjwt and truststore for an OAuth flow a local server never performs,
opentelemetry for tracing nothing exports, and a second HTTP stack beside the
- pinned httpx. `pip install ashare-lake` with no extras stays intact.
+ pinned httpx. `pip install cnequity` with no extras stays intact.
- **`asl init --profile quick` / `--since`** — a first backfill that is
*shallower, never narrower*. `quick` fetches the last three calendar years for
@@ -314,8 +327,8 @@ the project adheres to [Semantic Versioning](https://semver.org/).
or liquidity factors:
```bash
- scripts/migrate_daily_bars_volume_v2.py --config configs/ashare-lake.toml --dry-run
- scripts/migrate_daily_bars_volume_v2.py --config configs/ashare-lake.toml --apply
+ scripts/migrate_daily_bars_volume_v2.py --config configs/cnequity.toml --dry-run
+ scripts/migrate_daily_bars_volume_v2.py --config configs/cnequity.toml --apply
```
Back up curated first; the script is idempotent and does not restamp
@@ -433,7 +446,7 @@ the project adheres to [Semantic Versioning](https://semver.org/).
- **`daily_bars.volume` mixed 股 and 手, off by exactly 100×.** Only `ths` and
`baostock` already wrote 股; `tdx_protocol` passed 手 through and Sina
divided by 100. Every adapter now normalizes to 股 at its boundary
- (`ashare_lake.domain.units`).
+ (`cnequity.domain.units`).
- **No-trade bars stored a denormal turnover instead of zero.** TDX's packed-
float decoder maps raw zero to `2**-127`; fixed at
@@ -475,14 +488,14 @@ the project adheres to [Semantic Versioning](https://semver.org/).
### Fixed
- `asl config init` always writes an **absolute** `data.root` (resolving the
- template's `./data/ashare-lake` against the current working directory) so
+ template's `./data/cnequity` against the current working directory) so
`asl doctor` is green on the default first-run path.
- Default `[on_demand].datasets` is only `stock_news` and `research_reports`.
`announcement_body` / `financial_reports` raise `NotImplementedError` instead
of caching empty placeholder JSON. Failed research_reports fetches are not
cached either.
- ImportError hints for baostock / pandas no longer recommend removed extras
- (`[valuation]` / `[structure]`); they point at reinstalling `ashare-lake`.
+ (`[valuation]` / `[structure]`); they point at reinstalling `cnequity`.
## [0.3.0] — 2026-07-29
@@ -503,7 +516,7 @@ environment has none of this.
### Changed
-- `pip install ashare-lake` is the whole install. Every runtime source — AkShare,
+- `pip install cnequity` is the whole install. Every runtime source — AkShare,
Baostock, SnowNLP, and the pandas/openpyxl/xlrd trio that parses the Shenwan
and CNI constituent spreadsheets — is a hard dependency, so no daily or
backfill step can silently lose a source because an extra was forgotten. Costs
@@ -524,7 +537,7 @@ environment has none of this.
- Native Windows 10/11 (64-bit) support: cross-platform file locks replace
Unix-only `fcntl.flock` in run locks, watermark writes, rate limiting, and
- staging cleanup (`ashare_lake.file_lock`).
+ staging cleanup (`cnequity.file_lock`).
- CI `windows-latest` job running the offline unit suite.
- `asl config init` defaults `workers = 1` on Windows (same as macOS); raising
workers later is allowed — Windows uses spawn, not the unsafe macOS fork path.
@@ -568,7 +581,7 @@ environment has none of this.
- `asl config init --data-root` no longer strips escaped backslashes when the
path is a Windows `C:\…` form (callable `re.sub` replacement).
- `asl demo` writes a TOML-safe `data.root` (escaped POSIX path) so follow-up
- `asl query --config configs/ashare-lake.demo.toml` works on Windows.
+ `asl query --config configs/cnequity.demo.toml` works on Windows.
- `asl doctor` probes writability with a real create/delete (not `os.access`) and
suggests an ACL fix on Windows instead of `chmod`.
- EastMoney sticky IP / CLI sticky reads always use UTF-8.
@@ -589,7 +602,7 @@ environment has none of this.
### Removed
- All extras (`tdx`, `macro`, `nlp`, `valuation`, `structure`, `all`).
- `pip install "ashare-lake[tdx]"` from an older doc still installs correctly:
+ `pip install "cnequity[tdx]"` from an older doc still installs correctly:
pip warns that the extra is not provided and continues, uv says nothing.
- Contributor tooling moved from the `dev` extra to a PEP 735 dependency group:
`pip install -e . --group dev` (pip >= 25.1) or `uv sync`.
@@ -600,8 +613,8 @@ environment has none of this.
- `asl config init` writes the packaged example TOML (no repo checkout needed);
forces `orchestrator.workers = 1` on macOS
-- Packaged template at `ashare_lake.config.templates` (kept in sync with
- `configs/ashare-lake.example.toml`)
+- Packaged template at `cnequity.config.templates` (kept in sync with
+ `configs/cnequity.example.toml`)
### Fixed
@@ -610,7 +623,7 @@ environment has none of this.
### Changed
-- Document `pip install "ashare-lake[tdx]"` as the primary install path
+- Document `pip install "cnequity[tdx]"` as the primary install path
- `pyproject.toml` `readme` points at `README.pypi.md` instead of `README.md`
- Getting-started docs use `asl config init` instead of `git clone` + `cp`;
quickstart separates one-minute demo from full-market init
@@ -639,12 +652,12 @@ First public release of the self-hosted A-share Parquet data layer.
- Ignore runtime logs and local tool/editor dirs
- TLS verify on by default for HTTP clients
-- Project URLs point at `rootSunc/ashare-lake`
-
-[0.6.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.6.0
-[0.5.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.5.0
-[0.4.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.4.0
-[0.3.1]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.3.1
-[0.3.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.3.0
-[0.2.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.2.0
-[0.1.0]: https://github.com/rootSunc/ashare-lake/releases/tag/v0.1.0
+- Project URLs point at `rootSunc/cnequity`
+
+[0.6.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.6.0
+[0.5.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.5.0
+[0.4.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.4.0
+[0.3.1]: https://github.com/rootSunc/cnequity/releases/tag/v0.3.1
+[0.3.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.3.0
+[0.2.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.2.0
+[0.1.0]: https://github.com/rootSunc/cnequity/releases/tag/v0.1.0
diff --git a/CITATION.cff b/CITATION.cff
index 4dccfd3..00af7cd 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -1,18 +1,18 @@
cff-version: 1.2.0
-message: "If ashare-lake supports your research or data work, please cite this repository."
+message: "If CNEquity supports your research or data work, please cite this repository."
type: software
-title: "ashare-lake"
+title: "CNEquity"
abstract: >-
A free, self-hosted historical data layer for A-shares with multi-source
ingestion, provenance, adjustment semantics, point-in-time fundamentals,
and reproducible Parquet storage.
-version: 0.6.0
-date-released: 2026-08-10
+version: 0.7.0
+date-released: 2026-08-15
authors:
- - name: "ashare-lake Contributors"
+ - name: "CNEquity Contributors"
license: Apache-2.0
-repository-code: "https://github.com/rootSunc/ashare-lake"
-url: "https://rootsunc.github.io/ashare-lake/"
+repository-code: "https://github.com/rootSunc/cnequity"
+url: "https://rootsunc.github.io/cnequity/"
keywords:
- A-shares
- financial data
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index dc19215..75e7351 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
# 贡献指南
-**只用数据的用户**:`pip install ashare-lake` → 见 [快速开始](docs/getting-started/quickstart.md)。
+**只用数据的用户**:`pip install cnequity` → 见 [快速开始](docs/getting-started/quickstart.md)。
本文面向向仓库提交代码的贡献者。
安全问题请走 [SECURITY.md](SECURITY.md),不要开公开 issue。
@@ -15,7 +15,7 @@
- 为现有数据集补一条离线 recipe、查询示例或字段说明
- 给已有 adapter 增加 schema 边界测试和清晰的源限制说明
- 修复中英文文档、CLI help 与实际默认值之间的漂移
-- 改进 `asl demo`、`asl status` 或 dashboard 的错误提示
+- 改进 `cne demo`、`cne status` 或 dashboard 的错误提示
数据源接入需要同时提交来源、保留期、限流和合规说明;请不要把真实数据文件提交到仓库。
较大的方向可以先在 issue / discussion 中确认范围。
@@ -30,7 +30,7 @@ pip install -e . --group dev
# 见 docs/getting-started/installation.md
```
-请勿提交 `configs/ashare-lake.toml`、`data/`、`logs/`。
+请勿提交 `configs/cnequity.toml`、`data/`、`logs/`。
```bash
ruff format .
@@ -42,7 +42,7 @@ pytest tests/integration
## 约定
-- 代码在 `src/ashare_lake/`,按职责拆分(`domain`、`adapters`、`orchestrator`、
+- 代码在 `src/cnequity/`,按职责拆分(`domain`、`adapters`、`orchestrator`、
`steps`、`storage`、`derive`、`quality`、`query`、`config`、`cli`)。
- Step 按 L0–L8 分层放在 `steps/`;新模块需在 `steps/__init__.py` 中 import 以注册。
- 新数据集:在 `domain/schemas.py` 声明 schema + 主键、分区键,以及溯源列
diff --git a/NOTICE b/NOTICE
index 290b5de..e719d79 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
-ashare-lake
-Copyright 2026 ashare-lake Contributors
+CNEquity
+Copyright 2026 CNEquity Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,4 +16,4 @@ limitations under the License.
---------------------------------------------------------------------------
This product includes software derived from tdxpy 0.2.7
(https://github.com/mootdx/tdxpy), licensed under the MIT License.
-See src/ashare_lake/adapters/tdx_protocol/_wire/LICENSE.tdxpy.
+See src/cnequity/adapters/tdx_protocol/_wire/LICENSE.tdxpy.
diff --git a/README.en.md b/README.en.md
index 3665846..61a334d 100644
--- a/README.en.md
+++ b/README.en.md
@@ -1,12 +1,12 @@
-ASL · ashare-lake
+CNE · CNEquity
A daily-refreshable local A-share research lake for humans and AI agents
-
-
+
+
-
+
@@ -16,7 +16,7 @@
-
+
> This is a synthetic README demo, explicitly marked `ILLUSTRATIVE DEMO`; the full-coverage heatmap is not a claim about current production data.
@@ -24,7 +24,7 @@
## Architecture
-
+
Public sources → adapters and orchestration → local Parquet lake → quality, query, and read-only services
@@ -33,22 +33,22 @@ The boundary is deliberate: adapters fetch, the orchestrator schedules and retri
## Data in ~30 seconds
```bash
-pip install ashare-lake # no token, credit, or signup
-asl demo # real data: 5 names × 30 sessions
+pip install cnequity # no token, credit, or signup
+cne demo # real data: 5 names × 30 sessions
```
Measured at about 25 seconds. Needs **TDX quote hosts** reachable (mainland access is more reliable);
-if it fails, try `asl sources --only tdx_protocol`. The demo writes to its own
-`data/ashare-lake-demo/` directory and never touches a full lake.
+if it fails, try `cne sources --only tdx_protocol`. The demo writes to its own
+`data/cnequity-demo/` directory and never touches a full lake.
-
+
```python
-from ashare_lake.query import load
+from cnequity.query import load
-bars = load("daily_bars", data_root="data/ashare-lake-demo")
+bars = load("daily_bars", data_root="data/cnequity-demo")
```
If you only need a current quote, a fetch API may be enough. Build a lake when you need reproducible history,
@@ -57,7 +57,7 @@ survivorship-safe universes, or point-in-time research.
To see why the adjustment contract matters (this also queries Sina and expands to about three years):
```bash
-asl demo --research --symbols 600519.SH
+cne demo --research --symbols 600519.SH
# raw return -24.25% → hfq return -14.39% (example output; changes with the as-of date)
```
@@ -84,25 +84,25 @@ python scripts/survivorship_gap.py --svg docs/assets/survivorship-gap.svg
## Your own lake, in four commands
```bash
-pip install ashare-lake
-asl config init # writes configs/ashare-lake.toml
-asl init # every symbol × the last 3 years (~1 hour)
-asl run daily # this one line, each trading day after
+pip install cnequity
+cne config init # writes configs/cnequity.toml
+cne init # every symbol × the last 3 years (~1 hour)
+cne run daily # this one line, each trading day after
```
-`asl init` defaults to **shallow, never narrow**: the last 3 years, every symbol.
+`cne init` defaults to **shallow, never narrow**: the last 3 years, every symbol.
Trimming symbols instead would build the survivorship bias this lake exists to
avoid straight into it, whereas shallow is honest — `coverage_start` records it.
-Want everything: `asl init --profile full` (~3x the time). Deepen any time:
+Want everything: `cne init --profile full` (~3x the time). Deepen any time:
```bash
-asl backfill daily_bars --start 2016-01-01 --end
+cne backfill daily_bars --start 2016-01-01 --end
```
**Wire into an AI agent** (optional, once the lake exists):
```bash
-claude mcp add ashare-lake -- asl mcp --config "$(pwd)/configs/ashare-lake.toml"
+claude mcp add cnequity -- cne mcp --config "$(pwd)/configs/cnequity.toml"
```
With MCP wired up, ask in plain language:
@@ -142,10 +142,10 @@ them. **Fetch tools give you now; a lake gives you history.**
AkShare and agent fetch skills answer "how do I fetch?" — a snapshot of now,
with no history contract. Tushare is cloud wide tables. Qlib / vn.py are
-research / trading platforms. **ASL** owns the middle: many sources, one
+research / trading platforms. **CNE** owns the middle: many sources, one
contract, a resumable local Parquet lake.
-| What you care about | **ashare-lake** | AkShare / fetch skills | Tushare Pro | Qlib / vn.py |
+| What you care about | **CNEquity** | AkShare / fetch skills | Tushare Pro | Qlib / vn.py |
|--|--|--|--|--|
| Local, resumable data base | **Lake + daily jobs** | On-demand; you own orchestration | Cloud credits | Platform-tied |
| Provenance | **Row-level** | Usually no shared contract | Platform fields | Varies |
@@ -177,45 +177,45 @@ Intraday (1m / 5m / ticks) is **off by default** — see
## Keeping it current
-`asl run daily` runs every group for the day. Put it in crontab and that is the
+`cne run daily` runs every group for the day. Put it in crontab and that is the
whole daily job:
```bash
# after the close on weekdays; non-trading days skip themselves
-30 16 * * 1-5 cd /path/to/lake && asl run daily >> logs/daily.log 2>&1
+30 16 * * 1-5 cd /path/to/lake && cne run daily >> logs/daily.log 2>&1
```
```bash
-asl status # per-dataset freshness: FRESH / STALE / EMPTY
-asl serve # http://127.0.0.1:8787 — coverage, size, tiers
-asl sources # health of the 14 upstream hosts
-asl retry # re-run only the failed batches
+cne status # per-dataset freshness: FRESH / STALE / EMPTY
+cne serve # http://127.0.0.1:8787 — coverage, size, tiers
+cne sources # health of the 14 upstream hosts
+cne retry # re-run only the failed batches
```
A step that fails does not take the run with it: it is recorded as a failed
-batch, everything else still lands, and `asl retry` picks up just those.
+batch, everything else still lands, and `cne retry` picks up just those.
```python
-from ashare_lake.query import load
+from cnequity.query import load
bars = load("daily_bars", start="2020-01-01", end="2025-12-31", adjust="hfq", universe="all_a")
roe = load("financial_statement_items", items=["roe"], as_of="2024-04-30")
```
-The demo root (`data/ashare-lake-demo/`) and the daily lake do not overwrite each
+The demo root (`data/cnequity-demo/`) and the daily lake do not overwrite each
other. Install and scheduling:
[installation](docs/getting-started/installation.md) ·
[runbook](docs/operations/runbook.md).
## Serve it to an AI agent
-`asl mcp` exposes the lake to a model (read-only; ingestion stays on the CLI).
+`cne mcp` exposes the lake to a model (read-only; ingestion stays on the CLI).
```bash
# You have a lake — full contract
-claude mcp add ashare-lake -- asl mcp --config /abs/path/to/ashare-lake.toml
+claude mcp add cnequity -- cne mcp --config /abs/path/to/cnequity.toml
-# No lake yet — run asl demo first, then point at the demo config
+# No lake yet — run cne demo first, then point at the demo config
# No lake at all — add --live (no adjust / universe / PIT; responses say so)
```
@@ -225,12 +225,12 @@ per dataset); the contract travels in the responses. Details:
## Glance at the lake
-Once the lake is up, `asl serve` shows coverage, freshness, and bytes by tier
+Once the lake is up, `cne serve` shows coverage, freshness, and bytes by tier
(read-only — it never writes the lake):
```bash
-asl serve # http://127.0.0.1:8787
-asl sources # health of 14 upstream hosts (probe on CLI, display on serve)
+cne serve # http://127.0.0.1:8787
+cne sources # health of 14 upstream hosts (probe on CLI, display on serve)
```
Details: [serve](docs/modules/serve.md) ·
@@ -238,7 +238,7 @@ Details: [serve](docs/modules/serve.md) ·
## FAQ
-**Q: How long does `asl init` take, and how much disk?**
+**Q: How long does `cne init` take, and how much disk?**
The default (last 3 years, whole market) is about an hour and GBs.
`--profile full` starts at **2016** and measured roughly 3x that. Both fetch the
*full* cross-section — filtering symbols instead builds survivorship bias into
@@ -250,8 +250,8 @@ For daily bars back to 2001 — TDX does serve them, but no profile defaults
there:
```bash
-asl init --since 2001-01-01 # deep on the first run
-asl backfill daily_bars --start 2001-01-01 # or deepen afterwards
+cne init --since 2001-01-01 # deep on the first run
+cne backfill daily_bars --start 2001-01-01 # or deepen afterwards
```
**Q: Why store only back-adjusted factors?**
@@ -260,7 +260,7 @@ in `load(adjust="qfq")`
([ADR-0004](docs/adr/0004-store-hfq-derive-qfq-at-query.md)).
**Q: EastMoney 403 / connection reset?**
-Run `asl sources --only eastmoney_push2,eastmoney_push2his` first. Daily-path
+Run `cne sources --only eastmoney_push2,eastmoney_push2his` first. Daily-path
bars come from TDX, outside that WAF blast radius.
**Q: Why can't I get minute bars from two years ago?**
diff --git a/README.md b/README.md
index 80d5a67..893ef0b 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-ASL · ashare-lake
+CNE · CNEquity
本地可日更的 A 股研究湖,为人和 AI agent 保存可复查的历史
-
-
+
+
-
+
@@ -16,7 +16,7 @@
-
+
> 上图是用于 README 的合成演示图,覆盖热力图明确标注为 `ILLUSTRATIVE DEMO`,不代表当前生产数据状态。真实控制台只读,不会修改数据湖。
@@ -24,7 +24,7 @@
## 架构
-
+
公开数据源 → 适配与编排 → 本地 Parquet 湖 → 质量、查询与只读服务
@@ -32,7 +32,7 @@
## 先看它是否适合你
-ashare-lake 不是又一个“临时请求一次行情”的接口。它更适合这些场景:
+CNEquity 不是又一个”临时请求一次行情”的接口。它更适合这些场景:
- 你要反复研究多年行情,不想每次重拉、清洗和拼复权;
- 你在意退市股、历史成分股和 PIT,不能接受不知不觉使用未来数据;
@@ -44,7 +44,7 @@ ashare-lake 不是又一个“临时请求一次行情”的接口。它更适
第一次使用,按这条路径即可:
```text
-asl demo → asl init → asl run daily → load() / asl serve → asl mcp(可选)
+cne demo → cne init → cne run daily → load() / cne serve → cne mcp(可选)
```
## 30 秒跑通
@@ -52,43 +52,43 @@ asl demo → asl init → asl run daily → load() / asl serve → asl mcp(可
需要 Python 3.10+,无需 token、积分或账号:
```bash
-pip install ashare-lake
-asl demo
+pip install cnequity
+cne demo
```
-`asl demo` 默认拉取 5 只股票最近约 30 个交易日的真实数据,写入独立目录
-`data/ashare-lake-demo/`,不会覆盖正式数据湖。需要能访问 TDX 行情主机;若连接失败,先检查:
+`cne demo` 默认拉取 5 只股票最近约 30 个交易日的真实数据,写入独立目录
+`data/cnequity-demo/`,不会覆盖正式数据湖。需要能访问 TDX 行情主机;若连接失败,先检查:
```bash
-asl sources --only tdx_protocol
+cne sources --only tdx_protocol
```
-
+
然后在 Python 中读取:
```python
-from ashare_lake.query import load
+from cnequity.query import load
-bars = load("daily_bars", data_root="data/ashare-lake-demo")
+bars = load("daily_bars", data_root="data/cnequity-demo")
print(bars.tail())
```
想直接比较原始价格与后复权口径:
```bash
-asl demo --research --symbols 600519.SH
+cne demo --research --symbols 600519.SH
```
## 5 分钟开始建湖
```bash
-pip install ashare-lake
-asl config init # 生成 configs/ashare-lake.toml
-asl init # 全市场标的,默认回溯最近 3 年
-asl run daily # 之后每个交易日执行这一条
+pip install cnequity
+cne config init # 生成 configs/cnequity.toml
+cne init # 全市场标的,默认回溯最近 3 年
+cne run daily # 之后每个交易日执行这一条
```
默认策略是“浅而不窄”:历史先取最近 3 年,但全市场标的一个不缺。这样不会因为只保留今天仍上市的股票,提前把幸存者偏差写进数据湖。每个数据集的真实起点会记录在 `coverage_start`。
@@ -96,10 +96,10 @@ asl run daily # 之后每个交易日执行这一条
需要更长历史时可以一次拉满,也可以以后补深:
```bash
-asl init --profile full
+cne init --profile full
# 或对单个数据集补历史
-asl backfill daily_bars --start 2016-01-01 --end
+cne backfill daily_bars --start 2016-01-01 --end
```
默认初始化通常是小时级、GB 级,实际取决于网络、数据源状态和机器配置。详细安装说明见[快速开始](docs/getting-started/quickstart.md)和[安装指南](docs/getting-started/installation.md)。
@@ -112,7 +112,7 @@ asl backfill daily_bars --start 2016-01-01 --end
同一个等权买入持有、同样的起止日期,唯一差别是后来退市的股票是否仍在历史股票池中。用“今天还在的股票”回看历史,2016–2021 五年收益会从 **5.9% 变成 12.0%**,看起来几乎翻倍。
-这类错误很难从结果里发现:那些股票不是收益为零,而是根本没有进入计算。ashare-lake 因此把退市股、复权因子、历史成分与 PIT 当作基础能力,而不是附加字段。
+这类错误很难从结果里发现:那些股票不是收益为零,而是根本没有进入计算。CNEquity 因此把退市股、复权因子、历史成分与 PIT 当作基础能力,而不是附加字段。
复现实验:
@@ -134,7 +134,7 @@ python scripts/survivorship_gap.py --lang zh --svg docs/assets/survivorship-gap.
常用查询:
```python
-from ashare_lake.query import load
+from cnequity.query import load
bars = load(
"daily_bars",
@@ -233,11 +233,11 @@ roe = load(
## 日常使用与运维
```bash
-asl run daily # 执行当天全部日更分组
-asl status # 查看 FRESH / STALE / EMPTY
-asl serve # 打开 http://127.0.0.1:8787
-asl sources # 检查上游数据源健康度
-asl retry --run-id # 只重试失败批次
+cne run daily # 执行当天全部日更分组
+cne status # 查看 FRESH / STALE / EMPTY
+cne serve # 打开 http://127.0.0.1:8787
+cne sources # 检查上游数据源健康度
+cne retry --run-id # 只重试失败批次
```
单个 step 失败时,系统会记录 failed batch,其他步骤继续落盘;重试不会把整条任务重新跑一遍。浏览器控制台就是 README 首图中的界面,可查看覆盖、新鲜度、容量、跑批和质量结果。
@@ -246,17 +246,17 @@ asl retry --run-id # 只重试失败批次
```bash
# 交易日收盘后执行;非交易日会自动跳过
-30 16 * * 1-5 cd /path/to/lake && asl run daily >> logs/daily.log 2>&1
+30 16 * * 1-5 cd /path/to/lake && cne run daily >> logs/daily.log 2>&1
```
更多运维方式见[运行手册](docs/operations/runbook.md)、[数据源健康检查](docs/operations/source-health.md)和[故障排查](docs/operations/troubleshooting.md)。
## 接给 AI agent
-`asl mcp` 以只读方式把本地湖提供给模型;采集、重试和清理仍由 CLI 完成。
+`cne mcp` 以只读方式把本地湖提供给模型;采集、重试和清理仍由 CLI 完成。
```bash
-asl mcp --config "$(pwd)/configs/ashare-lake.toml"
+cne mcp --config "$(pwd)/configs/cnequity.toml"
```
把上面的命令作为 MCP server 注册到任意兼容客户端即可。大多数客户端
@@ -265,16 +265,16 @@ asl mcp --config "$(pwd)/configs/ashare-lake.toml"
```json
{
"mcpServers": {
- "ashare-lake": {
- "command": "asl",
- "args": ["mcp", "--config", "/abs/path/to/ashare-lake.toml"]
+ "cnequity": {
+ "command": "cne",
+ "args": ["mcp", "--config", "/abs/path/to/cnequity.toml"]
}
}
}
```
因此 Codex、Claude、Cline、Cursor、Windsurf、Gemini CLI 以及其它支持
-MCP stdio 的 agent 都可以复用同一条 `command` / `args` 配置;ashare-lake
+MCP stdio 的 agent 都可以复用同一条 `command` / `args` 配置;CNEquity
不依赖任何特定模型或厂商 SDK。
`--config` 必须使用绝对路径。接好后可以直接问:
@@ -284,13 +284,13 @@ MCP stdio 的 agent 都可以复用同一条 `command` / `args` 配置;ashare-
- “计算 2018 年财报因子的 IC,不要使用未来数据。”
- “过去三年退市的股票,退市前 60 天有什么共同形态?”
-还没有正式湖时,可以先运行 `asl demo`,再使用生成的 demo 配置。完整说明见[MCP 参考](docs/reference/mcp.md)。
+还没有正式湖时,可以先运行 `cne demo`,再使用生成的 demo 配置。完整说明见[MCP 参考](docs/reference/mcp.md)。
## 与 AkShare、Tushare、Qlib 有什么不同
-AkShare 和取数工具解决“怎样调用数据源”,Tushare 提供云端数据服务,Qlib / vn.py 更偏研究或交易平台。ashare-lake 做的是中间的数据基础设施:把多源数据落成可日更、可复查、可溯源的本地 Parquet 湖。
+AkShare 和取数工具解决”怎样调用数据源”,Tushare 提供云端数据服务,Qlib / vn.py 更偏研究或交易平台。CNEquity 做的是中间的数据基础设施:把多源数据落成可日更、可复查、可溯源的本地 Parquet 湖。
-| 你在意的能力 | ashare-lake | 常规取数工具 | 云端数据服务 | 研究 / 交易平台 |
+| 你在意的能力 | CNEquity | 常规取数工具 | 云端数据服务 | 研究 / 交易平台 |
|---|---|---|---|---|
| 本地可续跑的数据底座 | **内置** | 通常自建 | 通常不提供 | 依平台而定 |
| 历史结果能否复查 | **行级溯源** | 缺少统一契约 | 依平台字段 | 依模块而定 |
@@ -309,9 +309,9 @@ AkShare 和取数工具解决“怎样调用数据源”,Tushare 提供云端
需要从 2001 年开始的日线:
```bash
-asl init --since 2001-01-01
+cne init --since 2001-01-01
# 或事后补深
-asl backfill daily_bars --start 2001-01-01
+cne backfill daily_bars --start 2001-01-01
```
@@ -326,7 +326,7 @@ asl backfill daily_bars --start 2001-01-01
东财返回 403 或连接重置怎么办?
-先运行 `asl sources --only eastmoney_push2,eastmoney_push2his`。日更主路径行情走 TDX,不受东财行情接口风控影响。
+先运行 `cne sources --only eastmoney_push2,eastmoney_push2his`。日更主路径行情走 TDX,不受东财行情接口风控影响。
@@ -356,4 +356,4 @@ asl backfill daily_bars --start 2001-01-01
---
-如果 ashare-lake 帮你省下了搭建数据底座的时间,欢迎点个 ⭐,让更多做 A 股研究的人看到它。
+如果 CNEquity 帮你省下了搭建数据底座的时间,欢迎点个 ⭐,让更多做 A 股研究的人看到它。
diff --git a/README.pypi.md b/README.pypi.md
index 694f8af..b309502 100644
--- a/README.pypi.md
+++ b/README.pypi.md
@@ -1,10 +1,10 @@
-# ASL · ashare-lake — 免费、自托管的 A 股历史数据层
+# CNE · CNEquity — 免费、自托管的 A 股历史数据层
**别再每次重拉、自己拼复权了。** 一条命令,把可日更的研究数据落到本地。自动保存历史口径,供 Python、DuckDB、Polars 和 AI agent 使用。
-CLI:`asl` · 包名:`ashare_lake` · **Python ≥ 3.10** · **只做数据层**(回测和信号留给下游)。
+CLI:`cne` · 包名:`cnequity` · **Python ≥ 3.10** · **只做数据层**(回测和信号留给下游)。
-- **真数上手**:`asl demo` 几分钟出真实日线(不是 mock);`--research` 可验证复权口径
+- **真数上手**:`cne demo` 几分钟出真实日线(不是 mock);`--research` 可验证复权口径
- **日更能挂着跑**:水位 / 失败重试 / 质量审计
- **研究口径一次定好**:复权 · universe · PIT;相对拉数库多编排,相对云端宽表可本地续跑
@@ -13,17 +13,17 @@ CLI:`asl` · 包名:`ashare_lake` · **Python ≥ 3.10** · **只做数据
需要 **Python 3.10+**,且能访问 TDX 行情主机(大陆出口更稳)。
```bash
-pip install ashare-lake
-asl demo
+pip install cnequity
+cne demo
```
-写入 `data/ashare-lake-demo/`(几只流动性股票 × 约 30 个交易日),并打印样例表。
+写入 `data/cnequity-demo/`(几只流动性股票 × 约 30 个交易日),并打印样例表。
-要验证复权口径,可运行 `asl demo --research --symbols 600519.SH`;它会额外读取 Sina 复权因子,
+要验证复权口径,可运行 `cne demo --research --symbols 600519.SH`;它会额外读取 Sina 复权因子,
并打印约三年窗口的 raw / hfq 收益对照。
```bash
-asl query --config configs/ashare-lake.demo.toml --sql "
+cne query --config configs/cnequity.demo.toml --sql "
SELECT symbol, trade_date, close, volume, source
FROM daily_bars
WHERE symbol = '600519.SH'
@@ -35,21 +35,21 @@ asl query --config configs/ashare-lake.demo.toml --sql "
全量日更(仍不必 clone;在含配置的工作目录执行):
```bash
-asl config init # → configs/ashare-lake.toml(data.root 写为绝对路径)
+cne config init # → configs/cnequity.toml(data.root 写为绝对路径)
# 或显式指定:
-# asl config init --data-root /data/ashare-lake --force
-asl config validate --config configs/ashare-lake.toml
-asl init --config configs/ashare-lake.toml
-asl run daily --config configs/ashare-lake.toml
+# cne config init --data-root /data/cnequity --force
+cne config validate --config configs/cnequity.toml
+cne init --config configs/cnequity.toml
+cne run daily --config configs/cnequity.toml
```
-
+
## 有什么数据
-数据集名即 `load()` 的第一个参数。字段见 [schema](https://github.com/rootSunc/ashare-lake/blob/main/docs/datasets/schema.md),编排元数据见 [catalog](https://github.com/rootSunc/ashare-lake/blob/main/docs/datasets/catalog.md)。
+数据集名即 `load()` 的第一个参数。字段见 [schema](https://github.com/rootSunc/cnequity/blob/main/docs/datasets/schema.md),编排元数据见 [catalog](https://github.com/rootSunc/cnequity/blob/main/docs/datasets/catalog.md)。
| 类别 | 数据集 |
|------|--------|
@@ -66,20 +66,20 @@ asl run daily --config configs/ashare-lake.toml
## 读数据
```python
-from ashare_lake.query import load
+from cnequity.query import load
bars = load("daily_bars", start="2020-01-01", end="2025-12-31", adjust="hfq")
roe = load("financial_statement_items", items=["roe"], as_of="2024-04-30")
```
-无 extras —— `pip install ashare-lake` 即装齐所有数据源。
+无 extras —— `pip install cnequity` 即装齐所有数据源。
## 完整文档
详细 schema、runbook、定位对照与合规说明以 GitHub 为准:
-- [仓库](https://github.com/rootSunc/ashare-lake)
-- [文档站](https://rootsunc.github.io/ashare-lake/) · [仓库文档](https://github.com/rootSunc/ashare-lake/tree/main/docs)
-- [Changelog](https://github.com/rootSunc/ashare-lake/blob/main/CHANGELOG.md)
+- [仓库](https://github.com/rootSunc/cnequity)
+- [文档站](https://rootsunc.github.io/cnequity/) · [仓库文档](https://github.com/rootSunc/cnequity/tree/main/docs)
+- [Changelog](https://github.com/rootSunc/cnequity/blob/main/CHANGELOG.md)
代码 Apache-2.0。落盘行情 / 公告仍受上游条款约束——本包不附带、也不再分发数据湖。
diff --git a/ROADMAP.md b/ROADMAP.md
index 1e592d9..0ba4275 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -1,12 +1,12 @@
# Roadmap
-ashare-lake is a data layer, not a trading strategy or a hosted quote service. The roadmap is
+cnequity is a data layer, not a trading strategy or a hosted quote service. The roadmap is
ordered around one promise: make reproducible A-share history easy to build, inspect, and consume.
## Now · 0.6
- Make the first-run path prove the research value, not only that a quote request works. The optional
- `asl demo --research` path now derives a real hfq series and prints a raw-vs-adjusted return.
+ `cne demo --research` path now derives a real hfq series and prints a raw-vs-adjusted return.
- Keep the README, PyPI description, CLI help, and getting-started docs generated from the same
defaults and history semantics.
- Publish source-health and coverage evidence that can be checked without trusting a marketing claim.
diff --git a/SECURITY.md b/SECURITY.md
index 088e2bf..1a82c2e 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -10,7 +10,7 @@
优先任选其一:
-1. [GitHub Security Advisories](https://github.com/rootSunc/ashare-lake/security/advisories/new)
+1. [GitHub Security Advisories](https://github.com/rootSunc/cnequity/security/advisories/new)
(私密报告),或
2. 通过仓库所有者(GitHub:`rootSunc`)建立私密联系渠道。
@@ -27,5 +27,5 @@
- 本项目从第三方 HTTP/TCP 接口拉取行情等数据。仅涉及上游可用性、限速或服务条款争议的问题,
**不算** 安全漏洞——见 [许可与数据合规](docs/legal-and-data-sources.md)。
-- 本地配置(`configs/ashare-lake.toml`)、`data/` 下的湖数据与运行日志不得提交。
+- 本地配置(`configs/cnequity.toml`)、`data/` 下的湖数据与运行日志不得提交。
若在 git 历史中发现密钥,请私下报告,以便在更广披露前清理历史。
diff --git a/codecov.yml b/codecov.yml
index 2f92c46..29039f6 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -1,7 +1,7 @@
# Vendored upstream (tdxpy, MIT). Measured for importability by test_tdx_decoupling,
# not line-exercised — same rationale as ruff's extend-exclude for this tree.
ignore:
- - "src/ashare_lake/adapters/tdx_protocol/_wire/**/*"
+ - "src/cnequity/adapters/tdx_protocol/_wire/**/*"
coverage:
status:
diff --git a/configs/ashare-lake.example.toml b/configs/cnequity.example.toml
similarity index 94%
rename from configs/ashare-lake.example.toml
rename to configs/cnequity.example.toml
index 3ef8ef7..3427a1b 100644
--- a/configs/ashare-lake.example.toml
+++ b/configs/cnequity.example.toml
@@ -1,14 +1,14 @@
-# Example / default ashare-lake config.
-# Repo copy: configs/ashare-lake.example.toml
-# Packaged copy: src/ashare_lake/config/templates/ashare-lake.example.toml
-# Keep both identical — `asl config init` ships the packaged file.
+# Example / default cnequity config.
+# Repo copy: configs/cnequity.example.toml
+# Packaged copy: src/cnequity/config/templates/cnequity.example.toml
+# Keep both identical — `cne config init` ships the packaged file.
[data]
-root = "./data/ashare-lake"
+root = "./data/cnequity"
[orchestrator]
# macOS must use workers = 1 (the TDX client is not fork-safe; ProcessPool → BrokenProcessPool).
-# Windows defaults to 1 via `asl config init` (spawn is fine; raise after a clean doctor).
+# Windows defaults to 1 via `cne config init` (spawn is fine; raise after a clean doctor).
# Linux may use >1; keep batch_size modest under memory pressure.
workers = 8
batch_size = 100
@@ -104,7 +104,7 @@ enabled = true
min_interval_seconds = 1.0
# 国家统计局 — the 制造业 PMI release, used to cross-check the vendor's value.
-# Set enabled = false to keep `asl audit` off the network.
+# Set enabled = false to keep `cne audit` off the network.
[sources.nbs]
enabled = true
min_interval_seconds = 1.0
@@ -142,11 +142,11 @@ news_symbol_limit = 50
[minute_bars]
# Intraday bars. Off by default and NOT on the daily waves: full-market 1m is
# ~1.3M rows and ~30MB a day (6-8GB a year, several times the whole daily lake),
-# which would change what `asl init` costs someone who never asked for it.
+# which would change what `cne init` costs someone who never asked for it.
#
# HISTORY HORIZON. TDX keeps ~95 trading days of 1m and ~491 (about 2 years) of
# 5m and coarser. That is the vendor's retention, not this lake's backlog: an
-# older window returns nothing, and no backfill source extends it. `asl backfill
+# older window returns nothing, and no backfill source extends it. `cne backfill
# minute_bars --start` refuses a window that starts before the horizon.
enabled = false
# "index:" — that index's latest constituents (~300 names for 沪深300,
@@ -184,7 +184,7 @@ fetch_workers = 4
#
# HISTORY. TDX serves back to 2024-01-02 for every symbol — a fixed floor, not
# a rolling window, and unrelated to the per-symbol bar-count limit the minute
-# bars have. `asl backfill trade_ticks --start` refuses anything earlier.
+# bars have. `cne backfill trade_ticks --start` refuses anything earlier.
#
# COST. ~1.85 requests and ~2,700 rows per symbol-session; ~4.25 bytes a row on
# disk. A 200-name watchlist is about a minute and ~3.8MB a day. Seeding those
@@ -288,7 +288,7 @@ at = "17:35"
# top_holders is deliberately NOT here: two reports × ~110 pages × two periods is
# ~440 pages, 40× these two, and on a slow link it would overrun the gap to
# macro_risk and cost that group its whole day (see the spacing note above). Run
-# it on its own cadence: `asl backfill top_holders --start ... --end ...`.
+# it on its own cadence: `cne backfill top_holders --start ... --end ...`.
steps = [
"financial_statement_items", "earnings_disclosure_schedule",
"index_constituents", "industry_members",
@@ -306,13 +306,13 @@ steps = ["institutional_holdings", "analyst_consensus",
"hot_rank", "sector_bars", "sector_fund_flow", "news_headlines", "flash_news_wire",
"sentiment_scores", "compact"]
-# Not scheduled by anything: `asl run daily --group intraday` only. Enable
+# Not scheduled by anything: `cne run daily --group intraday` only. Enable
# [minute_bars] first, and read the horizon note there before expecting history.
[job.daily.groups.intraday]
at = "18:45"
steps = ["minute_bars", "minute_bars_5m", "compact"]
-# Also unscheduled: `asl run daily --group ticks`. Its own group rather than a
+# Also unscheduled: `cne run daily --group ticks`. Its own group rather than a
# fourth entry in `intraday` above, so that turning on minute bars cannot drag
# transaction records along with it. Enable [trade_ticks] first.
[job.daily.groups.ticks]
@@ -333,6 +333,6 @@ enabled = true
datasets = ["stock_news", "research_reports"]
[duckdb]
-path = "{data.root}/duckdb/ashare-lake.duckdb"
+path = "{data.root}/duckdb/cnequity.duckdb"
memory_limit = "2GB"
threads = 4
diff --git a/docs/README.md b/docs/README.md
index 1d5890e..67eaff9 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,8 +1,8 @@
-# ASL · ashare-lake — 本地可日更的 A 股研究湖
+# CNE · CNEquity — 本地可日更的 A 股研究湖
本地可日更、可溯源的金融数据研究底座:多源采集、编排、标准化,交付带溯源、列契约稳定的 Parquet 湖。
-CLI 是 `asl`,Python 包是 `ashare_lake`。推荐:`pip install ashare-lake` → `asl demo` 试玩,或 `asl config init` 写出配置再跑全量。数据湖根目录默认 `./data/ashare-lake`。
+CLI 是 `cne`,Python 包是 `cnequity`。推荐:`pip install cnequity` → `cne demo` 试玩,或 `cne config init` 写出配置再跑全量。数据湖根目录默认 `./data/cnequity`。
**建议顺序**: [安装](getting-started/installation.md) → [快速开始](getting-started/quickstart.md) → [配置](getting-started/configuration.md)。卡在网络 / TDX / workers 时看 [排障](operations/troubleshooting.md)。
@@ -10,7 +10,7 @@ CLI 是 `asl`,Python 包是 `ashare_lake`。推荐:`pip install ashare-lake`
产品边界与近期方向:[ROADMAP](../ROADMAP.md)。
-可搜索的在线文档站:[rootsunc.github.io/ashare-lake](https://rootsunc.github.io/ashare-lake/)。
+可搜索的在线文档站:[rootsunc.github.io/cnequity](https://rootsunc.github.io/cnequity/)。
面向使用者的文档以中文为准;[CHANGELOG](../CHANGELOG.md) 与 [ADR](adr/) 保持英文。英文简介见 [README.en.md](../README.en.md)。
@@ -48,7 +48,7 @@ CLI 是 `asl`,Python 包是 `ashare_lake`。推荐:`pip install ashare-lake`
## 运维
- [Runbook](operations/runbook.md) · [脚本说明](operations/scripts.md) · [故障排查](operations/troubleshooting.md)
-- [数据源健康度](operations/source-health.md)(`asl sources` + `asl serve /source-health`)
+- [数据源健康度](operations/source-health.md)(`cne sources` + `cne serve /source-health`)
## 架构
diff --git a/docs/adr/0004-store-hfq-derive-qfq-at-query.md b/docs/adr/0004-store-hfq-derive-qfq-at-query.md
index f755da6..a39d474 100644
--- a/docs/adr/0004-store-hfq-derive-qfq-at-query.md
+++ b/docs/adr/0004-store-hfq-derive-qfq-at-query.md
@@ -79,5 +79,5 @@ That requirement is met at **query time**, not in `derived/adj_factors`.
## References
- adj_factors cache / silent-staleness concerns (addressed by append-only + audit)
-- `src/ashare_lake/adapters/sina/adj_factors.py` — Sina hfq/qfq fetch
-- `src/ashare_lake/query/reader.py` — `_apply_adjustment`
+- `src/cnequity/adapters/sina/adj_factors.py` — Sina hfq/qfq fetch
+- `src/cnequity/query/reader.py` — `_apply_adjustment`
diff --git a/docs/architecture/data-flow.md b/docs/architecture/data-flow.md
index 4664fca..cc38e6f 100644
--- a/docs/architecture/data-flow.md
+++ b/docs/architecture/data-flow.md
@@ -7,7 +7,7 @@
## Init(全量回填)
-触发:`asl init`
+触发:`cne init`
```
init_data_layout()
@@ -38,7 +38,7 @@ run_init_phases() — 按 [job.init.phases] 顺序
## 日更(Daily Run)
-触发:`asl run daily` 或 `--group `
+触发:`cne run daily` 或 `--group `
```
检查是否交易日
@@ -82,15 +82,15 @@ finalize(波次末尾或分组内显式 steps):
3. failed / running / stale batch 涉及的数据集 → 整个数据集本 run 不 compact
4. 原子写:先写临时文件再 rename(`storage/atomic.py`)
-手动触发:`asl compact --run-id `
+手动触发:`cne compact --run-id `
---
## 审计(Audit)
-**单次 run**:`asl audit --run-id ` → `meta/quality/findings/{run_id}.json`
+**单次 run**:`cne audit --run-id ` → `meta/quality/findings/{run_id}.json`
-**湖级健康**:`asl audit --full` → 汇总新鲜度、STALE、error/warning findings;UNHEALTHY 时退出码 1。
+**湖级健康**:`cne audit --full` → 汇总新鲜度、STALE、error/warning findings;UNHEALTHY 时退出码 1。
关键检查:
@@ -102,7 +102,7 @@ finalize(波次末尾或分组内显式 steps):
## 重试(Retry)
-触发:`asl retry --run-id `
+触发:`cne retry --run-id `
```
run_lock 获取
@@ -118,7 +118,7 @@ run_lock 获取
## 单数据集回填(Backfill)
-触发:`asl backfill `
+触发:`cne backfill `
- `fetch_semantics="snapshot"` 且无 `backfill_source` 的数据集**禁止** backfill
- 有 `backfill_source` 的(如 `valuation_metrics` → baostock)允许历史回放
@@ -131,7 +131,7 @@ run_lock 获取
不经过 staging/curated 主路径:
```
-asl query --dataset stock_news --symbol 600519.SH
+cne query --dataset stock_news --symbol 600519.SH
→ OnDemandService.fetch()
→ meta/on_demand/{dataset}/{symbol}.json 缓存
```
@@ -147,7 +147,7 @@ batch failed
→ 水位不动
→ staging 保留(可 retry)
→ audit findings 记录
- → 人工:asl status → asl retry
+ → 人工:cne status → cne retry
→ compact 成功后下游 load() 可见新数据
```
diff --git a/docs/architecture/design-principles.md b/docs/architecture/design-principles.md
index e53e326..3b49790 100644
--- a/docs/architecture/design-principles.md
+++ b/docs/architecture/design-principles.md
@@ -23,7 +23,7 @@ curated 行带 `source`(adapter 名)、`data_version`、`fetched_at`(UTC
## 能查的问题放在引擎侧
-`asl audit --full` 能抓的,别只靠下游自检。例如复权收益极值、adj_factors × corporate_actions 对账、PK 重复、mock 行、分区行数突变。
+`cne audit --full` 能抓的,别只靠下游自检。例如复权收益极值、adj_factors × corporate_actions 对账、PK 重复、mock 行、分区行数突变。
## 单人可运维
diff --git a/docs/architecture/lake-layout.md b/docs/architecture/lake-layout.md
index 8b4e612..982e6d6 100644
--- a/docs/architecture/lake-layout.md
+++ b/docs/architecture/lake-layout.md
@@ -33,7 +33,7 @@ staging/{dataset}/run_id={run_id}/part-{batch_id}.parquet
- 非 worker step 通常单 part
- **不保证** PK 唯一;去重在 compact 阶段完成
-清理:`asl clean`(终态 + 已 compact 的 run;`--force` 可清 incomplete/未 compact,retry 将全量重抓)
+清理:`cne clean`(终态 + 已 compact 的 run;`--force` 可清 incomplete/未 compact,retry 将全量重抓)
---
@@ -80,7 +80,7 @@ audit 的 `partition_fragmentation` 会在某个数据集明显配细了时告
**目录值是自描述的**:`2024` / `2024-06` / `2024-06-03` 三种形状读的时候直接按
形状解析,不看配置。所以改粒度不需要迁移——老的按天目录照常能读,只是比新写入的碎。
-`asl repartition ` 把历史改写成配置的粒度(只是省空间和文件句柄,不影响正确性);
+`cne repartition ` 把历史改写成配置的粒度(只是省空间和文件句柄,不影响正确性);
不带参数则列出当前布局和配置不一致的数据集。
粗粒度目录关闭 Hive 解析:polars 会按同名列的类型去解析目录值,
@@ -140,17 +140,17 @@ compact 成功后更新。用于:
- 增量抓取窗口(`incremental_window`)
- 下游缓存失效键
-- `asl status --datasets` 新鲜度判断
+- `cne status --datasets` 新鲜度判断
---
## duckdb/
```
-duckdb/ashare-lake.duckdb
+duckdb/cnequity.duckdb
```
-- 启动时 / `asl query` 前由 `query/views.py` 确保视图存在
+- 启动时 / `cne query` 前由 `query/views.py` 确保视图存在
- 每个 curated/derived 数据集对应视图
- 额外视图:`daily_bars_hfq`、`daily_bars_qfq`、`daily_bars_adj`(带复权列)
diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md
index d437fb4..8e2b46e 100644
--- a/docs/architecture/overview.md
+++ b/docs/architecture/overview.md
@@ -1,6 +1,6 @@
# 架构总览
-ashare-lake 是 A 股数据的**采集编排层**:在多个外部数据源之上,通过自研 Wave 引擎并行拉取、校验、落湖,并以稳定 schema 交付给下游选股/因子项目。
+cnequity 是 A 股数据的**采集编排层**:在多个外部数据源之上,通过自研 Wave 引擎并行拉取、校验、落湖,并以稳定 schema 交付给下游选股/因子项目。
引擎本身不产生 alpha。它主要挡住三件事:回测用的数据是否干净(PIT、universe、复权)、日更是否按时到、数字对不上时能不能追到源。
@@ -52,7 +52,7 @@ ashare-lake 是 A 股数据的**采集编排层**:在多个外部数据源之
→ curated/derived 就绪,meta/state 水位前移
```
-失败路径:batch failed → 水位不动 → `asl retry --run-id` 只重跑失败 batch → 成功后自动 compact→derive→audit。
+失败路径:batch failed → 水位不动 → `cne retry --run-id` 只重跑失败 batch → 成功后自动 compact→derive→audit。
---
@@ -74,7 +74,7 @@ Job (daily / init / backfill / retry)
## 与下游的契约边界
-下游应通过 `ashare_lake.query.load()` 读数。核心条款:
+下游应通过 `cnequity.query.load()` 读数。核心条款:
| 条款 | 说明 |
|------|------|
@@ -94,7 +94,7 @@ Job (daily / init / backfill / retry)
用之前心里有数(不少是踩过坑之后的现状,不是待办清单):
-- **幸存者偏差(当前最大的正确性缺口)**:历史若按当前上市名单回填,退市股会缺失;`universe="all_a"` 无法补救数据本身不在的问题。audit 的 `universe_survivorship_absent` 会以 error 报出——补齐退市股前别拿收益序列做结论。补齐路径:`asl delisted backfill` + `repair`。
+- **幸存者偏差(当前最大的正确性缺口)**:历史若按当前上市名单回填,退市股会缺失;`universe="all_a"` 无法补救数据本身不在的问题。audit 的 `universe_survivorship_absent` 会以 error 报出——补齐退市股前别拿收益序列做结论。补齐路径:`cne delisted backfill` + `repair`。
- **复权因子**:老股 hfq 曾大面积断裂;现在是 append-only merge,加上 `adj_factor_reconciliation` audit。残余多为 `corporate_actions` 缺事件。
- **估值历史**:以前不少是当日快照;`valuation_metrics` 已可用 baostock 回填。
- **ST / 停牌**:日更只抓当天,更早窗口 `universe="all_a"` 不会按历史 ST 剔除(audit 会报覆盖起点)。
diff --git a/docs/assets/README.md b/docs/assets/README.md
index cbc928b..2d6bd5e 100644
--- a/docs/assets/README.md
+++ b/docs/assets/README.md
@@ -1,9 +1,9 @@
# README assets
-READMEs embed the survivorship chart, `asl-demo.png`, the clearly labelled
-illustrative `asl-serve-hero-demo.png`, and the root-level
+READMEs embed the survivorship chart, `cne-demo.png`, the clearly labelled
+illustrative `cne-serve-hero-demo.png`, and the root-level
`architecture-diagram-v2.png` architecture diagram. The factual dashboard
-capture remains available as `asl-serve-hero.png` for documentation and QA.
+capture remains available as `cne-serve-hero.png` for documentation and QA.
Other PNGs below are for docs / social / re-exports.
PyPI uses the short `README.pypi.md`, which points at absolute
`raw.githubusercontent.com` URLs for the one demo screenshot it embeds.
@@ -48,15 +48,15 @@ boundaries change.
| File | Shows |
|------|--------|
-| `asl-demo.png` | `asl demo` phased progress + sample bars — embedded in both READMEs |
-| `asl-query.png` | `asl query` SQL result with `source` (kept for re-exports) |
-| `asl-load.png` | Python `load()` REPL (kept for re-exports) |
+| `cne-demo.png` | `cne demo` phased progress + sample bars — embedded in both READMEs |
+| `cne-query.png` | `cne query` SQL result with `source` (kept for re-exports) |
+| `cne-load.png` | Python `load()` REPL (kept for re-exports) |
```bash
.venv/bin/python scripts/render_readme_screenshots.py
```
-Banner copy should track `asl demo` (no mootdx). Sample bar numbers may be
+Banner copy should track `cne demo` (no mootdx). Sample bar numbers may be
from an older live run; re-render after UX copy changes.
## Dashboard screenshots
@@ -66,22 +66,22 @@ lake with something in it.
| File | Shows |
|------|--------|
-| `asl-serve-hero-demo.png` | Synthetic README illustration: a clearly labelled full-coverage heatmap |
-| `asl-serve-hero.png` | 1440×820 factual current overview: health, 42 datasets, KPIs, coverage heatmap and action state |
-| `asl-serve.png` | 1440px-wide full-page overview (source / docs) |
-| `asl-serve-dataset.png` | `trade_ticks` metadata tab (for docs; not in README) |
+| `cne-serve-hero-demo.png` | Synthetic README illustration: a clearly labelled full-coverage heatmap |
+| `cne-serve-hero.png` | 1440×820 factual current overview: health, 42 datasets, KPIs, coverage heatmap and action state |
+| `cne-serve.png` | 1440px-wide full-page overview (source / docs) |
+| `cne-serve-dataset.png` | `trade_ticks` metadata tab (for docs; not in README) |
```bash
-asl stats rebuild
-asl serve --config configs/ashare-lake.toml --port 8791
+cne stats rebuild
+cne serve --config configs/cnequity.toml --port 8791
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
--headless=new --disable-gpu --hide-scrollbars \
--window-size=1440,820 --virtual-time-budget=9000 \
- --screenshot=docs/assets/asl-serve-hero.png \
+ --screenshot=docs/assets/cne-serve-hero.png \
"http://127.0.0.1:8791/"
```
-Capture `asl-serve.png` separately as a full-page screenshot at the same
+Capture `cne-serve.png` separately as a full-page screenshot at the same
1440px viewport width. Before saving either image, confirm the page shows
“运行正常”; “度量表过期” is a transient stats state and should be cleared with
-`asl stats rebuild` rather than advertised in the README.
+`cne stats rebuild` rather than advertised in the README.
diff --git a/docs/assets/asl-demo.png b/docs/assets/cne-demo.png
similarity index 100%
rename from docs/assets/asl-demo.png
rename to docs/assets/cne-demo.png
diff --git a/docs/assets/asl-load.png b/docs/assets/cne-load.png
similarity index 100%
rename from docs/assets/asl-load.png
rename to docs/assets/cne-load.png
diff --git a/docs/assets/asl-query.png b/docs/assets/cne-query.png
similarity index 100%
rename from docs/assets/asl-query.png
rename to docs/assets/cne-query.png
diff --git a/docs/assets/asl-serve-dataset.png b/docs/assets/cne-serve-dataset.png
similarity index 100%
rename from docs/assets/asl-serve-dataset.png
rename to docs/assets/cne-serve-dataset.png
diff --git a/docs/assets/asl-serve-hero-demo.png b/docs/assets/cne-serve-hero-demo.png
similarity index 100%
rename from docs/assets/asl-serve-hero-demo.png
rename to docs/assets/cne-serve-hero-demo.png
diff --git a/docs/assets/asl-serve-hero.png b/docs/assets/cne-serve-hero.png
similarity index 100%
rename from docs/assets/asl-serve-hero.png
rename to docs/assets/cne-serve-hero.png
diff --git a/docs/assets/asl-serve.png b/docs/assets/cne-serve.png
similarity index 100%
rename from docs/assets/asl-serve.png
rename to docs/assets/cne-serve.png
diff --git a/docs/assets/og-image.html b/docs/assets/og-image.html
index 942c2dc..498596b 100644
--- a/docs/assets/og-image.html
+++ b/docs/assets/og-image.html
@@ -54,12 +54,12 @@
}
-
+
-
ASHARE-LAKE
-
ASL · ashare-lake
+
CNEQUITY
+
CNE · CNEquity
本地可日更 的 A 股研究数据层
复权 · 历史股票池 · PIT
@@ -71,7 +71,7 @@
ASL · ashare-lake