Skip to content

Algo Trading

That Annoying PnL Mismatch Between You and Your Broker — Explained Simply

3 November 20255 min readAlgo Trading
FabTrader author portrait

FabTrader

Article overview

Ever noticed your broker’s PnL showing a completely different number from what your trading strategy says? You’re not alone. Many traders face this puzzling mismatch — especially when running multiple strategies on the same account. Here’s what’s really happening behind those numbers, and why it’s nothing to worry about.

If you’ve been running multiple trading strategies in one account either using Algo or using manual tracking spreadsheets, you’ve probably faced this head-scratcher at least once:

“Why does my broker show a completely different PnL than what I calculated for my strategy?”

You’re not alone — this is one of the most common (and confusing) questions traders ask once they start managing multiple systems. It often happens when different strategies buy and sell the same stock at different times, and suddenly your internal calculations don’t line up with what your broker reports.

Let’s break it down and see why this mismatch is not only normal but nothing to worry about in the long run.

The Scenario: When Strategies Overlap

Imagine you’re running two different trading strategies — let’s call them Strategy A and Strategy B. Both end up buying the same stock, but at different times and prices.

TradeStrategyBuy DateQuantityBuy Price1Strategy AJan 1100₹1002Strategy BJan 10100₹120

Now suppose on January 20, Strategy B hits its target and sells 100 shares at ₹130.

The Broker’s Version: FIFO (First-In, First-Out)

Here’s where things get interesting.

Your broker (by law and regulation) must calculate all sales using the FIFO method — First-In, First-Out. That means, regardless of which strategy sold the shares, the broker assumes that the oldest shares are sold first.

So, in the broker’s books:

  • The first 100 shares bought on Jan 1 at ₹100 are considered sold.
  • Selling price = ₹130
  • Profit = ₹30 per share × 100 shares = ₹3,000

According to your broker, you just made ₹3,000.

Your Version: Strategy-Level PnL

But from your perspective, Strategy B bought the shares at ₹120 and sold them at ₹130.

That’s a profit of ₹10 per share × 100 shares = ₹1,000.

You can already see the mismatch. The broker says you made ₹3,000. Your strategy says you made ₹1,000.
Who’s right?

The Surprising Truth: Both Are Correct

It might sound contradictory, but both numbers are technically correct — they’re just being measured from different lenses.

  • The broker’s PnL is based on accounting and taxation rules. FIFO ensures there’s a consistent, legally compliant way to determine cost basis for all trades in your account.
  • Your strategy-level PnL is based on trade logic. It helps you measure how well your system performed according to its own entry and exit rules.

So, the two systems are measuring different things. The broker tracks what was legally sold first; your strategy tracks what was conceptually sold as part of your system.

Will This Affect Your Overall PnL?

Here’s the best part — it doesn’t.

The mismatch is purely temporary and exists only when some trades are still open. Once all your trades in that stock are eventually closed, the total PnL converges.

Let’s look at how it balances out:

TradeBuy PriceSell PriceProfit (Your Calc)Profit (Broker FIFO)1₹100₹130—₹3,0002₹120₹140₹2,000₹1,000Total——₹2,000₹4,000

At first glance, the numbers don’t match. But by the end of both trades, your account value is the same. You’ve received the same total cash, just attributed differently between trades.

It’s like splitting a restaurant bill differently with friends — the total amount paid doesn’t change, only who “paid for what.”

Why This Happens

Brokers have to follow uniform accounting methods (like FIFO or sometimes Average Cost) for regulatory and tax reasons.
Traders, on the other hand, think in terms of trade intent — “I bought here for Strategy A” and “I sold there for Strategy B.”

When multiple strategies overlap on the same instrument within one account, these perspectives naturally diverge.

What You Should Do About It

1. Track Strategy PnL Separately
Keep your own trade-level or strategy-level PnL tracker — in Excel, Python, or your trading journal. This helps you analyze the actual performance of each system without getting confused by the broker’s FIFO numbers.

2. Rely on Broker PnL for Tax & Compliance
Your broker’s FIFO-based report is what matters for tax filing and official statements. Don’t try to “fix” it — it’s meant to stay that way.

3. Don’t Stress About the Mismatch
This is an accounting artifact, not a trading problem. Your overall wealth and true profitability remain the same.

The Takeaway

So the next time you notice a mismatch between your PnL and your broker’s numbers, remember — it’s not an error, it’s just a difference in perspective.

You’re measuring strategy performance, while your broker is measuring legal ownership flow.
In the long run, both paths lead to the same destination — your true net profit.

Interested in Building an Python based Algo System that will take all of these worries away!

And if you’re someone who wants to go one step further – deploy your strategies in full auto mode – I also run a course on Building a Complete Algo Trading System in Python.

In that program, I cover how to:

  • Automate your strategies from end to end.
  • Run them on an AWS server 24/7.
  • Implement risk and money management.
  • Build a real-time monitoring dashboard.
  • Even manage trades from a Telegram bot.
FabTrader Python Algo Trading Course
FabTrader Python Algo Trading Course

More from Algo Trading