AugmentClaude

Quick Stats

Generate backtest statistics for a stock symbol using an EMA crossover strategy.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/quick-stats-marketcalls/ — the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Quickly fetch data and print key backtest stats for a symbol with a default EMA crossover strategy. No file creation needed - runs inline in a notebook cell or prints to console.

What this skill does

Generate a quick inline backtest and print stats. Do NOT create a file - output code directly for the user to run or execute in a notebook.

Arguments

  • $0 = symbol (e.g., SBIN, RELIANCE). Default: SBIN
  • $1 = exchange. Default: NSE
  • $2 = interval. Default: D

Instructions

Generate a single code block the user can paste into a Jupyter cell or run as a script. The code must:

  1. Fetch data from OpenAlgo (or DuckDB if user provides a DB path, or yfinance as fallback)
  2. Use OpenAlgo ta for EMA 10/20 crossover by default (never VectorBT built-in); only use TA-Lib if the user explicitly says "talib"/"TA-Lib"
  3. Clean signals with ta.exrem() (always .fillna(False) before exrem)
  4. Use Indian delivery fees: fees=0.00111, fixed_fees=20
  5. Fetch NIFTY benchmark via OpenAlgo (symbol="NIFTY", exchange="NSE_INDEX")
  6. Print a compact results summary:
Symbol: SBIN | Exchange: NSE | Interval: D
Strategy: EMA 10/20 Crossover
Period: 2023-01-01 to 2026-02-27
Fees: Delivery Equity (0.111% + Rs 20/order)
-------------------------------------------
Total Return:    45.23%
Sharpe Ratio:    1.45
Sortino Ratio:   2.01
Max Drawdown:   -12.34%
Win Rate:        42.5%
Profit Factor:   1.67
Total Trades:    28
-------------------------------------------
Benchmark (NIFTY): 32.10%
Alpha:           +13.13%
  1. Explain key metrics in plain language for normal traders
  2. Show equity curve plot using Plotly (template="plotly_dark")

Example Usage

/quick-stats RELIANCE /quick-stats HDFCBANK NSE 1h

Related skills