Skip to content
cccskills
FreePublished on GitHub

a-share-runtime-data-access

Retrieve locally stored Chinese A-share prices, financial statements, and valuation context through the project's shared interfaces. Look up technical indicators, inspect available data fields, and check data dates when results disagree.

OriginalShow the original description

Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.

See how to install

Good for

  • Checking a stock's prices and valuation context
  • Retrieving financial data across reporting periods
  • Looking up technical indicators and their data dates
  • Inspecting available local data fields

Files included (1)

  • SKILL.md6.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

A-share Runtime Data Access

Use this skill when the user asks for A-share local data retrieval, quote lookup, financial period lookup, valuation context building, technical indicator lookup, or schema inspection through the project's public runtime interfaces and local tools.

Scope

  • Only handle A-share data in this workflow.
  • Do not switch to multi-market logic unless the user explicitly changes scope.
  • Prefer the project's public runtime interfaces over direct database access.

First Read

Before fetching data, read these documents in order:

  1. docs/design/runtime-interfaces/skill-runtime-overview.md
  2. docs/design/runtime-interfaces/local-data-access-design.md
  3. docs/design/runtime-interfaces/project-access-and-governance.md

If you need concrete function signatures or allowed collections, then read:

  1. core/skill_runtime/data_access.py
  2. core/skill_runtime/project_access.py
  3. core/skill_runtime/catalog.py

Runtime Rules

  • Prefer core.skill_runtime.data_access for business-semantic data access.
  • Use core.skill_runtime.project_access only when helper functions are insufficient or when inspecting schema / field coverage.
  • Do not create MongoClient or import pymongo directly.
  • Do not bypass core.skill_runtime by reading lower-level provider or database modules unless the user explicitly asks for code archaeology.
  • For technical analysis, prefer the project's local technical tools and materialized snapshots over ad hoc indicator calculation.

Preferred Helpers

For common A-share tasks, prefer these helpers first:

  1. get_stock_basic_info(symbol)
  2. get_market_quotes(symbol)
  3. get_latest_stock_price(symbol)
  4. get_stock_daily_quotes(symbol, start_date, end_date)
  5. get_stock_financial_periods(symbol)
  6. get_stock_financial_data(symbol)
  7. get_stock_valuation_context(symbol)
  8. get_stock_news(symbol)
  9. query_stock_collection(collection, ...)
  10. inspect_stock_collection_schema(collection, ...)

For technical-analysis tasks, prefer these entry points first:

  1. core.tools.implementations.market.technical_factor_bundle_tool.get_technical_factor_bundle_tool
  2. core.tools.implementations.market.technical_indicators.get_technical_indicators

Use the factor bundle first when the user needs structured MA20, RSI14, KDJ, or MACD values. Use get_technical_indicators only when the user wants a readable technical-analysis report rather than a structured factor payload.

When checking freshness or explaining discrepancies, inspect these components in order:

  1. stock_technical_indicators latest trade_date
  2. market_quotes latest trade_date
  3. app/services/technical_indicator_materialization_service.py
  4. app/main.py technical indicator materialization job configuration

How To Execute In Embedded Nanobot

The embedded nanobot runtime does not expose core.skill_runtime as a first-class tool yet. When you need actual data, do this:

  1. Read the design docs and target runtime module.
  2. If the goal is only validation, inspection, or one-time probing, write a short temporary Python script under temp/.
  3. Run the script with C:\TradingAgentsCN\env\Scripts\python.exe using the exec tool.
  4. Summarize the returned data clearly for the user.

