How it works

From a broker .xlsx export to a full trading journal in under a minute. Here's what happens behind the scenes.

01

Upload your trades

Go to any supported broker — INDmoney, Groww, Zerodha, or Motilal Oswal — and download your transaction history as a .xlsx file. Drop it into Khaata.

We parse both Equity and F&O sheets from a single file. Rows 0–5 (broker metadata) are skipped, headers start at row 6. Only transactions with Order Status = Executed are imported — pending, cancelled, and rejected orders are ignored.

trades.xlsx
147 transactions parsed
02

FIFO matching

This is the core of Khaata. Your transactions are grouped by symbol, then each BUY is matched against SELLs using First-In, First-Out (FIFO) — the same method used for tax calculation in India.

The key challenge is partial fills. If you bought 50 shares and later sold 60, the sell needs to consume the first buy entirely and bite into the next one. Khaata handles this automatically.

Example — RELIANCE

Buy queue (chronological)

DateQtyPrice
12 Jan50₹142.30
28 Jan30₹138.50
14 Feb20₹145.00

Sell orders

DateQtyPrice
10 Mar60₹155.20
22 Mar25₹160.00
FIFO match

Matched trades

EntryExitQtyP&L
12 Jan @ ₹142.3010 Mar @ ₹155.2050+₹645
28 Jan @ ₹138.5010 Mar @ ₹155.2010+₹167
28 Jan @ ₹138.5022 Mar @ ₹160.0020+₹430
14 Feb @ ₹145.0022 Mar @ ₹160.005+₹75
14 Feb @ ₹145.0015OPEN

What happened here:

  • 1.The first sell (60 shares) consumed all 50 from the 12 Jan buy, then 10 from the 28 Jan buy. That's the partial fill — one sell split across two buys.
  • 2.The second sell (25 shares) consumed the remaining 20 from 28 Jan, then 5 from the 14 Feb buy.
  • 3.15 shares from the 14 Feb buy have no matching sell yet — they become an OPEN trade.
03

Preview & confirm

Before anything is saved, you see every matched trade in a preview table. Check the numbers, review partial fills, see which positions are still open. When you're satisfied, hit import.

Khaata also checks for duplicate files — if you've already imported a file with the same name, it'll warn you. No accidental double imports.

04

Analyze everything

Once your trades are imported, the full analytics suite kicks in. Every metric is computed from your actual trade history — no estimates, no approximations.

P&L & Win Rate

Gross and net P&L per trade, overall win rate, profit factor, and average gain vs average loss — broken down by Equity and F&O.

Calendar Heatmap

See your daily P&L on a calendar. Green days, red days, and the patterns in between. Instantly spot which days of the week or month you trade best.

Drawdown Analysis

Track your worst losing streaks — max drawdown, current drawdown, and recovery time. Know the real risk you're taking.

Kelly & Monte Carlo

Kelly criterion tells you how much to bet. Monte Carlo simulations stress-test your strategy across thousands of random scenarios. Both use your actual trade history.

Open vs Closed trades

CLOSED

A buy that has been fully matched with a sell. P&L is realized and final. These drive all your analytics — win rate, profit factor, drawdowns.

OPEN

A buy with no matching sell yet — you still hold these shares. They appear in your journal but don't count toward P&L metrics until closed by a future import.