**If you are required to adhere to GAAP, consult with your accountant to ensure the below method applies to your specific type of investment.**
Initially you may record your investment at cost. You can add an Investment account from your Chart of Accounts. Below is a video showing how to do so:
When you purchase additional stock with cash/ACH/EFT you can record this by going to the 'Purchase Navigation' and clicking the plus sign next to 'Expense.' You can choose 'Cash' as your payment method and choose the account you paid with, and choose the investment account in the 'Expense' lines below.
When you sell a stock you can record the amount received over/under the original investment on your income statement as a gain/loss. You can set up a Gain account for this in your Chart of Accounts as an 'Other Income' account and an 'Other Expense' account for the losses. If you receive dividend income you can set up an 'Other Income' account for this as well.
To record the transaction you can create a Deposit, select the bank account the cash from the sale went to, and input Investment and Gain on Sale of Investment as lines in the 'Add a New Deposit' section:
You can record the loss by using a negative amount on the deposit line: