@ac203 , I am sorry I have to disagree with your expert's advice.
(a) from your post you invested in foreign stock, the buying of foreign currency was incidental to your main objective. Thus any currency related gain/loss is part and parcel of the round-trip transaction of buying stocks, holding the stock and then disposing of the stocks. Thus it is once simple transaction ( just a if you bought and sold stocks in the US market;
(b) the quoted reply from HACKITOFF deals with , and only with , investing in foreign currency as a business and therefore does not apply to you
(c) section 988 again deals with currency and debt instruments held for investment -- here is the definition of the section 988 transaction ( and is not applicable to you, prima facie :(
"(c)Other definitionsFor purposes of this section—
(1)Section 988 transaction
(A)In generalThe term “section 988 transaction” means any transaction described in subparagraph (B) if the amount which the taxpayer is entitled to receive (or is required to pay) by reason of such transaction—
(ii)
is determined by reference to the value of 1 or more nonfunctional currencies.
(B)Description of transactionsFor purposes of subparagraph (A), the following transactions are described in this subparagraph:
(ii)
Accruing (or otherwise taking into account) for purposes of this subtitle any item of expense or gross income or receipts which is to be paid or received after the date on which so accrued or taken into account.
(iii)
Entering into or acquiring any forward contract, futures contract, option, or similar financial instrument.
The Secretary may prescribe regulations excluding from the application of clause (ii) any class of items the taking into account of which is not necessary to carry out the purposes of this section by reason of the small amounts or short periods involved, or otherwise.
I am at a loss to understand what you are trying to achieve by partitioning off stocks transaction and the currency transaction ? Do not understand why this method of recognizing loss/gain would give a better outcome than using the total transaction ( i.e. one transaction including the effect of currency fluctuation ).
Namaste