Wash Sales

116 views
Skip to first unread message

Colton Crivelli

unread,
Nov 24, 2022, 4:55:46 PM11/24/22
to bean...@googlegroups.com
I've been struggling with the *right way* to account for wash sales. I've been reading these:

My situation is pretty simple:
- bought some stock
- a bit later sold some lots at a loss
- automatic dividend reinvestment got me (oops) and this is what triggered the wash sale
- few months later I sell the lot that triggered the wash sales

I can adjust the cost basis of the lot that triggered the wash sale but the problem is that the new cost basis throws off my later transaction when I sell the wash sale lots.

My case is exactly like this one:

Except that after the last transaction there is one more transaction where I sold the lot with the adjusted cost basis and I can't get this to balance (even if I use an account like "Income:Investments:PnL:Wash"

Any tips appreciated!

Colton

Robert Sesek

unread,
Nov 25, 2022, 8:31:15 AM11/25/22
to Beancount
I book wash sales similar to that example. Though I do adjust the disallowed loss into a Wash account, rather than directly into PnL.

What cost basis lot are you using to reduce the inventory when you sell the shares? You need to use the adjusted cost basis for those shares. Here is a hypothetical sale based on the example in irs-simple-example-1.beancount:

2014-01-01 * "Sell adjusted lots"
  Assets:Investments:STOCK         -100 STOCK {10.5 USD} @ 11.00 USD ; Adjusted cost basis shares
  Assets:Investments:Cash      1,100.00 USD
  Income:Investments:PnL         -50.00 USD ; PnL from the adjusted cost basis

Conceptually, the transactions are:
- Buy stock
- Sell stock at a loss
- Dividend reinvestment
- Cost basis adjustment of the reinvested dividend shares by the loss amount
- Sell reinvested shares, reducing the position by the lot with adjusted cost basis

If you are still having trouble, it would be helpful for you to post the transactions you are having an issue with. 

- Robert

Colton Crivelli

unread,
Nov 26, 2022, 2:35:35 AM11/26/22
to bean...@googlegroups.com
I think I’m missing something fundamental — a slightly simplified example of what I’m doing is provided below.

I can get the final transaction to balance but at that point Income:US:Fidelity:PnL:Wash is back to zero. I know my brokerage is still tracking the wash sale though and wouldn’t I want to be tracking a non-zero value for taxes?

Colton

2021-09-07 * "FXAIX Purchase"
Assets:Investments:Taxable:IndexFunds:FXAIX 31.803 FXAIX {157.22 USD}
Assets:Investments:Cash

2021-12-10 * "FXAIX dividend reinvestment"
Assets:Investments:Taxable:IndexFunds:FXAIX 4.065 FXAIX {163.33 USD}
Assets:Investments:Cash

2022-04-08 * "FXAIX dividend reinvestment"
Assets:Investments:Taxable:IndexFunds:FXAIX 3.388 FXAIX {155.83 USD}
Assets:Investments:Cash

2022-06-16 * "FXAIX Sell"
Assets:Investments:Taxable:IndexFunds:FXAIX -31.803 FXAIX {157.22 USD} @ 127.73 USD
Assets:Investments:Taxable:IndexFunds:FXAIX -4.065 FXAIX {163.33 USD}
Assets:Investments:Taxable:IndexFunds:FXAIX -3.388 FXAIX {155.83 USD}
Assets:US:Fidelity:IndexFunds:Cash 5,014.17 USD
Income:US:Fidelity:PnL 1177.79 USD ; because of the next transaction this should be reduced by 141.90

2022-07-01 * "FXAIX dividend reinvestment" ; this caused the wash sale
Assets:Investments:Taxable:IndexFunds:FXAIX 4.812 FXAIX {162.23 USD}
Assets:Investments:Cash

2022-07-01 * "Re-adjust cost basis due to Wash Sale"
Assets:Investments:Taxable:IndexFunds:FXAIX -4.812 FXAIX {162.23 USD}
Assets:Investments:Taxable:IndexFunds:FXAIX 4.812 FXAIX {191.719 USD} ; also suppose to propagate the date?
Income:US:Fidelity:PnL:Wash -141.90 USD ; accounting for wash sale

2022-11-15 * "FXAIX Sell"
Assets:Investments:Taxable:IndexFunds:FXAIX -4.812 FXAIX {191.719 USD} @ 138.72 USD
Assets:US:Fidelity:IndexFunds:Cash 667.52 USD ; should match cash deposited from transaction
Income:US:Fidelity:PnL 113.13 USD ; loss from the transaction
Income:US:Fidelity:PnL:Wash 141.90 USD ; required to balance but results in zero'ing out PnL:Wash

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3f3f5550-598f-480d-958d-7545d6752a7bn%40googlegroups.com.

