You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/src/commands/holding-value.md
+45Lines changed: 45 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,21 @@ LTCG Tax (28.0%): $27,654.32
22
22
Total Tax: $32,691.35
23
23
24
24
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
25
40
```
26
41
27
42
## Computation
@@ -48,6 +63,36 @@ The formulas are:
48
63
49
64
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).
50
65
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 |
| `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"` |
129
137
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.
0 commit comments