Matching Trades on Schedule D


Consider the following example:

Your trade history shows the following trade transactions:

01/05/2006 Buy 100 shares MSFT @ $25.00 $2,500.00
01/06/2006 Buy 50 shares MSFT @ $24.00 $1,200.00
01/08/2006 Sell 50 shares MSFT @ $26.00 $1,300.00
01/09/2006 Sell 100 shares MSFT @ $27.00 $2,700.00

This would result in the following 3 line items on schedule d:

(a) Description of property (b) Date acquired (c) Date sold (d) Sales price (e) Cost or other basis (f) Gain (or loss)
1) 50 sh. MSFT 01/05/2006 01/08/2006 $1,300.00 $1,250.00 $50.00
2) 50 sh. MSFT 01/05/2006 01/09/2006 $1,350.00 $1,250.00 $100.00
3) 50 sh. MSFT 01/06/2006 01/09/2006 $1,350.00 $1,200.00 $150.00

  • Please notice that the 50 shares sold on 01/08/2006 were not matched to the 50 shares bought on 01/06/2006, but because of the IRS FIFO rule, these were matched to those bought on 01/05/2006 (First bought get matched to first sold).  So part of the cost basis of the 100 shares goes to trade # 1 and part goes to trade #2.
  • Trade #2 is only for 50 shares because there were 50 shares left of those bought on 01/05/2006 and these have to be matched to 50 of the 100 shares sold on 01/09/2006.
  • The same is true for trade #3 where the 50 shares left that were sold on 01/09/2006 now get matched to the 50 shares bought on 01/06/2006.

Now try matching the following securities transactions:

01/05/2006 Buy 100 shares MSFT @ $25.00 $2,500.00
01/06/2006 Buy 50 shares MSFT @ $24.00 $1,200.00
01/06/2006 Buy 75 shares MSFT @ $23.00 $1,725.00
01/06/2006 Buy 25 shares MSFT @ $22.00 $550.00
01/08/2006 Sell 50 shares MSFT @ $26.00 $1,300.00
01/08/2006 Sell 35 shares MSFT @ $24.00 $840.00
01/08/2006 Sell 65 shares MSFT @ $23.00 $1,495.00
01/09/2006 Sell 60 shares MSFT @ $28.00 $1,680.00
01/09/2006 Sell 40 shares MSFT @ $29.00 $1,160.00

It starts out quite simple, but quickly gets complicated because each trade is made up of buys and sells of unequal numbers of shares.  So things need to be broken up in the smallest number of shares, either on the buy side or the sell side.  This is quite common for the active trader, even for the investor.  How long would this rather simple list take you to match if you were doing so manually?  Or how complicated would your spreadsheet have to be to accomplish this?  We originally used an Excel spreadsheet for this but found that even Excel is pushed to the limits when presented with such a challenge.

Did you give up? Does your list of matched trades look anything like the following?

(a) Description of property (b) Date acquired (c) Date sold (d) Sales price (e) Cost or other basis (f) Gain (or loss)
1) 50 sh. MSFT 01/05/2006 01/08/2006 $1,300.00 $1,250.00 $50.00
2) 35 sh. MSFT 01/05/2006 01/08/2006 $840.00 $875.00 ($35.00)
3) 15 sh. MSFT 01/05/2006 01/08/2006 $345.00 $375.00 ($30.00)
4) 50 sh. MSFT 01/06/2006 01/08/2006 $1,150.00 $1,200.00 ($50.00)
5) 60 sh. MSFT 01/06/2006 01/09/2006 $1,680.00 $1,380.00 $300.00
6) 15 sh. MSFT 01/06/2006 01/09/2006 $435.00 $345.00 $90.00
7) 25 sh. MSFT 01/06/2006 01/09/2006 $725.00 $550.00 $175.00
    Totals: $6,475.00 $5,975.00 $500.00

This list took less than 1 second for TradeLog™ to generate.

Wash Sales on Schedule D

But wait, because there were some loss trades which were bought back within the 30 day window, shouldn't there be some wash sales?  You are correct, and these wash trades need to have wash sale adjustments.  Can you figure out how to make the necessary wash sales entries on your schedule d as well as adjusting the cost basis of the trades causing the wash sales?  Please take a close look at the following:

(a) Description of property (b) Date acquired (c) Date sold (d) Sales price (e) Cost or other basis (f) Gain (or loss)
1) 50 sh. MSFT 01/05/2008 01/08/2008 $1,300.00 $1,250.00 $50.00
2) 35 sh. MSFT 01/05/2008 01/08/2008 $840.00 $875.00 ($35.00)
 Wash Sale Adj - 15 sh. 01/05/2008     ($15.00) $15.00
 Wash Sale Adj - 20 sh. 01/06/2008     ($20.00) $20.00
3) 15 sh. MSFT 01/05/2008 01/08/2008 $345.00 $390.00 ($45.00)
 Wash Sale Adj - 15 sh. 01/06/2008     ($45.00) $45.00
4) 50 sh. MSFT 01/06/2008 01/08/2008 $1,150.00 $1,265.00 ($115.00)
 Wash Sale Adj - 50 sh. 01/06/2008     ($115.00) $115.00
5) 60 sh. MSFT 01/06/2008 01/09/2008 $1,680.00 $1,495.00 $185.00
6) 15 sh. MSFT 01/06/2008 01/09/2008 $435.00 $345.00 $90.00
7) 25 sh. MSFT 01/06/2008 01/09/2008 $725.00 $550.00 $175.00
    Totals: $6,475.00 $5,975.00 $500.00

This also took less than 1 second for TradeLog™ to generate.

Please notice that the loss on trade #2 had two different trades where shares were repurchased within 30 days.  This caused two wash sale adjustments and adjusted the cost basis of trades # 3 and 4.  In addition, the left over 30 shares of trade #4 triggered still another wash sale adjustment on the 15 shares from trade #3.  Please note that all of this moving forward of wash sale adjustments had no affect on your bottom line. 

But what if this sequence had occurred at year end with trades 5-7 being completed in Jan of 2008? Please see our discussion: Wash Sales: How they affect me.



Please note: This information is provided only as a general guide and is not to be taken as official IRS instructions. Armen Computing Ltd. does not make investment recommendations nor provide financial, tax or legal advice. You are solely responsible for your investment and tax reporting decisions. Please consult your tax advisor or accountant to discuss your specific situation.

TradeLog Purchase

TradeLog Free Trial