Trades and positions
How your imported buys and sells become positions (groups), and what each group row shows.
Your broker gives you a long list of single trades: buy 100 shares here, sell 40 there. MyTraderDash pairs those trades up into groups. A group is one position, or one finished piece of a position, with its own entry price, exit price and result. The Trade Log shows these groups in its Grouped view and the raw trades in its List view.
You don't have to do anything for this to happen. The app rebuilds the groups after every import, sync or edit. The Recalculate button on the Trade Log runs the same rebuild on demand.
How trades are paired: first in, first out
The app uses FIFO, short for "first in, first out": when you sell, the shares you bought first are the ones that leave first. This is the usual method brokers and tax forms use.
Example. In one account you trade the same stock:
| Date | Trade |
|---|---|
| Jan 10 | Buy 100 shares at $10 |
| Feb 3 | Buy 50 shares at $12 |
| Mar 15 | Sell 120 shares at $15 |
| Apr 20 | Sell 30 shares at $11 |
The app builds two closed groups, one per sale:
- The Mar 15 sale takes the oldest shares first: all 100 from Jan 10, then 20 from Feb 3. Its entry is the average cost of those 120 shares, about $10.33. Its result is $1,800 − $1,240 = +$560, a win.
- The Apr 20 sale takes the 30 shares left from Feb 3. Its result is $330 − $360 = −$30, a loss.
Between Mar 15 and Apr 20 there was also an open group holding those 30 shares. Once they were sold, the open group was gone.
A few rules keep the pairing honest:
- One group per sale. Each sale becomes its own closed group, with the shares it used up. Whatever you still hold sits in one open group per stock and account.
- Only earlier buys count. A sale can only use shares bought on or before it.
- Same day: the broker's order when it gives one. When your broker reports the time of each trade (tastytrade does), the trades of a day are paired in the order they were executed, and a sale only uses shares bought before it that day. When it reports dates only (Questrade, DISNAT, RBC, Schwab, and trades you add by hand), buys on a date are counted before sales on that date. A day that mixes both kinds, say a synced trade and one you typed in, uses the dates-only rule.
- Per account, per listing. Shares in your TFSA never pair with a sale in your margin account.
A stock listed on two exchanges (for example
BNSon the TSX and on the NYSE) is two separate listings; moving shares between them is a journal, see Journaling shares between listings.
Partial sells
Sell part of a position and you get two groups for the same stock: a closed group for the part you sold and an open group for the rest.
You buy 100 shares at $10, then sell 40 at $12:
| Group | Quantity | Entry | Exit | Result |
|---|---|---|---|---|
| Closed | 40 | $10 | $12 | +$80 (WIN) |
| Open | 60 | $10 | – | depends on today's price |
Expand either group and you'll see the same Jan buy in both, at the group's share: the row reads 40 of 100 in the closed group and 60 of 100 in the open one, and its fee is split the same way (40% in one group, 60% in the other). The FEES column adds up those shares, so a trade split between two groups is never counted twice, and the table's TOTALS row can add the groups up.
Selling more than you hold
Sometimes a sale is bigger than the shares the app knows about, usually because older history wasn't imported. You sell 150 shares, but the file only shows 100 bought. The app pairs the 100 it can and marks the rest as an issue. See Data issues.
Open and closed
The STATUS column tells you where a group stands:
| Status | Meaning |
|---|---|
OPEN | You still hold it and no current price is available yet |
OPEN (WINNING) / OPEN (LOSING) | You still hold it; compared with the latest price |
WIN | Closed with a result of $0 or more |
LOSS | Closed with a result below $0 |
CLOSED (UNKNOWN) / OPEN (UNKNOWN) | The cost basis is unknown, so there is no result to show |
Cost basis is what you paid for the shares, which the result is measured against. When it is missing, the group has no result: no profit or loss, no win or loss, no gain or loss tag, and the tax report leaves it out. Only the dividends it collected are counted. The app shows a dash instead of guessing a number. A sale with no purchase on file is closed on the day of the sale, with an unknown cost. This applies to detected strategies too (a wheel whose shares came from an account you haven't imported). See Data issues.
Open groups are listed first, then everything else, newest first.
What a group row shows
| Column | What it shows |
|---|---|
DATE OPEN / DATE CLOSE | First trade of the group; the closing trade (empty while open) |
SYMBOL, EXCHANGE, CURR | The ticker, its exchange and the trade currency |
ACCOUNT, BROKER | Where it sits. +1 after the name means it spans more accounts |
ENTRY | Average price paid. For some strategies it's the adjusted cost (see below) |
CURRENT | Latest known price, for open groups |
EXIT | Average price received, once closed |
QUANTITY | Shares, or contracts for options, in this group |
FEES | Fees of the trades in the group, at the group's share of each split trade |
RETURN $ / RETURN % | Closed: the result. Open: the gain or loss at the latest price |
SIDE | LONG (you bought first) or SHORT (you sold first); — when it can't be told |
TAGS | Labels, see Tags and labels |
Things worth knowing about the numbers:
- Results are before fees.
RETURN $compares prices only; fees have their own column. - Dividends count. Dividends paid while you held the shares are added to that group's result. How they are split is explained in Dividends.
- Adjusted cost. For a detected wheel or covered call,
ENTRYshows the share cost minus the premiums you collected. See Strategy detection. - Your currency. Money columns follow your display currency (USD or CAD). See Currencies.
Click a row to expand it and see the trades inside.
Options
Each option contract is its own position: the same ticker, call or put, strike and expiration in the same account. A $50 call and a $55 call on the same stock never pair with each other.
- Long or short. If your first trades in a contract were sales, the group is
SHORT: you sold to open, and buying back closes it. Otherwise it'sLONG. - Prices are per contract. One contract covers 100 shares, so a premium quoted at $1.50 shows as $150 in the Trade Log.
- Expiry closes at $0. An option that expires worthless closes its group at $0. For a sold option that means you kept the full premium.
- Assignment and exercise. When an option is assigned or exercised, it closes at $0 and the
shares are bought or sold at the strike. Those share trades show as
AssignmentorExercise. The option's own closing row ("Option Exit") is hidden inside groups because the share trade already tells the story.
Nothing closes an option for you. If an option's expiration has passed and no expiry, assignment or closing trade was imported, the group stays open and is flagged. Use the Record outcome button on that row to say what happened (expired, assigned or exercised). See Data issues.
Stock splits
When a stock splits, the app restates your older trades in today's shares before pairing them. Your trade rows keep the numbers the broker reported; only the pairing uses the restated ones.
You bought 10 shares at $500, then the stock split 10-for-1. The app counts that as 100 shares at
$50, so a later sale of 50 shares at $60 pairs cleanly: +$500. Trades restated this way get a
SPLIT (or REVERSE_SPLIT) tag.
A position's own line (ENTRY, EXIT, QUANTITY) is in today's shares; the trades inside it stay in the broker's. After a 1-for-30 reverse split, a position that sold 250 of 500 shares bought at $4.65 shows QUANTITY 8.33 and ENTRY $139.50, and its buy row shows 250 of 500 at $4.65. Both give the same cost, and the same profit or loss.
Options are not restated: the exchange adjusts option contracts itself.
Trades the system adds
To make the pairing work, the app sometimes adds trades of its own. They are rebuilt from scratch on every recalculation, so they always match your current data.
| You'll see | Why it's there |
|---|---|
Synthetic Buy at $0 | A sale with no earlier purchase in your history. It stands in for the missing buy, dated one day before the sale, and the group's cost basis shows as unknown |
Synthetic Sell at $0 | The same for an option you bought back with no opening sale on file |
Synthetic Sell at the sale's price | The leftover part of a sale bigger than your known shares (tag PARTIAL_ALLOC). It sits in the List view, in no group, so it shows up as an issue instead of disappearing |
Transfer Out / Transfer In | Closes the position in the account it left and opens it where it arrived. See Transfers between accounts |
Journal Out / Journal In | The same for shares moved to another listing (for example DLR to DLR.U) |
The $0 stand-ins are placeholders, not real prices. They exist so the sale shows up as an open question rather than as a fake profit. Import the missing history and they go away on their own.
Tip: the $0 stand-ins can't be grouped or ungrouped by hand. A leftover piece of a sale stands for its real trade: grouping it groups the rest of that sale.
Related
- Your own grouping: merge, move and unmerge when the automatic pairing isn't how you think about a position.
- Strategy detection: how wheels, covered calls and other patterns are built on top of these groups.
- Trade Log: the page itself, filters and buttons.