If you are an American citizen/greencard holder and have a margin account at a non-US brokerage, you may want to think twice before trying to claim your margin interest as an investment expense.
It turns out that the IRS believes that margin interest is US taxable income from the broker’s perspective, and thus the client is required to make a 30% withholding of any interest payment and send it to the IRS. This is obviously phenomenally stupid, since there is no way in hell that a non-US broker would allow me to only pay 70% of my margin interest bill and send the rest to the IRS. Most likely they would tell me to fuck off and close my account.
A similar argument can be used to argue that credit card or mortgage interest payments to non-US banks should also be subject to a 30% withholding, which would make it impossible for US residents to carry a foreign credit card balance or get a mortgage for a house.
Since this is obviously stupid, the real result is that you should think twice about trying to deduct interest on a foreign mortgage on your schedule A. As one person puts it:
Mortgage interest on a second home is deductible on schedule A as an itemized deduction, even if the second home is located outside the U.S. However, if you reside in the U.S. and the lender is a foreign person/bank, then you are required to withhold 30% tax on the interest portion of the payments, unless a lower treaty rate applies. Depending on the jurisdiction, a treaty may apply to reduce or eliminate the withholding tax. However, if you want to rely on the treaty, you need to obtain a Form W-8BEN from the foreign lender where the lender certifies that it qualifies for treaty benefits. In either case, you will need to also file Form 1042 and 1042-S reporting that you made interest payments to foreign persons.
I think this starts to fall into the “Three Felonies a Day” category, where Americans are put into the position where it is impossible to live your life without putting yourself in the situation where you could be prosecuted for something if the government put its mind to it.
In case you were wondering, the Spain/US tax treaty has this to say about interest payments:
(b) interest on long-term loans (5 or more years) granted by banks or other financial institutions which are residents of a Contracting State shall be taxable only in that State;
Unfortunately if you want to take advantage of the tax treaty, you have to file 8833 “Treaty-based return position”, which requires getting a W-8BEN from a Spanish bank, which might be a challenge.