$npx -y skills add marketcalls/vectorbt-backtesting-skills --skill quick-statsQuickly 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.
| 1 | 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. |
| 2 | |
| 3 | ## Arguments |
| 4 | |
| 5 | - `$0` = symbol (e.g., SBIN, RELIANCE). Default: SBIN |
| 6 | - `$1` = exchange. Default: NSE |
| 7 | - `$2` = interval. Default: D |
| 8 | |
| 9 | ## Instructions |
| 10 | |
| 11 | Generate a single code block the user can paste into a Jupyter cell or run as a script. The code must: |
| 12 | |
| 13 | 1. Fetch data from OpenAlgo (or DuckDB if user provides a DB path, or yfinance as fallback) |
| 14 | 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" |
| 15 | 3. Clean signals with `ta.exrem()` (always `.fillna(False)` before exrem) |
| 16 | 4. Use **Indian delivery fees**: `fees=0.00111, fixed_fees=20` |
| 17 | 5. Fetch **NIFTY benchmark** via OpenAlgo (`symbol="NIFTY", exchange="NSE_INDEX"`) |
| 18 | 6. Print a compact results summary: |
| 19 | |
| 20 | ``` |
| 21 | Symbol: SBIN | Exchange: NSE | Interval: D |
| 22 | Strategy: EMA 10/20 Crossover |
| 23 | Period: 2023-01-01 to 2026-02-27 |
| 24 | Fees: Delivery Equity (0.111% + Rs 20/order) |
| 25 | ------------------------------------------- |
| 26 | Total Return: 45.23% |
| 27 | Sharpe Ratio: 1.45 |
| 28 | Sortino Ratio: 2.01 |
| 29 | Max Drawdown: -12.34% |
| 30 | Win Rate: 42.5% |
| 31 | Profit Factor: 1.67 |
| 32 | Total Trades: 28 |
| 33 | ------------------------------------------- |
| 34 | Benchmark (NIFTY): 32.10% |
| 35 | Alpha: +13.13% |
| 36 | ``` |
| 37 | |
| 38 | 7. **Explain** key metrics in plain language for normal traders |
| 39 | 8. Show equity curve plot using Plotly (`template="plotly_dark"`) |
| 40 | |
| 41 | ## Example Usage |
| 42 | |
| 43 | `/quick-stats RELIANCE` |
| 44 | `/quick-stats HDFCBANK NSE 1h` |