ETF (NYSEARCA: IVV) both track the S&P 500. If an investor purchases shares in SPY and the market price declines, the IRS has not provided guidance on whether the investor can sell their shares in SPY, purchase shares in IVV, and claim a capital loss without triggering the wash sale rule, despite the fact that the two ETFs have nearly identical returns. Methods of optimal tax loss harvesting Mean-variance portfolio optimization With an initial set of portfolio weights and benchmark weights , it is possible to do TLH within the confines of mean-variance optimization by developing an objective function that maximizes the difference between tax alpha and the portfolio's tracking error: where is a penalty term for excess tracking error and is the covariance matrix of asset returns. For each asset that is bought/sold, it is necessary to include the constraints: With this formulation, the TLH optimization may be applied within a mean-variance framework. The solution is readily computed using quadratic programming. See also Ex-dividend date, where favorable tax treatment of qualified dividends is contingent on a 60-day holding period, similar to the wash sale rules. Round-tripping, a type of accounting fraud practiced through asset swapping, resembling wash sales within a group of participants. References External links Stock market Taxation in the United States Tax avoidance in the United States Tax terms