Tracking Securities
Stocks, funds, and crypto are tracked as commodities, the same way
currencies are. A share of AAPL is a commodity you hold a quantity of, valued
in money through a price.
Buying
Record a purchase as a normal transaction. The shares carry a cost basis in braces, which is what you paid per unit:
2025-02-11 Buy shares
Assets:Brokerage:AAPL 10 AAPL {183.07 USD}
Assets:Cash -1830.70 USD
The account now holds 10 AAPL. The cost basis ({183.07 USD}) is remembered
for working out gains later. It is not the same as the market price.
Pricing
To value your holding, Surebeans needs a market price for the security:
P 2025-06-01 AAPL 200.00 USD
Add it with Fetch prices on the Net Worth report, or type it yourself. Stock and fund prices come from Twelve Data, which needs a free API key (see Settings). Currency and crypto prices need no key.
Net worth and unrealized gain
Net worth values your holding at the latest market price, not at cost. So 10 AAPL bought at 183.07 shows as 2,000.00 USD once the price reaches 200. The
difference between market value and cost is your unrealized gain: real, but
on paper until you sell.
Because net worth tracks market value, it moves as prices move, just as it does with currencies. A price drop lowers net worth with no transaction on your part.
Selling
Record a sale at the price you sold for. Surebeans matches the sale against your purchase lots using the cost basis method set in Settings (FIFO by default), and the difference between proceeds and cost basis is a realized capital gain you can book to an income account:
2025-03-01 Sell 15 AAPL
Assets:Brokerage:AAPL -15 AAPL @ 150.00 USD
Assets:Cash 2250.00 USD
Income:Capital Gains -650.00 USD
Here 15 shares are sold under FIFO: 10 from the first lot (cost 100) and 5 from the second (cost 120), for a cost of 1,600 against 2,250 proceeds, a 650 gain. Five shares remain.
You can choose a different method in Settings under Multi-currency:
- FIFO (first in, first out): sells your oldest lots first.
- LIFO (last in, first out): sells your newest lots first.
- HIFO (highest in, first out): sells your costliest lots first, which minimizes the taxable gain.
- Average cost: every share carries the weighted-average cost of all shares you hold.
Seeing your gains
The Gain/Loss report totals realized and unrealized gain per commodity, across securities and currencies, with per-lot drill-down.