Generally, a foreign corporation must file a US tax return if it is engaged in a trade or business in the United States, whether or not it had income from that trade or business. It must also file if it had income, gains or losses treated as if they were effectively connected with a U.S. trade or business and, if it had income from any US source (even if its income is tax exempt under an income tax treaty or code section).