For AFS, you recognize unrealized gains and losses in OCI, OCI should be the difference between FV and carrying value, which means you need take into account the principal payment of the bond. Or if you know the FV last year vs. this year, you can add that amount to the OCI.
Then for a trading security, do you do the same to calculate unrealized gain/losses? Meaning if it is the first year of the bond purchase, you are recording it at cost until end of the year and the unrealized gain is equal to the difference between FV and the carrying value (this will take care of principal payments?)
This confuses me as I always just take the difference fo the FV, but this seems like an unique case for bonds in their first year.