Markets Engineer Kit
Three skills for engineers who build and check market systems. Backtest Honesty Auditor checks a strategy for look-ahead, survivorship and cost mistakes and gives a TRUST / FIX / DISCARD verdict with Indian costs. Kafka Spring Production Reviewer finds the bugs that lose or duplicate messages in Java, Spring Boot and Kafka services. NSE/BSE Research Desk builds a sourced dossier on any Indian listed company, with a citation behind every number. You own each skill on its own; together they cost less than buying them one by one.
Works with any agent that signs in to Agensi, such as Claude, ChatGPT, Claude Code, Cursor and Codex CLI.
One payment, lifetime access. 3 skills unlock instantly in your library.
What's included
3 skillsPaste a strategy, backtest code or results and get a skeptical audit: look-ahead, survivorship, repainting, fills and slippage, overfitting and sample size, plus Indian costs (STT, brokerage, exchange, GST, SEBI, stamp duty) from an offline, dated cost model. Ends in TRUST, FIX or DISCARD.
A production review for Java 21, Spring Boot and Kafka code. It finds the bugs that lose, duplicate or stall messages: offset commits, idempotency, retries and DLT, outbox, exactly-once myths, poison pills, rebalances and virtual threads. Severity-ranked findings, each with a fix and a test.
Name one Indian listed company and get a research dossier from public web pages: business, five years of financials, shareholding and promoter pledges, filings, a 21-point red-flag screen and a valuation range. Every number carries a citation you can open. Research, not advice.
See it in action
Backtest Honesty Auditor: Bias, India Costs, Verdict
Example session with this skill installed
Can you sanity-check this backtest before I trade it? NIFTY 15-minute opening range breakout, buying options. The numbers below are illustrative, from a quick test.
Rules: the opening range is the high and low of 09:15-09:30. After 09:30, if a 5-minute bar breaks above the range high, buy the ATM call; below the range low, buy the ATM put. One trade a day. Stop: spot back inside the range. Target: 2x the range width on spot. Otherwise exit at 15:20. Size: 1 lot (75 units).
Backtest (illustrative): Jan 2024 to Dec 2025, 480 trades, 41% win rate, gross P&L Rs 1,48,800 (Rs 310 per trade), max drawdown Rs 22,000. No costs or slippage. I tried range lengths of 5, 10, 15, 20, 30 and 45 minutes; 15 was best.
Core of the code (pandas, 5-minute bars):
or_hi = day.between_time("09:15", "09:25")["high"].max()
or_lo = day.between_time("09:15", "09:25")["low"].min()
for t, bar in day.between_time("09:30", "15:15").iterrows():
if bar.high > or_hi:
side = "CE"; entry_spot = or_hi
break
if bar.low < or_lo:
side = "PE"; entry_spot = or_lo
break
strike = round(day["close"].iloc[-1] / 50) * 50
opt = options[(options.strike == strike) & (options.type == side)]
entry_px = opt.loc[t, "close"]
# walk forward bar by bar; if a bar hits both stop and target, take target
exit_px = simulate_exit(opt, spot, t, stop=..., target=..., tie="target")
pnl = (exit_px - entry_px) * 75
- Read your context and instructions
- Compiled the backtest honesty auditor
Verdict: FIX. Don't trade it yet. Two bugs in the code mean the Rs 310 per trade gross isn't a real number yet. Even if it were, costs and slippage cut it to about
Rs 90–165 net per trade (estimate), which is
29–54% of gross. That's thin enough that fixing the bugs could leave no edge at all. All the P&L figures here are your illustrative ones, not real results.
Findings
| # | Check | Status | Evidence | Impact |
|---|---|---|---|---|
| 1 | Look-ahead | Blocker | strike = round(day["close"].iloc[-1] / 50) * 50 | This picks the strike from the day's last close, which isn't known at entry. On days that trend, you're effectively buying the strike the day ended at. The result can't be used until the strike comes from spot at time t. The size and direction of the error can't be known without a rerun. |
| 1b | Look-ahead | Major | tie="target" | When one bar hits both stop and target, the backtest assumes the target came first. With no 1-minute data, the honest assumption is the stop. Rerun with tie="stop". |
| 1c | Look-ahead | Unknown | entry_px = opt.loc[t, "close"] together with simulate_exit(..., t, ...) | You fill at the close of the breakout bar. That's fine only if simulate_exit starts at bar t+1. If it checks bar t's own high and low, it's using prices from before your fill. |
| 1d | Data bug | Blocker (likely) | options[(options.strike == strike) & (options.type == side)] | There's no expiry filter. If your options data covers more than one expiry, opt.loc[t, "close"] returns several rows or the wrong contract. Filter to the nearest weekly expiry, with a rule for expiry day. |
| 1e | Logic bug | Minor/Unknown | the for … break loop | side and t are never reset each day. On a day with no breakout, the loop runs to the end and leaves t at 15:15, and side is stale from the previous day or undefined. So it may "trade" days that had no signal. 480 trades in about 495 sessions is very high for a breakout rule. Count how many days actually broke out. Also, a bar that breaks both sides always goes to CE, because the high test runs first. |
| 2 | Survivorship | Clear | Single index (NIFTY) | Survivorship bias doesn't apply to one index. |
| 3 | Repainting | Clear, with a condition | between_time("09:15","09:25") on 5-minute bars | This is correct if bars are labelled by start time: the 09:15, 09:20 and 09:25 bars cover 09:15–09:30. If your bars are labelled by end time, the range is off by one bar. Check your data vendor's convention. |
| 4 | Fills | Major | entry_spot = or_hi, and option filled at bar close | There's no slippage, and fills use the last traded price rather than ask to buy and bid to sell. Breakouts in the first hour are when spreads and market-order slippage are worst. Your spot stop and target also count from or_hi, but the real fill is wherever spot was at the bar's close, often well past or_hi. So the recorded risk and reward don't match the trades you'd actually get. |
| 5 | Overfitting | Major | "tried 5, 10, 15, 20, 30, 45; 15 was best" | You tried 6 range lengths, reported the best, and have no out-of-sample test. The stop and target multiple were probably chosen by eye too. You didn't say whether 10 and 20 minutes were also profitable. |
| 6 | Costs | Major (close to blocker) | "No costs or slippage" | At current rates, charges plus slippage take 47–71% of gross. See the cost check below. |
| 7 | Sample and regime | Major | Fixed 75 units across Jan 2024 to Dec 2025 | 480 trades is enough to judge from. But the contract changed during the test. The NIFTY lot was 25 until late 2024 and 75 after. It has been revised again since (I believe to 65, but check the current NSE lot size). Weekly expiries were also cut back and the expiry day moved. So rupee P&L at a fixed 75 is misleading. Report points per unit, split by year and by expiry or non-expiry day. |
Cost check
I ran scripts/india_costs.py, with rates checked 2026-11-07. These include the 2026-04-01 STT increase to 0.15% of options sell premium.
Typical trade
(assumed): buy at a premium of Rs 120 and sell at Rs 124.13, which reproduces your Rs 310 gross on 75 units.
| Per trade | Slippage Rs 0.5/unit/side (assumed) | Slippage Rs 1.0/unit/side (assumed) |
|---|---|---|
| Charges (Rs 40 brokerage, Rs 13.96 STT, Rs 6.51 exchange, Rs 8.37 GST, other) | Rs 69.13 | Rs 69.13 |
| Slippage | Rs 75 | Rs 150 |
| Total cost | Rs 144 | Rs 219 |
| Net per trade | Rs 166 | Rs 91 |
| Net over 480 trades | Rs 79,616 | Rs 43,616 |
| Costs as share of gross | 46.5% | 70.7% |
The breakeven move is Rs 1.9–2.9 per unit of premium. Rs 1/side is a realistic floor for market orders on a breakout. It also matters that the costs are certain while the gross isn't, because the gross is still distorted by the strike look-ahead and tie="target".
Fix list (in this order)
Pick the strike from spot at entry. Use strike = round(spot.loc[t, "close"] / 50) * 50, and select the
nearest weekly expiry explicitly. Assert that opt has exactly one row per timestamp.
2.
Reset side and t at the start of every day, and skip days with no breakout. Then check how many trades remain.
3.
Make fills honest. Enter at the next bar's open, start simulate_exit at t+1, and set tie="stop". If your data has bid/ask, buy at the ask and sell at the bid. If not, add at least Rs 1 per unit per side.
4. Add costs with the script, at the STT rate in force on each trade date.
5.
Out-of-sample test. Keep the 15-minute range fixed and run it once on data you haven't looked at, for example Jan–Oct 2026. Also show results for 10, 15 and 20 minutes side by side. If you want a plateau rather than a single lucky peak, all three should be profitable.
6.
Report points per unit, and break results down by year and by expiry or non-expiry day. Show P&L without the top 5 trades and the longest losing streak.
What would change the verdict
To TRUST: after fixes 1–4, net per trade stays clearly positive. As a rough bar, more than about Rs 100 after Rs 1/side slippage, with 10, 15 and 20 minutes all profitable. It must also hold up out of sample in 2026 with at least about 100 trades, and the profit shouldn't depend on the top 5 days. Even then, TRUST means paper trade or start with one lot, not "safe".
To DISCARD: after the strike and expiry fixes and the honest tie rule, net is zero or negative, or the 2026 holdout loses money.
Paper trading at one lot is fine to start any time. Opening-range breakout on NIFTY is a reasonable idea to test. This is the honest version of the backtest you need before putting money on it.
The rates are current as of today (2026-11-07). Recheck them if you rerun later. This is an engineering audit of the backtest, not investment advice.
The cost model's real output for the Rs 0.5 slippage case:
Round trip: options long, qty 75, entry 120 -> exit 124.13
Rates as of 2026-11-07 (NSE; run --rates for sources)
turnover Rs 18,309.75
brokerage Rs 40.00
stt Rs 13.96
exchange_txn Rs 6.51
ipft Rs 0.00
sebi_fee Rs 0.02
stamp_duty Rs 0.27
gst Rs 8.37
charges total Rs 69.13
slippage Rs 75.00
COST PER TRADE Rs 144.13
gross P&L Rs 309.75
net P&L Rs 165.62
break-even move Rs 1.92 per unit
cost / entry value 1.601%
Over 480 trades:
total cost Rs 69,183.69 (charges Rs 33,183.69, slippage Rs 36,000.00)
gross P&L Rs 148,800.00
NET P&L Rs 79,616.31
per trade gross Rs 310.00, net Rs 165.87
costs eat 46.5% of gross
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads these skills and uses them on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every skill in this bundle goes through our trust checks.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.