How to Analyze Realized and Unrealized Profit/Loss in Stock Futures Trading Using Transaction Statements: A Practical Case Study

One of the biggest challenges faced by futures and derivatives traders is determining the actual profit or loss from multiple buy and sell transactions spread across different trading days and contract expiries. Most brokers provide detailed transaction statements, but extracting meaningful insights such as realized profit, unrealized profit, open positions, average purchase price, and FIFO matching often requires manual calculations or specialized software.

This article presents a practical case study based on an anonymized trading account to explain how transaction statements can be analyzed to determine trading performance accurately. All stock names, trader names, account details, and quantities have been modified for privacy.

Advertisement

Understanding Trading Statements

A broker's transaction statement generally contains:

  • Trade Date
  • Exchange
  • Segment
  • Instrument
  • Contract Expiry
  • Buy/Sell Indicator
  • Quantity
  • Trade Price
  • Trade Value
  • Brokerage
  • Exchange Charges
  • GST
  • Stamp Duty
  • Securities Transaction Tax (STT)
  • Net Settlement Amount

While these values are useful individually, traders often need consolidated information such as:

  • Total purchased quantity
  • Total sold quantity
  • Average buy price
  • Average sell price
  • Remaining holdings
  • Realized Profit/Loss
  • Unrealized Profit/Loss
  • Net Profit after expenses

The Challenge

Consider a trader who performs multiple trades in the same futures contract.

Example:

  • Buy 500 shares
  • Buy another 500 shares
  • Sell 700 shares
  • Buy again
  • Sell again

At the end of the month, only some positions remain open.

Questions arise:

  • Which purchase was sold?
  • Which lots remain?
  • What is the average holding price?
  • What is the actual profit?
  • What is today's running profit?

Without proper matching logic, these calculations become confusing.


FIFO (First In First Out) Method

Professional accounting software and many brokers use the FIFO method.

FIFO assumes:

The earliest purchased shares are sold first.

Example:

Buy

  • 500 @ ₹250
  • 500 @ ₹255

Sell

  • 700 @ ₹270

Calculation:

First

500 × (270−250)

Then

200 × (270−255)

Remaining holding

300 shares @ ₹255

FIFO provides transparent and audit-friendly calculations.


Open Position Identification

After processing every buy and sell transaction, the remaining unmatched buy trades become the current holdings.

Example:

Buy

400 @ ₹920

Buy

400 @ ₹924

Buy

400 @ ₹930

If only the first two lots are partially sold, the remaining unmatched lots become the current portfolio.

This is known as the Open Position.


Realized Profit

Realized Profit is generated only when a position has actually been sold.

Formula:

Realized Profit = Selling Price − Purchase Price

multiplied by Quantity Sold.

Example

Buy

800 @ ₹960

Sell

800 @ ₹975

Profit

₹15 × 800

= ₹12,000

This amount is locked and cannot change.


Unrealized Profit

Open positions fluctuate with market prices.

Formula

Current Market Price − Purchase Price

Example

Bought

800 @ ₹960

Current Market Price

₹968

Running Profit

₹8 × 800

= ₹6,400

This profit changes every second during market hours.


Average Purchase Price

Many traders prefer seeing average purchase cost.

Example

Bought

500 @ ₹950

500 @ ₹960

500 @ ₹970

Average

(950 + 960 + 970) / 3

= ₹960

Although FIFO remains necessary for accounting, average cost provides a quick overview of current holdings.


Importance of Brokerage and Charges

Ignoring brokerage can give misleading results.

Actual net profit should include:

  • Brokerage
  • GST
  • Exchange Charges
  • Clearing Charges
  • Stamp Duty
  • STT
  • Regulatory Charges

Formula

Net Profit

= Gross Trading Profit

− All Charges

Professional traders always evaluate their strategy using net profitability instead of gross gains.


Contract Expiry Considerations

Futures contracts have different expiry months.

For example

ABC JUL Futures

ABC AUG Futures

Although both belong to the same company, they are separate contracts.

FIFO calculations should never mix different expiry months.

Each contract must be processed independently.


Software Automation

Modern portfolio analysis software can automate:

  • Import broker statements
  • Detect buy/sell entries
  • Apply FIFO
  • Calculate realized profit
  • Calculate unrealized profit
  • Calculate average price
  • Calculate brokerage impact
  • Generate tax reports
  • Export to Excel
  • Create PDF summaries

Automation eliminates manual calculation errors and saves significant time.


Suggested Software Features

An advanced trading analysis application may include:

  • Broker Statement Import
  • Excel Import
  • CSV Import
  • PDF Import
  • Automatic Trade Recognition
  • FIFO Engine
  • LIFO Option
  • Average Cost Method
  • Open Position Dashboard
  • Portfolio Summary
  • Daily P/L
  • Monthly Reports
  • Contract-wise Reports
  • Company-wise Reports
  • Brokerage Analysis
  • Charge Breakdown
  • Tax Summary
  • Capital Gain Reports
  • MTM Reports
  • Live Market Integration
  • Portfolio Valuation
  • Multi-Broker Support
  • Export to Excel
  • Export to PDF
  • Cloud Backup
  • Data Encryption
  • User-wise Login
  • Dark and Light Themes

Common Mistakes

Many traders unknowingly make these mistakes:

  • Mixing different expiry contracts
  • Ignoring brokerage
  • Incorrect FIFO calculations
  • Forgetting partially sold quantities
  • Using average price instead of FIFO for taxation
  • Ignoring open positions
  • Calculating profit manually
  • Not reconciling broker statements
  • Missing contract rollover entries
  • Confusing realized and unrealized profits

Best Practices

Professional traders should:

  • Download broker statements regularly.
  • Reconcile all trades.
  • Maintain backup records.
  • Verify brokerage deductions.
  • Track contract-wise positions.
  • Use automated portfolio software.
  • Maintain audit trails.
  • Export reports monthly.
  • Compare broker reports with personal records.
  • Review open positions daily.

Conclusion

Accurate profit and loss calculation is far more than subtracting the purchase price from the selling price. A complete trading analysis requires proper trade matching, contract-wise tracking, brokerage adjustments, and continuous monitoring of open positions.

By using FIFO methodology and automated analysis software, traders can obtain reliable realized and unrealized profit figures, reduce accounting errors, improve decision-making, and simplify tax preparation. Whether managing a small personal portfolio or executing hundreds of futures trades every month, systematic transaction analysis is an essential component of professional trading.

 

#StockMarket #Trading #Futures #Derivatives #FIFO #Portfolio #TradingSoftware #Investment #StockAnalysis #BrokerStatement #ProfitLoss #TradingJournal #Finance #Equity #NSE #BSE #MarketAnalysis #TradingTools #FinancialSoftware #Automation #Excel #CSV #PDF #SoftwareDevelopment #WindowsApp #DesktopSoftware #InvestmentTracking #PortfolioManagement #TradeAnalysis #Brokerage #GST #STT #CapitalGains #Accounting #Audit #FinancialReports #DataAnalysis #TradingStrategy #OpenPosition #RealizedProfit #UnrealizedProfit #MarketData #RiskManagement #Investor #AlgoTrading #TradeBook #FinancialPlanning #BusinessSoftware #Developer #CaseStudy


stock trading futures trading F&O futures contract transaction statement broker statement realized profit unrealized profit mark to market MTM FIFO LIFO average price average cost buy trade sell trade open position closed position portfo
Advertisement