Start here
Portfolios and rebalancing
Give each holding a target weight. PF then shows how far each one has drifted and the trade that brings it back.
Build a portfolio
A portfolio is what you hold: shares, what you paid for them, and cash. It stays on your device. In the app, run New Portfolio; in a shell:
gloom portfolio create Core
gloom portfolio position set Core VTI 40 280
gloom portfolio position set Core BND 60 72
gloom portfolio cash set Core 2000 USDA portfolio in another currency
A portfolio totals in your base currency unless you give it its own. Holdings in other currencies are converted into it:
gloom portfolio create Lira --currency TRY
gloom portfolio position set Lira THYAO 100 280 # a BIST stock, cost in TRY
gloom portfolio position set Lira BRK-B 10 20310 TRY # a US stock at what it cost in lira
gloom portfolio position set Lira BRK-B 10 410 USD --date 2024-03-01 # or in dollars, converted at that day's FX close
gloom portfolio position set Lira KO 40 62.50 USD --cost-fx 32.15 # or at the rate you paid, TRY per USD
gloom portfolio show Lira --from 2025-11-06 # P&L since a date, with the currency's move on its own line
gloom portfolio show Lira --from 2025-11-06 --real # and the return after Turkish consumer pricesA cost in the holding's own currency without --date or --cost-fx converts at today's rate, and portfolio show names the holdings it does that for. Use the date or the rate so P&L carries the currency's move since you bought. A name whose last word is a currency code in capitals (Baht THB) creates the portfolio in that currency too.
--real deflates the period's total by the consumer prices of the portfolio's currency, from the CPI month before the start's month to the one before the end's (or the latest month published), and names both months:
- USD: the ratio of the BLS index at those two months, not seasonally adjusted (FRED's
CPIAUCNS), as a period's inflation is quoted. A month the BLS did not publish reads the month before it. - TRY: the central bank's table gives TurkStat's changes rather than the index, so the figure is chained from the end month back. Each whole year takes TurkStat's year-on-year change, and each month left over takes its monthly change. Every change is applied as one plus the change, and the factors are multiplied. A twelve-month period is TurkStat's published annual rate: October 2025 to October 2026 reads 29.77%. A month without its change leaves the period without a real return.
Import positions from a broker CSV
A broker Gloom does not sync can still fill a portfolio. Download its positions or holdings page as a CSV. Then in PF open the pane menu (., or ... in the title bar) and choose Import Positions…, or in a shell:
gloom portfolio import ~/Downloads/Portfolio_Positions.csv --dry-run # the preview, nothing saved
gloom portfolio import ~/Downloads/Portfolio_Positions.csv # creates "Fidelity"
gloom portfolio import positions.csv --name Fidelity --merge # update a portfolio that holds tickersFidelity, Schwab (one account or all of them), Vanguard, E*TRADE and Merrill exports are read as they come, and so is any table with a symbol and a quantity column. Each symbol becomes a position with its shares and, where the file has them, cost, purchase date and currency.
A preview comes first. The app saves nothing until you choose Import, and in a shell --dry-run prints the same preview. Cash, options, bonds and pending rows are listed as skipped, each with the reason. A trade history is refused.
Into a portfolio that already holds tickers, choose Merge (--merge: the file's positions are set over the same holdings, the rest stay) or Replace (--replace: holdings the file does not list are removed too). The app asks you to confirm a replace. A replace never removes a holding the file lists, and is refused while any stock row failed to import.
Set targets
A target is the weight you want a holding to have, as a share of the whole portfolio. Cash can have one too.
gloom portfolio target set Core VTI 60
gloom portfolio target set Core BND 35
gloom portfolio target set Core CASH 5Read the drift table
PF and gloom portfolio show Core add four columns once targets are set:
Ticker Shares Value Weight Target Drift Trade Trade Value
────────── ────── ─────── ────── ────── ─────── ───── ───────────
BND:NASDAQ 60 $4,212 19.6% 35.0% -15.4pp +47 +$3,309
VTI:ARCA 40 $15,276 71.1% 60.0% +11.1pp -6 -$2,383
CASH $2,000 9.3% 5.0% +4.3pp -$926
TOTAL $21,488 100.0% 100.0%| Column | Means |
|---|---|
| Weight | Share of the total value, cash included |
| Target | The weight you set |
| Drift | Weight minus target, in percentage points (pp) |
| Trade | Shares to buy (+) or sell (-) to get back to target |
Rebalance
VTI is 11.1pp over its target, so the table says sell 6 shares. BND is 15.4pp under, so buy 47. Make both trades and every drift lands near 0pp.
To place them from Gloom, see Trading.
Dividend income
gloom portfolio show Core also lists what each share or fund pays a year: its trailing twelve months of dividends per share times the shares you hold, in the portfolio's currency, and that as a yield on the holding's value. The TOTAL row gives the portfolio's income and its yield on the whole portfolio, cash included. A holding whose dividends could not be read shows —, and so does the total, never $0.
To see what reinvesting them adds, ask for a DRIP projection:
gloom portfolio show Core --drip --years 3 --withholding 15Each year the shares you hold pay today's dividend, the withholding comes off, and the rest buys shares at today's price. The table gives each holding's shares now and after the last year, and the income each year, net of withholding. --years takes 1 to 5.
To compare payers before you buy, rank them by yield with payout and growth: gloom fn DVD KO PEP JNJ.
Fine print
- Targets need not add up to 100%; the report says what is unallocated.
- Income uses trailing dividends, not announced ones. DRIP holds dividends, prices and exchange rates where they are today and reinvests once a year; it is an illustration, not a forecast.
- Trades use the current price and leave out fees, taxes and lot sizes.
- A broker portfolio uses the cash its account reports.
- Several rows of one symbol (lots, or one holding in several accounts) become one position: the shares added up, the cost averaged, dated by the earliest lot.
- Vanguard's export has no cost. Its positions come in without one, unless the portfolio already holds the ticker and keeps that cost; set it with
gloom portfolio position set. - A file takes at most 1,000 positions and 5 MB. A portfolio synced from a broker is never imported into.
- In the PF pane the columns read
WEIGHT,TGT WT,DRIFTandTRADE.
Related: PF, CLI. Methodology: dividend income and DRIP.