Methodology

Transparent documentation of how TradeVision calculates metrics, analyzes performance, and provides insights.

Methodology Overview

Our approach to trade analysis and performance measurement

TradeVision employs a comprehensive, data-driven methodology to analyze trading performance, calculate metrics, and provide actionable insights. Our calculations are based on industry-standard formulas and best practices used by professional traders and portfolio managers.

All metrics are calculated in real-time from your trade data, ensuring accuracy and consistency across all reports and dashboards. We use precise decimal arithmetic to handle fractional shares, options contracts, and multi-asset portfolios.

Note: All calculations assume trades are executed at the prices you enter. Actual execution prices may vary due to slippage, market conditions, and broker-specific factors.

Data Collection

How we collect and validate your trading data

Trade Entry

Trades can be entered manually or imported via CSV. Each trade requires:

  • Symbol (e.g., AAPL, TSLA, EURUSD)
  • Trade type (Stock, Option, Futures, Forex)
  • Side (Long or Short)
  • Entry date and price
  • Quantity or contract size
  • Exit date and price (for closed trades)
  • Fees and commissions

Data Validation

All trade data is validated before processing:

  • Entry and exit dates are chronologically valid
  • Prices are positive numbers
  • Quantities are positive integers or decimals
  • Required fields are present
  • Enum values match expected types (e.g., TradeType, TradeSide)

Data Storage

All trade data is stored securely in PostgreSQL with:

  • Precise decimal types for monetary values (12,2 precision)
  • Timestamp fields for accurate date/time tracking
  • Indexed fields for fast querying
  • Referential integrity for accounts and users

Calculation Methods

Formulas and algorithms used for core calculations

Profit & Loss (P&L)

For Long Trades:
P&L = (Exit Price - Entry Price) × Quantity - Fees
For Short Trades:
P&L = (Entry Price - Exit Price) × Quantity - Fees

Fees include commissions, spreads, and any other transaction costs. Net P&L is calculated by subtracting all fees from gross profit/loss.

P&L Percentage

P&L % = (P&L / (Entry Price × Quantity)) × 100

This represents the return on capital invested in the trade, expressed as a percentage.

Win Rate

Win Rate = (Winning Trades / Total Closed Trades) × 100

A trade is considered a "win" if the net P&L (after fees) is positive. Open positions are excluded from win rate calculations.

Average Win / Average Loss

Avg Win = Sum of Winning P&L / Number of Winning Trades
Avg Loss = Sum of Losing P&L / Number of Losing Trades

These metrics help assess the quality of your wins versus losses, independent of win rate.

Profit Factor

Profit Factor = Total Winning P&L / |Total Losing P&L|

A profit factor above 1.0 indicates profitability. Higher values suggest stronger performance. Values below 1.0 indicate net losses.

Expectancy

Expectancy = (Win Rate × Avg Win) - ((1 - Win Rate) × |Avg Loss|)

Expectancy represents the expected value per trade. Positive expectancy indicates a profitable strategy over time.

Performance Metrics

Advanced performance indicators and ratios

Total Return

Total Return % = ((Current Balance - Starting Balance) / Starting Balance) × 100

Measures overall account performance from the starting balance to current balance, including all trades, fees, and deposits/withdrawals.

Annualized Return

Annualized Return % = ((1 + Total Return) ^ (365 / Days)) - 1) × 100

Converts total return to an annualized rate, allowing comparison across different time periods. Calculated using compound annual growth rate (CAGR) formula.

Maximum Drawdown

Max Drawdown % = ((Peak Balance - Lowest Balance After Peak) / Peak Balance) × 100

Measures the largest peak-to-trough decline in account balance. Lower drawdowns indicate better risk management and capital preservation.

Sharpe Ratio

Sharpe Ratio = (Average Return - Risk-Free Rate) / Standard Deviation of Returns

Measures risk-adjusted returns. Higher Sharpe ratios indicate better risk-adjusted performance. We use a risk-free rate of 0% for simplicity, but this can be adjusted based on your benchmark.

Consistency Score

Consistency Score = (1 - (Standard Deviation of Monthly Returns / Average Monthly Return)) × 100

Measures the consistency of returns across time periods. Scores closer to 100% indicate more consistent performance, while lower scores suggest higher volatility.

R-Multiple

R-Multiple = P&L / Risk Amount

Measures return relative to risk taken. R = 1 means you made 1x your risk. R = 2 means you made 2x your risk. Only calculated when risk_amount is provided.

Risk Metrics

Risk management and position sizing calculations

Risk Per Trade

Risk Amount = Account Balance × (Risk % / 100)

Calculates the dollar amount at risk per trade based on your account balance and risk percentage setting. This is used for position sizing calculations.

Position Size Calculation

For Stocks:
Shares = Risk Amount / |Entry Price - Stop Loss Price|
For Options:
Contracts = Risk Amount / (|Entry Price - Stop Loss Price| × 100)

