Skip to content

Commit 2871eb0

Browse files
committed
Document YTD realized income tax and paid config field
1 parent ef4e9bd commit 2871eb0

3 files changed

Lines changed: 58 additions & 5 deletions

File tree

book/src/commands/holding-value.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ LTCG Tax (28.0%): $27,654.32
2222
Total Tax: $32,691.35
2323
2424
After-Tax Value: $1,201,876.54
25+
26+
YTD Realized Income Tax:
27+
28+
Dividends: $23,456.78
29+
Dividend Tax (53.5%): $12,556.38
30+
Interest: $5,678.90
31+
Interest Tax (53.5%): $3,039.84
32+
Realized STCG: $8,901.23
33+
STCG Tax (40.8%): $3,631.70
34+
Realized LTCG: $45,678.90
35+
LTCG Tax (28.0%): $12,790.09
36+
37+
Total Tax Owed: $32,018.01
38+
Tax Paid: $20,000.00
39+
Tax Remaining: $12,018.01
2540
```
2641

2742
## Computation
@@ -48,6 +63,36 @@ The formulas are:
4863

4964
Tax-exempt holdings (RRSP, TFSA, additions with `tax_exempt: true`) contribute zero to STCG and LTCG, so they do not affect the tax computation. Gains are taxed and losses reduce taxes (the tax amount can be negative).
5065

66+
## YTD Realized Income Tax
67+
68+
This section shows estimated taxes on realized income and capital gains for the current calendar year (January 1 through today). It uses the full transaction history — dividends, interest, withholding tax, and realized sales — filtered to the current year, converted to the `--base-currency`.
69+
70+
Tax rates are read from the `taxes` section of `ibctl.yaml`:
71+
72+
```yaml
73+
taxes:
74+
stcg: 0.408
75+
ltcg: 0.28
76+
dividend_tax: 0.5353
77+
interest_tax: 0.5353
78+
paid:
79+
USD: "50000"
80+
```
81+
82+
| Value | Formula |
83+
|-------|---------|
84+
| Dividends | Sum of DIV {BASE} across all YTD DIVIDEND and WHT transactions |
85+
| Interest | Sum of INT {BASE} across all YTD INTEREST transactions |
86+
| Realized STCG | Sum of STCG {BASE} across all YTD SELL transactions |
87+
| Realized LTCG | Sum of LTCG {BASE} across all YTD SELL transactions |
88+
| Dividend Tax | Dividends * `taxes.dividend_tax` rate |
89+
| Interest Tax | Interest * `taxes.interest_tax` rate |
90+
| STCG Tax | Realized STCG * `taxes.stcg` rate |
91+
| LTCG Tax | Realized LTCG * `taxes.ltcg` rate |
92+
| Total Tax Owed | Dividend Tax + Interest Tax + STCG Tax + LTCG Tax |
93+
| Tax Paid | Sum of `taxes.paid` amounts, converted to base currency |
94+
| Tax Remaining | Total Tax Owed - Tax Paid |
95+
5196
## Flags
5297

5398
| Flag | Default | Description |

book/src/commands/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ All holding commands accept `--base-currency` (default `USD`) to convert values
3434
| `ibctl holding lot list` | List individual FIFO tax lots with per-lot cost basis and P&L |
3535
| `ibctl holding category list` | Aggregate holdings by category with market value and P&L |
3636
| `ibctl holding geo list` | Aggregate holdings by geographic classification with market value and P&L |
37-
| `ibctl holding value` | Display portfolio value with estimated tax impact and after-tax value |
37+
| `ibctl holding value` | Display portfolio value with estimated unrealized and YTD realized tax impact |
3838

3939
## Transaction commands
4040

book/src/configuration.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ cash:
4949
CAD: "-5000.00"
5050
USD: "1200.50"
5151

52-
# Capital gains tax rates for portfolio value computation.
53-
# Optional. Used by the "holding value" command to estimate after-tax portfolio value.
52+
# Tax rates and payment tracking for portfolio tax computation.
53+
# Optional. Used by "holding value" and "holding overview" commands.
5454
taxes:
5555
stcg: 0.408
5656
ltcg: 0.28
57+
dividend_tax: 0.5353
58+
interest_tax: 0.5353
59+
paid:
60+
USD: "50000"
61+
CAD: "30000"
5762

5863
# Manually added trades from non-IBKR brokers.
5964
# Optional. See the Additions chapter for full details.
@@ -120,14 +125,17 @@ Use negative values to subtract (e.g., if you have committed cash that should no
120125

121126
### `taxes`
122127

123-
**Optional.** Capital gains tax rates used by the `holding value` command to estimate after-tax portfolio value.
128+
**Optional.** Tax rates and payment tracking used by the `holding value` and `holding overview` commands.
124129

125130
| Field | Description | Example |
126131
|-------|-------------|---------|
127132
| `stcg` | Short-term capital gains tax rate (decimal, e.g., 0.408 = 40.8%) | `0.408` |
128133
| `ltcg` | Long-term capital gains tax rate (decimal, e.g., 0.28 = 28%) | `0.28` |
134+
| `dividend_tax` | Tax rate on dividend income (decimal, e.g., 0.5353 = 53.53%) | `0.5353` |
135+
| `interest_tax` | Tax rate on interest and bond coupon income (decimal, e.g., 0.5353 = 53.53%) | `0.5353` |
136+
| `paid` | Map of currency codes to total tax payments already made this year as decimal strings | `USD: "50000"` |
129137
130-
If not set, both rates default to zero and the `holding value` command shows no tax impact.
138+
If tax rates are not set, they default to zero and no tax impact is shown. The `paid` map tracks estimated tax payments (quarterly, installments, etc.) so the commands can show how much tax remains after payments. When viewing in a different `--base-currency`, paid amounts are converted using the most recent available FX rate.
131139

132140
### `additions`
133141

0 commit comments

Comments
 (0)