investment-data获取高质量 A 股投资数据,基于 investment_data 项目。支持日终价格、涨跌停数据、指数数据等。每日更新,多数据源交叉验证。触发词:股票数据、A股数据、金融数据、量化数据、历史行情。
Install via ClawdBot CLI:
clawdbot install StanleyChanH/investment-data基于 investment_data 项目,提供高质量 A 股投资数据。
python scripts/download_data.py --latest
from scripts.data_client import InvestmentData
# 初始化客户端
client = InvestmentData()
# 查询单只股票
df = client.get_stock_data("000001.SZ", start_date="2024-01-01", end_date="2024-12-31")
# 查询指数成分
weights = client.get_index_weights("000300.SH")
# 查询涨跌停
limits = client.get_limit_data("000001.SZ", date="2024-12-01")
python scripts/query_batch.py --stocks "000001.SZ,000002.SZ" --start 2024-01-01 --end 2024-12-31 --output csv
# 数据存储路径(可选)
export INVESTMENT_DATA_DIR=~/.qlib/qlib_data/cn_data
# Tushare Token(可选,用于实时更新)
export TUSHARE_TOKEN=your_token_here
编辑 config/config.yaml:
data:
# 数据存储路径
data_dir: ~/.qlib/qlib_data/cn_data
# 自动更新
auto_update: true
update_time: "09:00"
# 数据源优先级
sources:
- final
- ts
- ak
- yahoo
query:
# 默认输出格式
output_format: csv
# 日期格式
date_format: "%Y-%m-%d"
from scripts.data_client import InvestmentData
client = InvestmentData()
# 查询股票日 K 线
df = client.get_stock_daily("000001.SZ", "2024-01-01", "2024-12-31")
print(df.head())
# 查询指数数据
index_df = client.get_index_daily("000300.SH", "2024-01-01", "2024-12-31")
# 查询股票列表
stocks = client.get_stock_list(date="2024-12-31")
# 查询退市股票
delisted = client.get_delisted_stocks()
# 查询单只股票
python scripts/query.py --stock 000001.SZ --start 2024-01-01 --end 2024-12-31
# 批量查询
python scripts/query_batch.py --file stocks.txt --start 2024-01-01 --output json
# 更新数据
python scripts/update_data.py --daily
# 导出数据
python scripts/export.py --stock 000001.SZ --format excel
使用 OpenClaw cron 自动更新:
# 每天早上 9:00 更新数据
schedule:
cron: "0 9 * * *"
task: "python scripts/update_data.py --daily"
# 批量导出多只股票
python scripts/batch_export.py --stocks stocks.txt --output ./data/
欢迎贡献代码、报告问题或提出建议!
Apache 2.0
Generated Feb 26, 2026
Financial analysts and quants use this skill to backtest trading strategies by accessing historical A-share price, volume, and limit data. It supports multiple formats like Qlib for seamless integration into algorithmic models, enabling data-driven decision-making.
Asset managers leverage the skill to monitor index weights, stock performance, and delisted stocks for portfolio rebalancing and risk assessment. Daily updates ensure timely insights into market movements and compliance with investment mandates.
Researchers and academics utilize the skill to gather clean, validated A-share data for empirical studies on market efficiency, corporate finance, or economic trends. The multi-source verification enhances data reliability for publications and reports.
Developers integrate this skill into apps or platforms to provide users with real-time stock analytics, historical charts, and automated data updates. It supports APIs and command-line tools for building scalable financial services.
Companies analyze competitor stock performance and market indices using this skill to inform strategic decisions, such as mergers or market entry. The data helps in benchmarking and forecasting based on historical trends.
Offer a cloud-based platform where users pay a monthly fee to access processed A-share data via APIs, with features like automated updates and advanced analytics. Revenue comes from tiered subscriptions based on data volume and frequency.
License the cleaned and validated datasets to banks, hedge funds, or research firms for internal use, charging upfront or annual fees. This model leverages the skill's multi-source verification to ensure high-quality data for critical operations.
Provide basic data access for free to attract individual investors, while monetizing advanced features like batch exports, real-time updates via Tushare, or premium support. Revenue is generated from upgrades and add-ons.
💬 Integration Tip
Set up environment variables like INVESTMENT_DATA_DIR for custom storage and use the provided Python client for seamless API integration into existing workflows.
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends, high-resolution charts (RSI/MACD/BB/VWAP/ATR), plus optional web a...
Become an autonomous prediction market trader on Polymarket with AI-powered analysis and a performance-backed token on Base. Trade real markets, build a track record, and let the buyback flywheel run.
Get cryptocurrency token price and generate candlestick charts via CoinGecko API or Hyperliquid API. Use when user asks for token price, crypto price, price chart, or cryptocurrency market data.
Query Polymarket prediction markets - check odds, trending markets, search events, track prices and momentum. Includes watchlist alerts, resolution calendar,...