Calculates the optimal position size to risk a specific dollar amount based on entry price and stop loss distance.

Daily Loss Limit

Max Daily Loss = Account Balance × (Max Daily Loss % / 100)

Calculates the maximum allowable loss for a single trading day. When daily P&L exceeds this limit, risk alerts are triggered.

Risk Score

Risk Score = 100 - (Drawdown Penalty + Daily Loss Penalty + Trade Count Penalty)

Composite score (0-100) that assesses current risk level. Starts at 100 and decreases based on drawdown, daily losses, and excessive trading. Lower scores indicate higher risk.

Maximum Adverse Excursion (MAE)

MAE = Maximum unrealized loss during trade (before exit)

Measures the worst point of a trade before it closed. Helps assess whether stop losses are being followed and if trades are being held too long.

Maximum Favorable Excursion (MFE)

MFE = Maximum unrealized profit during trade (before exit)

Measures the best point of a trade before it closed. Helps assess whether profits are being captured effectively or if trades are being exited too early.

Trade Analysis

How we analyze individual trades and patterns

Trade Categorization

Trades are categorized by:

  • Symbol: The instrument traded (e.g., AAPL, TSLA)
  • Trade Type: Stock, Option, Futures, or Forex
  • Side: Long (buy) or Short (sell)
  • Setup Type: User-defined trading setup or strategy
  • Tags: Custom labels for filtering and analysis
  • Timeframe: Trading timeframe (e.g., 1m, 5m, 1H, Daily)

Performance by Category

All metrics can be filtered and analyzed by any category:

  • Win rate by symbol, setup, or tag
  • Average P&L by trade type or timeframe
  • Profit factor by category
  • Best and worst performing categories

Trade Sequencing

We analyze trade sequences to identify:

  • Win streaks and loss streaks
  • Performance after wins vs. after losses
  • Time between trades
  • Trade frequency patterns

Hold Time Analysis

Hold Time = Exit Date - Entry Date

Average hold time is calculated across all closed trades. This helps assess whether you're holding winners too long or cutting losers too short.

Account Metrics

Account-level calculations and equity curve analysis

Equity Curve

The equity curve tracks account balance over time:

For each trade:
Running Balance = Previous Balance + Trade P&L - Fees

The equity curve is built chronologically, showing how your account balance changes with each trade. This visualizes your trading journey and helps identify trends, drawdowns, and recovery periods.

Current Balance

Current Balance = Starting Balance + Sum of All Trade P&L - Sum of All Fees

Calculated by starting with your account's starting balance and adding/subtracting all trade P&L and fees. For open positions, only realized P&L is included.

Peak Balance

The highest account balance reached at any point in time. Used to calculate drawdowns and measure recovery from losses.

Account Age

Account Age = Current Date - Account Creation Date

Measures how long you've been tracking trades in this account. Used for annualized return calculations and trade frequency metrics.

Daily Growth Rate

Daily Growth Rate = (Current Balance - Starting Balance) / Account Age in Days

Measures average daily account growth in dollar terms. Helps assess the sustainability and pace of account growth.

Trade Frequency

Trade Frequency = Total Trades / Account Age in Days

Measures how many trades you take per day on average. Helps assess trading activity levels and identify periods of high or low activity.

Limitations & Disclaimers

Important considerations and limitations of our methodology

Data Accuracy

All calculations are based on the data you provide. TradeVision assumes:

  • Entry and exit prices are accurate
  • Fees and commissions are correctly entered
  • Trade dates and times are correct
  • Quantities and contract sizes are accurate

Inaccurate data will result in inaccurate metrics. Always verify your trade data before relying on calculated metrics.

Execution Assumptions

Our calculations assume trades are executed at the prices you enter. In reality:

  • Slippage may occur, especially in volatile markets
  • Limit orders may not fill at the exact price
  • Market orders may execute at different prices
  • Options spreads can affect execution prices

Open Positions

Open positions are handled as follows:

  • Open positions are excluded from win rate calculations
  • Unrealized P&L is not included in account balance
  • Open positions are included in position sizing and risk calculations
  • Once closed, trades are included in all historical metrics

Time Period Considerations

Some metrics are sensitive to time periods:

  • Annualized returns assume consistent performance over time
  • Short-term performance may not be indicative of long-term results
  • Small sample sizes (few trades) may produce unreliable statistics
  • Market conditions can significantly impact performance

Not Financial Advice

TradeVision is a trade analysis and journaling tool. Our metrics and insights are for educational and analytical purposes only. They do not constitute financial advice, investment recommendations, or trading signals.

Past Performance

Past performance does not guarantee future results. Historical metrics are based on completed trades and may not reflect future performance. Always trade responsibly and within your risk tolerance.

Important: Always verify calculations independently if using TradeVision metrics for critical decisions. While we strive for accuracy, errors in data entry or edge cases may produce unexpected results.