UpdateStock A-Share Local Database
Paste the following prompt into your AI chat to install this skill:
Please install @user_7641c221/update-stock-data into your AI assistant by following https://skillhub.cn/install/skillhub.md.
About this skill
Problem
A-share market data is often scattered across APIs, ad hoc scripts, and local files, making it hard to build a reusable local database for analysis. UpdateStock narrows this to one stdio MCP service for managing a DuckDB database of A-share market data. It creates, updates, and queries structured tables such as stock, stock_basic, stock_factor, stock_forecast, stock_dividend, and stock_report, and provides a data path for QuantAll.
How It Works
- It exposes tools such as
ping,Creat_DB,Update_Stock_Data,get_stock, andget_adj_stock, while reading configuration fromDB_setting.jsonandAPI_tushare.txtinstead of accepting repeated path or token arguments. - Full updates run through seven stages: index data, daily quotes, basic information, market factors, forecasts, dividends, and financial reports. Stage 7 uses a heartbeat mechanism to report progress and ETA.
- Querying supports unadjusted or forward-adjusted quotes by symbol and date range, returning
YYYY-MM-DDdates in JSON for downstream plotting and analysis. - For QuantAll,
Start_QuantAllandSet_QuantAll_DataBaselaunch the local HTTP MCP service and write the selected database path.
Boundaries
- Full financial updates require sufficient tushare access; the easy mode covers index and daily quote data but not the complete set of tables.
Test.duckdbis only for connectivity checks; production use should create a separate database to avoid overwriting the test schema.- QuantAll is an external dependency: first launch needs a user-agreement confirmation and MCP reconnection, and some update stages can be slow, so they should not be interrupted.
Use Cases
- Build a local quote database for backtesting by creating DuckDB and filling index/daily data.
- Fetch forward-adjusted daily quotes for a symbol in a date range and feed a plotting script.
- Prepare a data source for QuantAll by setting the database path and starting the local HTTP MCP service.
- Use a low-tier API to update only index and daily quotes for a basic OHLCV database.
Best For
- Local quant researchers who need A-share daily, factor, and report data in one DuckDB query path.
- AI agent developers who need stdio MCP tools to create, update, and query a local stock database.
- QuantAll users who need a compatible local market-data source and an HTTP MCP startup entry point.
- Data engineering assistants who need tushare/baostock data in configurable DuckDB table mappings.
Related Skills
Analyzes smart customer-service chat logs with semantic clustering to generate word clouds, Top K frequent questions, and personalized guess-you-ask recommendations.
Maps natural-language Reddit requests to KeyAPI REST workflows, validates endpoint contracts against official docs, and executes search, detail, comment, ranking, and report tasks.
Schedules fetching from NEP and custom academic sites, filters and ranks papers by keywords, generates Chinese summaries, and pushes Feishu cards with local download archiving.
Browser-based CSV/TXT visualizer with multi-Y-axis curves, smoothing, and PNG/JSON/CSV export.