as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
how does the u.s. wash sale replacement stock rule work?
user
edited: pub 550 says 30 days before or after so the example is ok - but still a gain by average share basis.  on sale your basis is likely defaulted to "average price" (in the example 9.67 so there was a gain selling at 10), but can be named shares at your election to your brokerage,  and supported by record keeping. a pub 550 wash might be buy 2000 @ 10 with basis 20000, sell 1000 @9 (nominally a loss of 1000 for now and remaining basis 10000), buy 1000 @ 8 within 30 days.   because of the wash sale rule the basis is 10000+8000 paid + 1000 disallowed loss from wash sale with a final position of 2000 shares at 19000 basis.  i think i have the link at the example:  http://www.irs.gov/publications/p550/ch04.html#en_us_2014_publink100010601
assistant