Robert Sesek

unread,
Nov 26, 2022, 10:42:41 AM11/26/22
to Beancount
Once you acquire new shares, then the wash sale amount gets added to the cost basis of the replacement shares. The Wash account should balance to zero in that situation, because the disallowed loss amount is consumed by the new shares' cost basis. There is no separate wash sale amount you report on your taxes: on Form 8949 you report that a loss was disallowed because of a wash sale. The disallowed loss gets applied to a future tax lot's cost basis, and that is only reported when you ultimately sell those shares with the adjusted cost basis.

I would rewrite the last two transactions of your example differently:

2022-06-16 * "FXAIX" "Wash sale disallowed loss from 2022-07-01"
  ; New back-dated transaction to disallow the loss, since the PnL cannot be captured for tax purposes
  Income:US:Fidelity:PnL             -141.90 USD
  Income:US:Fidelity:PnL:Wash         141.90 USD

2022-07-01 * "FXAIX" "Wash sale cost basis adjustment"

  Assets:Investments:Taxable:IndexFunds:FXAIX  -4.812 FXAIX {162.23 USD}
  Assets:Investments:Taxable:IndexFunds:FXAIX   4.812 FXAIX {191.719 USD}
  Income:US:Fidelity:PnL:Wash                  -141.90 USD

2022-11-15 * "FXAIX" "Sell"
  Assets:Investments:Taxable:IndexFunds:FXAIX  -4.812 FXAIX {191.719 USD} @ 138.72 USD
  Assets:US:Fidelity:IndexFunds:Cash          667.52 USD
  Income:US:Fidelity:PnL                      255.03 USD

You are right that the date needs to be propagated, but if you make the adjustment on the same day as the acquisition of the replacement shares, then the implicit date works fine. However, you technically need to adjust the cost basis date as well, to reflect the holding period adjustment that also happens during a wash sale. 

- Robert

Colton Crivelli

unread,
Nov 26, 2022, 12:36:40 PM11/26/22
to bean...@googlegroups.com
When I look at “Realized Gain/Loss Summary for 2022” from my brokerage I can see:
- Short Term Gain/Loss +141.90 (this makes since, it’s the disallowed loss)
- When I eventually sell the 4.812 shares in the future there’s a -113.12 Long term loss

This makes sense to me because the disallowed loss is accounted for. My current Gain/Loss for 2022 still shows that the 141.90 was disallowed.

However, with our beancount examples my Income:US:Fidelity:PnL does not account for the 141.90 change after 11/15.
- Income:US:Fidelity:PnL:Wash is 0 after 11/15
- Income:US:Fidelity:PnL was reduced by 141.90 on 6/16 but was increased by 141.90 on 11/15

Basically my only confusion is that even though I’ve sold the adjusted cost basis lot, I’m still under the impression that 141.90 should be a disallowed loss that should be represented somewhere. In our beancount examples, the values of the PnL accounts after 11/15 are at exactly the same values they would be at if we never adjusted the cost basis of the 4.812 shares.

Colton

Colton Crivelli

unread,
Nov 26, 2022, 12:48:10 PM11/26/22
to bean...@googlegroups.com
Perhaps my issue is that I’m assuming my brokerage adjusted the cost basis of the 4.812 shares but it’s actually reflected through other lots. There must either be an existing lot that I still own with adjusted cost basis or there is a lot I’ve sold that had an extra loss of 141.90 through an adjusted cost basis. 

I’ll look into that as well. Appreciate all the help!

Colton

Colton Crivelli

unread,
Nov 26, 2022, 1:55:33 PM11/26/22
to bean...@googlegroups.com
Alright - closing out the thread after figuring out how I confused myself.

In our examples we adjusted the cost basis from ~162 to ~191. The actual original cost was ~132 and I should have been adjusting to ~162. I can reconcile beancount with my brokerage after fixing this.

The difference between accounting for wash sales and not accounting for wash sales in my specific case is whether or not that final ~113 loss is classified as a short term loss or a long term loss (probably there is a lesson about the importance of propagating the date in here). The total loss/gain after 11/15 is the same regardless if I accounted for the wash sale or not. Only the classification of long term vs short term changes.

Thanks again

Colton

Robert S

unread,
Nov 30, 2022, 7:47:01 PM11/30/22
to Beancount
Glad you got it sorted.

Regarding the dates: yes, the short- vs. long-term classification can change as the result of propagating a wash sale. When the disallowed loss occurs, the holding period of the replacement shares is also adjusted to include the holding period of the shares with the disallowed loss. I.e. the number of days you held the sold shares should be added to the cost basis date of the replacement shares. This can convert a short-term gain/loss to a long-term one.

- Robert

Reply all
Reply to author
Forward
0 new messages