Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

When you record a sale at the price you sold for, Surebeans matches it against your purchase lots using the cost basis method set in Settings, FIFO by default, and posts the realized gain to Income:Capital Gains. This happens whether the sale comes from the record editor or a file import. For example:

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 sell under FIFO: 10 from a lot costing $100 and 5 from a lot costing $120, for a $1,600 basis against $2,250 proceeds, a $650 gain. Five shares remain.

Surebeans posts the gain only when it knows the cost basis, meaning the lots you hold cover the shares sold. When earlier lots are missing, it records the proceeds without a gain. Record those earlier purchases, then save the sale again to book the gain.

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.