GitHub
Prices and valuation

Prices and valuation

Valuation sources, and why the three reports differ

ReportPrices used
Balance sheetExplicit P directives only (matches hledger bs -V)
Other holdingsExplicit P plus prices inferred from @/@@ costs
Stocks holdingsP first, then a cost annotation as a per-symbol fallback

The Other tab infers prices from cost annotations because the common case is a single 1 HOME @ $420,000.00 and no P directive at all. Reading only explicit directives would report that house as unpriced, which helps nobody. The balance sheet stays strict because it promises to match hledger bs -V.

Updating prices from Yahoo Finance

An arrow pointing at the Update prices button beside the Holdings tab strip

The Update prices button sits beside the tab strip while the Stocks tab is open. One press fetches the latest close for every symbol the tab currently shows and adds a P directive per symbol to your journal.

It appears only when there is something for it to do: a journal Ledgeline can write to, at least one stock currently held, and somewhere to put a price.

Where the prices are written

Your journalWhere the update goes
Some file already holds P directivesThe file that holds the most
No file anywhere holds a P directiveA new prices.journal, included for you
No P anywhere, but a prices.journal already sits beside your journalNothing is created or overwritten; the update goes to a file with no transactions in it, else your main journal

“Already holds prices” is decided by the directives, not by the filename. If your prices live in history.journal, kurse.journal or 2026/prices.j, Ledgeline finds them there and keeps writing there. It only creates a file when no file in the whole include tree prices anything, and it never writes over a prices.journal it did not create.

The new file is created beside your main journal, holding a comment and nothing else, and include prices.journal is appended to the end of your main journal. Ledgeline checks that both files will reparse before it writes either one.

The yahoo tag

Prices are looked up under the commodity’s own symbol. When Yahoo Finance knows a holding by a different ticker than your journal does, name that ticker on the commodity directive. This happens often, because hledger commodity symbols cannot contain every character a ticker can.

commodity 1.0000 BRKB   ; yahoo: BRK-B
commodity 1.0000 VTSAX  ; yahoo: VTSAX
Tags on the commodityLooked up as
yahoo: XX, whatever else is tagged
type: crypto or assetclass: cryptothe coin’s pair in your base currency: BTC-USD, BTC-EUR
neitherthe commodity symbol

The tag goes on the commodity directive line itself, not on an indented line under it. It can sit beside any other tag you keep there. Anything Yahoo Finance quotes works: stocks, ETFs, mutual funds by their NAV, and index symbols like ^GSPC.

A coin needs type: crypto (or a yahoo: tag naming its pair). On Yahoo Finance BTC, ETH and USDC are other securities (BTC is a Grayscale ETF), so an untagged BTC is priced as that ETF, and the summary and the Holdings page say so. See Crypto.

What a press does

Automatic price updates

Turn on Settings → Prices → Keep stock prices up to date in the background and Ledgeline keeps the prices current for you while it is open:

New lines go where Update prices would put them, in date order, in your own style. A line already there for that date is never duplicated.

It needs a prices file first

Nothing happens until some file in your journal holds a P directive. The automatic update never decides where a journal’s first price goes, and never creates prices.journal itself. Click Update prices once: it creates the file (or finds the one you already use), and from then on the automatic updates add to it. Holdings shows Click Update prices once to start automatic updates until you do.

A read-only journal is never written to.

Limits on requests to Yahoo Finance

Next to the Update prices button, Holdings shows what the last automatic run did, such as Prices auto-updated 2 h ago.

Settings for one ledger

The setting is shared by every ledger unless you tick Use for this ledger only on the Prices settings tab, which keeps both the on/off switch and the number of weeks in that ledger’s ledgeline.toml (see Settings files). This lets your real books update automatically while a sample ledger you use for demos does not. The keys are autoPrices and autoPricesWeeks.