trading

Query offline DuckDB via MCP tools to generate and upsert a daily stock trading decision.

11|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/xueqingpeng/trading-analysis --skill trading-xueqingpeng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trading
Source: https://github.com/xueqingpeng/trading-analysis/tree/main/.claude/skills/trading
Command: npx skills add https://github.com/xueqingpeng/trading-analysis --skill trading-xueqingpeng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, numpy, pandas, pandas_ta, fastmcp, pydantic, and includes scripts (resource) components.

What problem does it solve?

This skill provides an automated, single-day trading decision for one stock on a specified target date by querying an offline DuckDB via MCP tools, then upserting the result into an action-list JSON file for traceability.

Core Features & Use Cases

  • Deterministic, one-date decision: queries prices, news, and optional filings via the MCP server to decide BUY/SELL/HOLD for a given symbol and date.
  • Dual-mode operation: supports backtesting by looping historical dates and live trading by using the latest available date.
  • Output integrity: records the decision in a JSON action-list with start/end dates and a single per-date entry for auditability.

Quick Start

Trade AAPL on 2025-03-05 to generate and upsert a single daily trading decision.

Frequently Asked Questions about trading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate a single daily stock trading decision using historical data?

To automate a daily stock trading decision, this skill queries an offline DuckDB database via MCP tools to fetch historical prices, news, and optional filings, then upserts a single BUY, SELL, or HOLD decision into a JSON action list for the specified date.

Can I use DuckDB and MCP tools for backtesting replay over historical dates?

Yes, you can use this setup for backtesting replay by looping over historical dates to query offline DuckDB data, applying the same single-date decision logic used in live trading to evaluate past stock performance.

How does the trading decision process handle market news and SEC filings?

The trading decision process handles market news and SEC filings by using MCP tools like list_news and get_filing_section to retrieve textual data from the offline DuckDB, integrating this information into the final BUY, SELL, or HOLD action.

Do I need pandas and pandas_ta to generate stock trading actions?

You need pandas and pandas_ta dependencies to process historical stock prices and compute technical indicators, which feed into the automated trading decision generated for the target date.

What is the best way to record automated trading decisions for traceability?

The best way to record trading decisions for traceability is upserting the single per-date entry into a JSON action list, ensuring each BUY, SELL, or HOLD action has start and end dates for a complete audit trail.

How do I check if a specific date is a trading day before generating a stock decision?

You check if a specific date is a trading day by calling the is_trading_day MCP tool, which queries the offline DuckDB to verify market availability before executing the single daily stock trading decision.