Downsides of not tracking the cost for investments

189 views
Skip to first unread message

Max Katsev

unread,
Apr 21, 2021, 11:43:37 PM4/21/21
to Beancount
Hello everyone,

I'm trying to switch from gnucash to beancount and having some trouble with the concept of tracking investments at cost. I feel that I've RTFM'd enough to understand the mechanics of cost vs price, but I'm not sure about the benefits of using cost in the first place.

Simply put: I have no plans to use beancount to calculate my taxes, why should I track cost at all? What are the disadvantages of just using price and not cost for everything (including investments)? As I understand it, this would be equivalent to how gnucash does it, which seems to work just fine for me so far. What am I missing?

In addition to extra bookkeeping complexity, tracking investments at cost turns capital gains into income, which (while correct from the taxation point of view) feels wrong to me. When I sell old investments at a gain and immediately buy something else with the resulting money, it doesn't create any meaningful income for me (especially if it's in a tax-advantaged account), my net worth is still exactly the same as yesterday - why do I want it to show up as income in my reports?

Thanks,
Max

redst...@gmail.com

unread,
Apr 22, 2021, 3:29:21 AM4/22/21
to Beancount
Beancount models financial transactions. All models are inherently limited. Some models are more limited than others. Modeling commodities held at cost as price conversions makes it a (very) limited model. If that serves your purposes fully and well, go right ahead. Some questions to help you decide:
- Would you want to know the performance of your commodities at a granular level (not just overall net worth) using something like beangrow?
- Would you want to know how much money you made off a particular sale?
- Would you want to know which lots to sell to optimize your taxes assuming your tax jurisdiction allows for this? Sounds like it doesn't.

No? Then use price conversions by all means. It's simple to switch down the line. You'll have to redo your sales (reductions), but that's something you'd have done anyway, so it's no extra overall effort.

For me, modeling commodities held at cost was one of the huge reasons I switched from ledger (and gnucash before that) to beancount. And v3 will model it even better, by accounting for commissions in the basis.

Boyd Kelly

unread,
Apr 22, 2021, 7:07:16 AM4/22/21
to bean...@googlegroups.com
When I sell old investments at a gain and immediately buy something else with the resulting money, it doesn't create any meaningful income for me

Really?  A realized gain is not income?

I have used Gnucash in the past, and it always wanted a purchase price for shares.  And then it had some realized and unrealized gain reports.

If you just need a text file with the current value of your investments.  Make a Google sheet, publish it, and then use wget to download the results. 

--
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/bf68f106-2913-41b1-8176-20ee0613755en%40googlegroups.com.


--

Max Katsev

unread,
Apr 22, 2021, 9:44:39 PM4/22/21
to Beancount
> Would you want to know the performance of your commodities at a granular level (not just overall net worth) using something like beangrow?
Do you really need to track cost basis for that? The document linked from the beangrow repository even states "Note that nowhere in our calculations was the cost basis used or factored in, so don't confuse it with market value. The cost basis is only useful for tax-related effects."
> Would you want to know which lots to sell to optimize your taxes assuming your tax jurisdiction allows for this? 
Yes but I think this would've been more important if I had the same stock in multiple brokerages. Since I don't, I can just use the brokerage website for this.

Max Katsev

unread,
Apr 22, 2021, 9:49:49 PM4/22/21
to Beancount
> Really?  A realized gain is not income?

Yesterday I had 10 MSFT (that I've bought a year ago at $170) in my Vanguard IRA account and $2500 in my Fidelity 401k. Today I've sold my 10 MSFT for $2500 in Vanguard and bought another 10 MSFT in Fidelity. I now have $2500 and 10 MSFT, exactly as yesterday, but somehow I've made $800 of income?


>  If you just need a text file with the current value of your investments.  Make a Google sheet, publish it, and then use wget to download the results. 

I have that too :) The value of gnucash/beancount for me is in the timeseries data and in having all assets/income/expenses (not just investments) in a single place.

redst...@gmail.com

unread,
Apr 23, 2021, 1:04:18 AM4/23/21
to Beancount
On Thursday, April 22, 2021 at 6:44:39 PM UTC-7 Max Katsev wrote:
> Would you want to know the performance of your commodities at a granular level (not just overall net worth) using something like beangrow?
Do you really need to track cost basis for that? The document linked from the beangrow repository even states "Note that nowhere in our calculations was the cost basis used or factored in, so don't confuse it with market value. The cost basis is only useful for tax-related effects."

I stand corrected: true, you need only cashflow for that, at least in principle.

> Would you want to know which lots to sell to optimize your taxes assuming your tax jurisdiction allows for this? 
Yes but I think this would've been more important if I had the same stock in multiple brokerages. Since I don't, I can just use the brokerage website for this.

Sure, that works.

Martin Blais

unread,
Apr 23, 2021, 1:13:43 AM4/23/21
to Beancount
Thread is a bit long, will respond here

On Thu, Apr 22, 2021 at 9:49 PM Max Katsev <mka...@gmail.com> wrote:
> Really?  A realized gain is not income?

