8.4. Stock Transaction Assistant

While with practice you can quickly enter any stock transaction directly in the register as explained in the Investments chapter in the guide, GnuCash provides an assistant that can help walk you through most common transactions and several less common ones that you might encounter.

The assistant is accessed from the Action menu when the current register is for a Stock or Mutual Fund account.

Types of stock transactions supported by the Stock Transaction Assistant

The assistant recognizes long and short positions in the account and adjusts pages it presents to you depending on the transaction type and whether the position is long or short. It optionally capitalizes commissions and fees.

8.4.1. Transaction Details Page

Enter the transaction post date and description on this page.

8.4.2. Transaction Type Page

Select the type of transaction from the list. The assistant will display a description of what it will do when you make a selection.

8.4.3. Stock Amount Page

This page is displayed for Buy, Sell, Stock Split, and Reverse Split transactions to collect the new share information. For a Buy or Sell it will display the current share balance, ask for the number of shares traded, and once that's entered it will display the new share balance. For a Stock Split or Reverse Split it will ask for the new balance after the split and display the split ratio.

8.4.4. Stock Value Page

Displayed for Buy and Sell to collect the value of the shares bought or sold net of commissions and fees, which are collected on another page. For example if you sell 100 shares of stock for $10.00 per share with a 2% commission and a $10.00 SEC fee the net value for this page is $1000.00.

8.4.5. Cash Page

Displayed for all transaction types.

Enter the asset account to or from which the money for the transaction will go.


Only asset accounts denominated in the stock account's currency—that of the nearest parent account denominated in currency—will be offered. The stock assistant does not support multi-currency stock trading.


For a stock split or reverse split this entry is only to balance any fees entered on the following page. Any cash in lieu of fractional units must be recorded as a separate sell or cover-buy transaction.

Enter the gross amount of the transaction including commissions and fees. In the example from the Stock Value Page that would be $970.00: $1000.00 for the stock less $20 for the 2% commission and the $10.00 fee. Had it been buy you would have added the commission and fees to the amount.

There is a field for you to enter a memo on the cash split. It defaults to Cash.

8.4.6. Fees Page

Displayed for all transactions. There is a checkbox to select whether the fees will be incorporated into the value of the stock split (capitalized) or separately credited to an expense account.

If the amount is to be expensed select the account. Expense acconts will be offered and there's a button to create a new one.

Amount: Enter the total of any commissions, fees, or taxes on the transaction.


There's only one amount and one account. If you want separate accounts for say commissions and taxes, enter the total and one of the accounts here and then edit the transaction afterwards to create the extra splits.

As with the Cash Page there's a memo field for this split's memo.

8.4.7. Dividend Page

Displayed only for Dividend transactions. Select or create an income account and enter the gross amount of the dividend. There's a memo field as usual.

8.4.8. Capital Gains Page

Displayed only for Sell of a long position or Buy of a short position. As with the Dividend Page select an income account for the capital gain or create a new one, enter the amount of the gain—losses should be entered as a negative amount—and optionally edit the memo for the capital gain split.


The assistant doesn't do any calculating for you: It's up to you to determine the basis by whatever strategy you choose subject to the tax laws in your jurisdiction and to compute the difference between the basis and the proceeds.


If you prefer to use the View Lots dialog to compute capital gains/losses you should leave the Amount field in this page blank.

8.4.9. Finish Page

The final page displays a list of the splits the assistant will create along with errors that would prevent the transaction from being complete. If there are errors the Apply button will be disabled. You must use the Back button to navigate to the appropriate page and correct the error. Once all of the errors are resolved click the Apply button to create the transaction.


The assistant provides a Finish button to move to the Finish Page from any other.