How Dopl Verify calculates returns.
Every formula Dopl Verify uses to compute and display verified portfolio returns. No finance background required.
Where the data comes from
When a user connects their brokerage account (Robinhood, Fidelity, Schwab and 26 more), Dopl gets read-only access to three things:
- Transaction history: every buy, sell, dividend, option trade, fee, and stock split, going back as far as the broker provides.
- Current positions: what the user holds right now, with current market prices and cost basis (what they paid).
- Cash balance: how much uninvested cash is sitting in the account.
Dopl cannot place trades, move money, or modify anything. All data flows one way: from the broker to Dopl.
Per-stock return
For each individual stock, we compute how much money the user made or lost relative to what they spent.
- Money In = total amount spent buying shares of this stock
- Money Out = amount from selling shares + current value of shares still held + dividends received
Example
You bought 100 shares at $4.00 ($400 total), received $12 in dividends, sold 50 shares at $6.00 ($300), and still hold 50 shares now worth $6.50 each ($325).
Edge cases
- Dividend reinvestment (DRIP): When a dividend is automatically used to buy more shares, we add the shares at zero additional cost. The dividend is NOT double-counted.
- Stock splits: We adjust the share count but not the cost basis. A 2-for-1 split gives you twice the shares at half the price. Economics unchanged.
- Transferred-in stocks:If shares were transferred from another broker, we flag them as unverifiable since we don't have the original purchase history.
Per-option return
Options are contracts that give you the right to buy or sell a stock at a set price. They're more complex than stocks because they can expire, get assigned, or change direction.
How we track options
Each option contract has a lifecycle: it opens when bought (or sold short), and closes when sold, expires, or gets assigned. Same-day trades for the same option are batched together before processing.
Long positions (bought options)
Short positions (sold/written options)
The denominator changes because for short positions, the premium received is the capital at risk.
Expiration
If an option expires worthless, we treat it as a total loss: -100% return. If the broker doesn't send an explicit expiration event, we detect it ourselves by checking whether the option's expiration date has passed while the position is still open.
Time-Weighted Return (TWR): the green line
TWR is the industry-standard method for measuring investment skill, used by the CFA Institute and GIPS (Global Investment Performance Standards). It answers: "How well did the investments perform, regardless of when money was added or removed?"
Why not just compare start vs end value?
If you deposit $10,000, it grows to $12,000 (+20%), then you deposit another $50,000, and the total grows to $65,000, a simple calculation would show +8.3%. But your investments actually returned 20% before the second deposit. TWR separates investment performance from deposit timing.
How it works
- Every time money enters or leaves the account, we close a sub-period and record the growth factor.
- We multiply all the sub-period growth factors together to get the total return.
Example
- Day 1: Deposit $5,000. Portfolio starts at $5,000.
- Day 10: Portfolio grows to $5,500. Deposit another $2,000. Sub-period 1 growth: $5,500 / $5,000 = 1.10
- Day 20: Portfolio is now $8,250. Sub-period 2 growth: $8,250 / $7,500 = 1.10
- TWR = (1.10 × 1.10) - 1 = 0.21 = +21%
When deposit history isn't available
Some brokers don't provide deposit/withdrawal events. For these accounts, we use the cash-floor method: we simulate through every trade, tracking a virtual cash balance starting at $0. Whenever cash would go negative, we inject the minimum needed to bring it back to $0. These injections serve as synthetic "deposits."
How our TWR may differ from your broker's
Brokers like Webull compute TWR daily using exact deposit and withdrawal data from their own platform. They know exactly when money entered or left the account.
When deposit history isn't available through the API, we use the cash-floor method described above. This may cause our TWR to differ from the broker's reported return, particularly for margin accounts where the broker lends capital automatically. The math is the same; the difference is in the input data.
Per-trade returns shown in the Verified Trades section are not affected by this limitation.
Portfolio valuation
On each observation date (weekly), we calculate:
Options on intermediate dates are valued at cost basis. On the final date, options use the broker's current market price.
Verified Trades
Each trade is shown individually with its entry price, exit price, and return percentage. These calculations use only the trade's own data: what was paid and what was received.
Per-trade returns do not depend on deposit history, margin tracking, or any account-level estimation. They are computed directly from the broker's transaction records and are the most reliable metric on this platform.
Trades are grouped by symbol. When a position is fully closed and then reopened, each round-trip is shown separately. Prices shown are per-share for stocks and per-contract for options.
How the chart is built
The chart shows data at daily intervals (weekdays), plus the final date. At each observation point:
- TWR%: cumulative time-weighted return from inception
- S&P 500: benchmark comparison, rebased to the same starting date
When a shorter timeframe is selected (1M, 3M, 6M, 1Y), both the user's returns and S&P 500 are rebased to start at 0% from the beginning of that window.
Cross-verification
As a sanity check, we compare our computed cost basis for each stock against the broker's reported cost basis. If they differ by more than 5%, we flag it. This catches computation errors or missing transaction data.