Yesterday I had 10 MSFT (that I've bought a year ago at $170) in my Vanguard IRA account and $2500 in my Fidelity 401k. Today I've sold my 10 MSFT for $2500 in Vanguard and bought another 10 MSFT in Fidelity. I now have $2500 and 10 MSFT, exactly as yesterday, but somehow I've made $800 of income?

Yes.
You've turned unrealized gains into realized gains. Your total gains (unrealized + realized) hasn't changed though. Not only that, but if you did that, and you had a loss instead, you'd have a wash-loss case on your hands and would have to adjust your cost basis for your MSFT held at Fidelity by $800. And it gets nasty if you have multiple lots acquired at different times, and also, not exactly 10 lots.

But maybe you don't care and that's fine. The thing is, you don't have to track any of this. You can legitimately use Beancount without using the cost basis, that's totally up to you, it'll do its thing just fine. You probably won't be able to use Beangrow, and you won't be able to properly estimate tax liabilities for calculating your net worth. That's fine if you don't need it. But if you don't take care to store the cost information as you go - which is sometimes costly in time - good luck adding it in later when you'll want it.


redst...@gmail.com

unread,
Apr 23, 2021, 1:21:49 AM4/23/21
to Beancount
On Thursday, April 22, 2021 at 6:49:49 PM UTC-7 Max Katsev wrote:
> Really?  A realized gain is not income?

Yesterday I had 10 MSFT (that I've bought a year ago at $170) in my Vanguard IRA account and $2500 in my Fidelity 401k. Today I've sold my 10 MSFT for $2500 in Vanguard and bought another 10 MSFT in Fidelity. I now have $2500 and 10 MSFT, exactly as yesterday, but somehow I've made $800 of income?

I'm just as amazed as you that you think you *didn't* realize $800 of income. Most tax jurisdictions would agree, but that doesn't seem to be an issue in your case. You now have a stepped up basis in MSFT, with no direct record of why. You also have no clue which lots you sold and which you retained, meaning you have no clue what the tax liability of your portfolio is. You can't make tax adjusted asset allocations or optimizations.

Which is why IMO, this boils down to is what you're trying to model. If it's just extremely basic net worth, your simplified model works fine. Go for it. The thing I'd worry about if I were you is not storing cost basis, particularly on what you sell, and not being able to get that from your brokerage in the future when you discover a need for it.

Max Katsev

unread,
Apr 23, 2021, 2:09:27 AM4/23/21
to Beancount
Fair enough. I wanted to know if I'm missing something about the purpose of tracking cost in beancount and I guess the answer that it's mainly for tax reasons.

It's not that I'm philosophically opposed to it, more like I have 5+ years of transactions without the cost basis and I'm not sure how to start using it now without having to backfill everything at once. Is there a good way to record the lots I currently own (according to the brokerage) without filling in all the history that led to their creation?

Although I'm still not clear on why I should consider it income when my 401k provider decides to automatically swap out the ETF I own to a different share class with a different ticker and price.

James Cook

unread,
Apr 23, 2021, 1:53:23 PM4/23/21
to bean...@googlegroups.com
On Thu, Apr 22, 2021 at 11:09:27PM -0700, Max Katsev wrote:
> Fair enough. I wanted to know if I'm missing something about the purpose of
> tracking cost in beancount and I guess the answer that it's mainly for tax
> reasons.
>
> It's not that I'm philosophically opposed to it, more like I have 5+ years
> of transactions without the cost basis and I'm not sure how to start using
> it now without having to backfill everything at once. Is there a good way
> to record the lots I currently own (according to the brokerage) without
> filling in all the history that led to their creation?
>
> Although I'm still not clear on why I should consider it income when my
> 401k provider decides to automatically swap out the ETF I own to a
> different share class with a different ticker and price.

If you're looking for solidarity: you're not alone. I also think it's a
bit odd to consider that income.

But practically speaking, I need to get my taxes done, so I account for
things the way my tax authorities want me to. (Sometimes it involves
some mental gymnastics; see my other recent thread.)

--
James

James Cook

unread,
Apr 23, 2021, 1:58:14 PM4/23/21
to bean...@googlegroups.com
On Thu, Apr 22, 2021 at 11:09:27PM -0700, Max Katsev wrote:
...
> It's not that I'm philosophically opposed to it, more like I have 5+ years
> of transactions without the cost basis and I'm not sure how to start using
> it now without having to backfill everything at once. Is there a good way
> to record the lots I currently own (according to the brokerage) without
> filling in all the history that led to their creation?

The following might work.

Pick a date on which you'd like to start tracking things with lots. Say it's
2020-01-01.

Then on that date, create transactions that convert all your holdings into
lots. For example, suppose in Account:Brokerage, you hold 10 ACME, bought
2009-01-01 at a cost of 100.00 USD per ACME. Then you could do:

2020-01-01 * "Convert to lots"
Assets:Brokerage -10 ACME
Assets:Brokerage 10 ACME {100.00 USD, 2009-01-01}

Do the same for all your other holdings, on that date. Then you can start
following a policy of always using lots.

I have not tested this, and have only limited experience with Beancount lots,
but as far as I know it should work.

--
James

James Cook

unread,
Apr 23, 2021, 2:00:33 PM4/23/21
to bean...@googlegroups.com
On Fri, Apr 23, 2021 at 05:58:10PM +0000, James Cook wrote:
> On Thu, Apr 22, 2021 at 11:09:27PM -0700, Max Katsev wrote:
> ...
> > It's not that I'm philosophically opposed to it, more like I have 5+ years
> > of transactions without the cost basis and I'm not sure how to start using
> > it now without having to backfill everything at once. Is there a good way
> > to record the lots I currently own (according to the brokerage) without
> > filling in all the history that led to their creation?
>
> The following might work.
>
> Pick a date on which you'd like to start tracking things with lots. Say it's
> 2020-01-01.
>
> Then on that date, create transactions that convert all your holdings into
> lots. For example, suppose in Account:Brokerage, you hold 10 ACME, bought
> 2009-01-01 at a cost of 100.00 USD per ACME. Then you could do:
>
> 2020-01-01 * "Convert to lots"
> Assets:Brokerage -10 ACME
> Assets:Brokerage 10 ACME {100.00 USD, 2009-01-01}

Correction: that transaction is not balanced... I guess you will need
to put the imbalance into some other account. New attepmt:

2020-01-01 * "Convert to lots"
Assets:Brokerage -10 ACME
Assets:Brokerage 10 ACME {100.00 USD, 2009-01-01}
Equity:Hacky-conversion-account 10 ACME
Equity:Hacky-conversion-account -1000.00 USD

or just let Beancount fill it out.

2020-01-01 * "Convert to lots"
Assets:Brokerage -10 ACME
Assets:Brokerage 10 ACME {100.00 USD, 2009-01-01}
Equity:Hacky-conversion-account

--
James

James Cook

unread,
Apr 23, 2021, 2:01:29 PM4/23/21
to bean...@googlegroups.com
Er, sorry for the noise, but this version is simpler:

2020-01-01 * "Convert to lots"
Assets:Brokerage -10 ACME @ 100.00 USD
Assets:Brokerage 10 ACME {100.00 USD, 2009-01-01}

--
James

Max Katsev

unread,
Apr 23, 2021, 2:05:16 PM4/23/21
to Beancount
This version is problematic if using the implicit prices plugin, since it introduces an outdated price into the db.

redst...@gmail.com

unread,
Apr 25, 2021, 3:14:57 PM4/25/21
to Beancount
Fair enough. I wanted to know if I'm missing something about the purpose of tracking cost in beancount and I guess the answer that it's mainly for tax reasons.

Sounds like you realize this already, but: tax planning and strategy are an important and integral part of asset management for those with any significant assets. This becomes tricky once one (is forced to) has multiple brokers for various reasons. You might find yourself wanting beancount to do tax analysis later down the line.

It's not that I'm philosophically opposed to it, more like I have 5+ years of transactions without the cost basis and I'm not sure how to start using it now without having to backfill everything at once. Is there a good way to record the lots I currently own (according to the brokerage) without filling in all the history that led to their creation?

In addition to what the other posters on this thread suggested, when I first ran into this long ago, one of my accounts happened to have used FIFO, which beancount already has, which meant zero work for me other than setting it. For account with SpecID, I wrote a simple parser to which I fed screenscrapes of sale transactions (of which I didn't have many) with lot info. This was relatively easy.

Although I'm still not clear on why I should consider it income when my 401k provider decides to automatically swap out the ETF I own to a different share class with a different ticker and price.

Income is not realized in this case by the IRS (because it's just changing share class, even if done outside a 401k). I agree philosophically too that income has not been realized (same underlying asset, not a sale/buy, but a change in class, like a stock split), but to each his own.

redst...@gmail.com

unread,
Apr 25, 2021, 3:20:49 PM4/25/21
to Beancount
Fair enough. I wanted to know if I'm missing something about the purpose of tracking cost in beancount and I guess the answer that it's mainly for tax reasons. 

Tracking income realization (regardless of lot tracking) helps me build insights about my portfolio. Over-simplified example:
2015 Buy 100 HOOLI at $1 each
2016 Sell 100 HOOLI at $5 each
2016 Buy 100 ORNG at $5 each
2017 Sell 100 ORNG at $1 each

Insight: overall $0 gain, but that came from +$400, then -$400. Realized income tracking lets me understand that.

redst...@gmail.com

unread,
Apr 25, 2021, 3:28:52 PM4/25/21
to Beancount
Is it adding a price of $100 USD on 2020-01-01? If so, the plugin needs to be fixed. I think I recall running into the same issue when changing share classes. Lots with a date specification should add a price entry for that date, not for the transaction date. Feel free to file a bug (or even better, a PR).
Reply all
Reply to author
Forward
0 new messages