Back to Skills

quick-stats

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.

188stars44forksUpdated 8/13/2026

Security Assessment

Safe(95/100)
Security Score95/100

About quick-stats

This skill generates a quick, inline backtest for a single symbol using a default EMA 10/20 crossover strategy and prints a compact statistics summary, without creating any files. It solves the friction of standing up a full backtesting script when a trader just wants fast, readable performance numbers for an instrument, ready to paste into a Jupyter cell or run as a script.

The skill produces a single code block that fetches price data from OpenAlgo (with DuckDB or yfinance as fallbacks), computes the EMA 10/20 crossover using OpenAlgo's ta module by default (only using TA-Lib if the user explicitly asks), cleans entry/exit signals with ta.exrem() after fillna(False), and applies Indian delivery-equity fee assumptions (0.111% plus Rs 20 per order). It fetches a NIFTY benchmark, then prints total return, Sharpe and Sortino ratios, max drawdown, win rate, profit factor, and trade count alongside benchmark return and alpha. It also explains each metric in plain language for non-expert traders and renders an equity-curve plot with Plotly using a dark template. Arguments let the user set symbol, exchange, and interval, defaulting to SBIN / NSE / daily.

It targets retail and algorithmic traders, particularly in Indian equity markets, who use the VectorBT and OpenAlgo stack and want a fast strategy sanity check or benchmark comparison. It is intentionally narrow: one default strategy, inline output only, no persisted artifacts.

FAQ

What strategy does it backtest by default?

An EMA 10/20 crossover, computed with OpenAlgo's ta module. TA-Lib is only used if the user explicitly asks for talib/TA-Lib.

Where does it get price data?

From OpenAlgo by default, with DuckDB (if the user provides a DB path) or yfinance as fallbacks. The NIFTY benchmark is fetched via OpenAlgo using symbol NIFTY and exchange NSE_INDEX.

What fee assumptions does it use?

Indian delivery-equity fees of 0.111% plus a fixed Rs 20 per order (fees=0.00111, fixed_fees=20).

Does it create files?

No. It intentionally outputs a single code block for inline use in a notebook cell or console and prints results directly, without writing any files.

What metrics does it report?

Total return, Sharpe and Sortino ratios, max drawdown, win rate, profit factor, and total trades, plus the NIFTY benchmark return and alpha, followed by a Plotly equity-curve plot.

Install quick-stats

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill