As with most accounting practices, there are a number of different
ways to setup capital gains accounts. We will present here a general
method which should be flexible enough to handle most situations. The
first account you will need is an Asset Cost account
GnuCash account type Asset), which is simply a place where you record
the original purchase of the asset. Usually this purchase is accomplished
by a transaction from your bank account.
In order to keep track of the appreciation of the asset, you will need three accounts. The first is an Unrealized Gains asset account in which to collect the sum of all of the appreciation amounts. The Unrealized Gains asset account is balanced by a Unrealized Gains income account, in which all periodic appreciation income is recorded. Finally, another income account is necessary, called a Realized Gains in which you record the actual capital gains upon selling the asset.
Below is a generic account hierarchy for tracking the appreciation of 2 assets, ITEM1 and ITEM2. The Assets:Fixed Assets:ITEM1:Cost accounts are balanced by the Assets:Current Assets:Savings Account account, the Assets:Fixed Assets:ITEM1:Unrealized Gains accounts are balanced by the Income:Unrealized Gains account (similar for ITEM2).