I'm wondering if there is any scenario where closing a position could trigger the wash sale rules. For example, would the wash sale rule apply to the transactions in the following scenario?
In June 2016, I open 2 positions:
i buy 100 shares of IBM i write 1 call option on IBM expiring January 2017
on December 20, 2016, I close 1 position for a loss:
I sell 100 shares of IBM to close my position at a loss
on January 5, 2017 I close my remaining position for a gain:
I buy to close my call before it expires
the wording of the wash sale regulation says "entered into a contract or option", so I'm wondering if buying an option to close a position might qualify as "entering" https://www.law.cornell.edu/cfr/text/26/1.1091-1
It seems the IRS considers options and stocks to be substantially identical, as per Internal Revenue Service Ruling 85-87.