When a foreign investor buys a bond either a U.S. firm or the federal government​ issues, or when a foreign firm builds a factory in the United​ States, the transaction is recorded in the balance of payments as