Sometimes, you will want to know the current street value of your balance, and not the commodity totals. For this to happen, you must specify what the current price is for each commodity. The price can be any commodity, in which case the balance will be computed in terms of that commodity. The usual way to specify prices is with a price history file, which might look like this:
P 2004/06/21 02:18:01 FEQTX $22.49 P 2004/06/21 02:18:01 BORL $6.20 P 2004/06/21 02:18:02 AAPL $32.91 P 2004/06/21 02:18:02 AU $400.00
Specify the price history to use with the --price-db FILE option, with the --market (-V) option to report in terms of current market value:
$ ledger --price-db prices.db -V balance brokerage
The balance for your brokerage account will be reported in US dollars, since the prices database uses that currency.
$40880.00 Assets:Brokerage
You can convert from any commodity to any other commodity. Let’s say you had $5000 in your checking account, and for whatever reason you wanted to know how many ounces of gold that would buy, in terms of the current price of gold:
$ ledger -X AU balance checking
The result of this command might be:
12.50 AU Assets:Checking
status | not read | reprioritisations | ||
---|---|---|---|---|
last reprioritisation on | suggested re-reading day | |||
started reading on | finished reading on |