Do not treat a temp/*.py script as the final artifact when the logic is clearly reusable. If the requested logic is parameterizable and should work for other stocks or other future runs, use the temp script only as a short validation probe and then promote the implementation into a reusable skill.

For technical-analysis tasks in embedded nanobot, use this execution pattern:

  1. If the user wants structured technical values, call get_technical_factor_bundle_tool from a temp script.
  2. If the user wants a textual technical interpretation, call get_technical_indicators from a temp script.
  3. If the tool result conflicts with price data, compare stock_technical_indicators.trade_date against market_quotes.trade_date before concluding there is a bug.

For embedded runtime work, apply this boundary:

  1. use temp scripts for fast verification and data access that the runtime does not yet expose directly
  2. if the output is becoming a named reusable capability, convert it into a skill instead of leaving it in temp/
  3. if the task is still exploratory and the reusable shape is not yet confirmed, say that explicitly

Windows Execution Rule

On Windows, do not rely on inline python -c snippets for runtime verification. Prefer writing a temporary .py file and then executing it. This avoids quoting and shell-expansion issues.

Minimal Script Pattern

from pathlib import Path
import sys

repo = Path(r"C:\TradingAgentsCN")
sys.path.insert(0, str(repo))

from core.skill_runtime.data_access import get_stock_basic_info

data = get_stock_basic_info("600519")
print(data)

Helper Selection Guide

  • If the user asks for one stock's snapshot, start with get_stock_basic_info or get_stock_valuation_context.
  • If the user asks for multi-period fundamentals, start with get_stock_financial_periods.
  • If the user asks for technical indicators, start with get_technical_factor_bundle_tool.
  • If the user asks for a prose-style technical reading, use get_technical_indicators after confirming the requested date range.
  • If the user asks for local collection availability or fields, start with inspect_stock_collection_schema.
  • If the user asks for a direct collection sample, use query_stock_collection only after confirming the collection is publicly exposed in catalog.py.

Response Expectations

  • State which runtime interface you used.
  • If data is empty, state whether the helper returned no records or the collection/helper is not exposed.
  • When validation fails, report whether the problem is instruction gap, interface usage error, or missing underlying data.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Retrieve financial data through natural language queries, including Chinese A-share stocks, funds, futures, company financials, and economic indicators. The skill calls a Python script and presents key results as concise summaries and tables.

  • Checking stock prices and daily market data
  • Retrieving recently disclosed revenue and profit
  • Comparing prices across stocks
hsliuping/TradingAgents-CN32.4KUpdated Sep 22, 2026

Search financial news, industry developments, and company sentiment using natural-language questions. Retrieve related headlines, summaries, sources, and article links through a Python script, with optional date ranges to focus the search on a specific period.

  • Finding financial news related to a question
  • Researching market and industry developments
  • Checking news and public sentiment about a company
hsliuping/TradingAgents-CN32.4KUpdated Sep 22, 2026

Design and generate agents in Nanobot by finding reusable tools, skills, prompts, and existing agent configurations. Guide requirements and confirmation, create focused agent assets, and follow recorded real-data testing and evaluation before publication.

  • Designing an agent around existing project resources
  • Adapting existing agent configurations and prompts
  • Identifying missing tools and calculation capabilities
hsliuping/TradingAgents-CN32.4KUpdated Sep 22, 2026

Investigate and fix agent behavior in TradingAgentsCN by checking active database prompt templates, prompt assembly code, and output processing. Apply targeted changes and verify them with focused tests, template checks, and workflow logs.

  • Investigating prompt changes that do not affect runtime behavior
  • Synchronizing database templates with prompt assembly code
  • Tracing incorrect dates or price references in position analysis
hsliuping/TradingAgents-CN32.4KUpdated Sep 22, 2026

Estimate the distribution of stockholders' purchase costs for Chinese A-share stocks using price and volume data. A triangular model produces cost concentration metrics, the estimated share below the current price, and visualization charts.

  • Examining estimated purchase cost distributions for Chinese A-share stocks
  • Checking the estimated share of holdings below the current price
  • Identifying price ranges with concentrated holdings
hsliuping/TradingAgents-CN32.4KUpdated Sep 22, 2026

See all skills by hsliuping

Report a problem with this skill