Skip to main content

ASL · ashare-lake — 本地可日更的 A 股研究湖

别再每次重拉、自己拼复权了。 一行命令,把能日更的 A 股研究湖落到本地。取数工具给你现在,湖给你历史。

CLI:asl · 包名:ashare_lake · Python ≥ 3.10 · 只做数据层(回测和信号留给下游)。

  • 真数上手asl demo 几分钟出可复权日线(不是 mock)
  • 日更能挂着跑:水位 / 失败重试 / 质量审计
  • 研究口径一次定好:复权 · universe · PIT;相对拉数库多编排,相对云端宽表可本地续跑

安装与一分钟体验

需要 Python 3.10+,且能访问 TDX 行情主机(大陆出口更稳)。

pip install ashare-lake
asl demo

写入 data/ashare-lake-demo/(几只流动性股票 × 约 30 个交易日),并打印样例表。

asl query --config configs/ashare-lake.demo.toml --sql "
  SELECT symbol, trade_date, close, volume, source
  FROM daily_bars
  WHERE symbol = '600519.SH'
  ORDER BY trade_date DESC
  LIMIT 10
"

全量日更(仍不必 clone;在含配置的工作目录执行):

asl config init                              # → configs/ashare-lake.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

asl demo

有什么数据

数据集名即 load() 的第一个参数。字段见 schema,编排元数据见 catalog

类别 数据集
基础参考 instruments · trading_calendar · trading_status(停复牌 / ST)
行情 daily_bars(未复权) · index_bars · adj_factors · minute_bars / minute_bars_5m(可选日内)
公司事件 corporate_actions · announcement_index · earnings_disclosure_schedule
基本面 / 估值 financial_statement_items(PIT) · valuation_metrics · analyst_consensus
资金面 fund_flow · margin_trading · northbound_flows / northbound_holdings · dragon_tiger · block_trades · institutional_holdings
结构 / 行业 sector_members · index_constituents · industry_members
宏观 macro_indicators · market_breadth
舆情 / 轮动 sentiment_scores · hot_rank · sector_bars · sector_fund_flow · news_headlines
风险 share_unlock_schedule · regulatory_events

读数据

from ashare_lake.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 即装齐所有数据源。

完整文档

详细 schema、runbook、定位对照与合规说明以 GitHub 为准:

代码 Apache-2.0。落盘行情 / 公告仍受上游条款约束——本包不附带、也不再分发数据湖。

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ashare_lake-0.5.0.tar.gz (620.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ashare_lake-0.5.0-py3-none-any.whl (707.9 kB view details)

Uploaded Python 3

File details

Details for the file ashare_lake-0.5.0.tar.gz.

File metadata

  • Download URL: ashare_lake-0.5.0.tar.gz
  • Upload date:
  • Size: 620.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for ashare_lake-0.5.0.tar.gz
Algorithm Hash digest
SHA256 22d92626b0cdc6b8b1536e0066e9260221f11826ebab252098f723f97ea397f9
MD5 b116c5a0bf2a9e4fc37a6b3a1d24d496
BLAKE2b-256 76168f591df2508eeb0b72163a1c716517032e5fccee7d416c6b380fdc7ae195

See more details on using hashes here.

File details

Details for the file ashare_lake-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ashare_lake-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 707.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for ashare_lake-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae860fce9b3a268320058e55dfe1bc2151adc7919c3787bfe5474f2ba4e0def5
MD5 b42f3bfb1812b56b3363561202659bef
BLAKE2b-256 527620dcc90563793aefd15c8616beed24c030121f755c96a2e1b2509c569162

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.1

2 files

0.6.0

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page