Available-for-sale (AFS) securities are investments in debt that a company does not plan to sell, but it is available to sell if, for example, cash needs arise or the market is particularly favorable.
Comparison to trading securities (TS)
Like TS, AFS securities are reported in the balance sheet at fair value.
Unlike TS, unrealized gains and losses are recorded in other comprehensive income (OCI) rather than in the income statement.
Comprehensive income = Net income + Other comprehensive income
 Unrealized holding gains and losses from available-for-sale securities are recorded in other comprehensive income (equity account).
"Because AFS securities are likely to be held for multiple reporting periods, one could argue that there is sufficient time for unrealized holding gains in some periods to balance out with unrealized holding losses in other periods, so including unrealized holding gains and losses in income each period would confuse investors by making income appear more volatile than it really is over the long run" (Spiceland et. al 2019, p. 657).
The accounting is very similar to trading securities. Here's what changes.
A transfer of a security between reporting categories is accounted for at fair value and in accordance with the new reporting classification (i.e., HTM, TS, or AFS).
Trading securities are the only type of investment discussed in this module where unrealized holding gains and losses are recorded in the income statement. However, companies have the option (but, not the requirement) to accounting for held-to-maturity (HTM) and available-for-sale securities as trading securities.