About trade-karne
Trade-Karne is a deterministic scorecard skill for evaluating trading quality from equity curves and trade logs. It grades results, realized trade growth, and process discipline without LLM calls or external dependencies.
Key features
- 01Three-axis weekly trading score
- 02Risk-adjusted return metrics
- 03Trade quality and R-multiple analysis
- 04Process discipline penalties
- 05SQLite, CSV, and dict inputs
- 06CLI scoring and postmortems
Use cases
- 01Reviewing weekly trading performance
- 02Comparing multiple trader books
- 03Identifying idle-cash or discipline issues
- 04Analyzing post-trade behavior tags
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ kardi34/ trade-karne --skill trade-karneAfter installing, type/trade-karnein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.gitignoreLICENSEREADME.mdbin/test-all.shbot/README.md.env.examplealpaca_router.pyalerts.pycapitol.pycommands.pycouncil_weekly.pyconfig.jsoncosts.pydatasource.pybot/agents/breakout.jsonpolitician.jsonbist.jsonpolygon-us.jsonbot/ctl/.gitkeepbot/deploy/com.kardi.skill-scout.plistcom.kardi.trade-agent-bist.plistcom.kardi.trade-agent-polygon-us.plistcom.kardi.trade-agent-breakout.plistcom.kardi.trade-agent-politician.plistcom.kardi.trade-barbar.plistcom.kardi.trade-analyze.plistcom.kardi.trade-council-weekly.plist.draftcom.kardi.trade-bot.plistcom.kardi.trade-router.plistcom.kardi.trade-daily.plistDetails
From the project READMETrade-Karne — Deterministic Trading Scorecard
What This Does
Trade-Karne grades your trading operation with a single weekly score — not just "did equity go up," but did you trade well. It computes a 3-axis Karne (report card) from your equity curve and trade log:
- Result (40%) — Risk-adjusted return: Sharpe, Sortino, Calmar, max drawdown, alpha vs benchmark
- Growth (30%) — Realized trade quality: equity change, profit factor, win rate, expectancy, average R-multiple from actual fills
- Process (30%) — Discipline: R:R logging rate, capability progress, lessons written — minus penalties for idle cash, blind runs, and consecutive losses
The score is pure math — zero LLM tokens, zero API calls, zero external dependencies. It reads your existing ledger (SQLite, CSV, or in-memory dicts) and produces a JSON payload and a human-readable English report.
When to Use It
Use this skill when you want to:
- Build a trading quality-control system with measurable weekly grades
- Set up anti-stall guardrails that detect "standing still" (idle cash piling up)
- Implement a weekly scorecard across multiple trader books or personas
- Run post-trade analysis with deterministic MAE/MFE and behavioral tagging
- Get an honest assessment of whether your returns are luck or skill
When NOT to Use
This skill does NOT handle:
- Live order execution or broker integration — it's read-only analysis
- Real-time risk management — it's a weekly/periodic score
- Portfolio optimization or allocation decisions — it measures, doesn't prescribe
How to Use
Quick Start (Python API)
from trade_karne import DictDataSource, load_book_input, compute_book_karne, render_report_en
ds = DictDataSource({
"equity_series": [10000, 10100, 10250, 10400],
"cash": 1000,
"hwm": 10400,
"trade_pnls": [120, -50, 200],
"trade_rs": [2.0, -1.0, 2.5],
})
inp = load_book_input(ds, "momentum", lessons_count=3)
karne = compute_book_karne(inp)
print(render_report_en(karne, [karne], week="2026-W26", generated_at="today"))
CLI
trade-karne score --db trades.db --book momentum
trade-karne postmortem --db trades.db --book momentum --out-dir ./reports
trade-karne metrics --list
Plug Into Your Existing System
Implement TradeDataSource (7 methods) and pass it to load_book_input(). The
Karne never touches your files or DB directly — it only calls those 7 methods.
See workflows/integration.md for a step-by-step guide.
Validation
After running a score:
- Verify the Process axis — if it's below 40, idle cash or blind runs are dragging you down
- Check the rolling Sharpe trends — a declining trend means skill is degrading
- Run the postmortem and look for tag clusters (e.g., many
premature_entrytags mean entries need tightening) - Compare Result axis across books — large variance means some personas need rebalancing or rethinking