Internal Transfer Mutual funds - SPAIN Use case

97 views
Skip to first unread message

Pablo Osers

unread,
May 27, 2021, 4:52:00 AM5/27/21
to Beancount
Hi guys,

Quick question, how would you input the internal transfer/switch from one index fund to another without accounting any Gains/Losses.

In SPAIN, we can "swap" or "move" the units of one index fund to another without generating any gains/losses until the final SELL operation.

Best regards
Pablo

Ben Blount

unread,
May 27, 2021, 3:13:10 PM5/27/21
to Beancount
I think you'll have to make some tradeoffs to represent this.
For tax tracking purposes, you'll want to keep the total cost basis the same. That will let you calculate realized profit when you choose to sell.
For investment performance purposes, you want to know what price you actually bought it at.

Assuming the tax part is more important to you, you can track like this:

2021-01-01 * "Buy"
  Assets:Brokerage  10 AAA {{10 EUR}}; Buy 10 AAA at 1 EUR each.
  Assets:Bank      -10 EUR

2021-05-01 * "Exchange"
  Assets:Brokerage  -10 AAA {1 EUR}  ; AAA price is now 2 EUR per unit. 20 EUR transfer.
  Assets:Brokerage   4 BBB {{ 10 EUR }} ; BBB current price 5 EUR. Buy 20 EUR of BBB, 10 EUR cost.


An important downside of this method: Beancount uses the `units * cost` as the weight of the posting. That means that if you made a typo and exchanged into 40 BBB, Beancount has no way to check that.

--
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/c841c67a-6e0a-41df-8df5-bf913f69fa9an%40googlegroups.com.

redst...@gmail.com

unread,
May 28, 2021, 1:37:46 AM5/28/21
to Beancount
Ben nailed it with this being a tax vs. performance tracking issue. To add to his response, if performance tracking is more important, I'd do a regular sell transaction followed by a buy transaction, both at current market prices, and book the Income into a Income:Capital-Gains:Unrealized-for-Taxes account. When you later realize it for taxes, move that income from this into a Income:Capital-Gains:Realized account.

Pablo Osers

unread,
May 28, 2021, 9:34:07 AM5/28/21
to Beancount
Many thanks guys!

I'm quite new to BC and I need to understand properly the impact on what you are proposing.

Also, I'm trying to program something (report in FAVA) that can produce something like this for my portfolio follow-up and performance.

This is implemented in google sheets, I want to port it to FAVA+Beancount -> can you give me some pointers on what api and where to start? And how to map this with what you are proposing on the "transfer" positions.

Thanks

dashboard.png

Ben Blount

unread,
May 28, 2021, 12:03:15 PM5/28/21
to Beancount
Hey Pablo,
Nice dashboard! I recommend searching the mailing list archive, there's a wealth of info.

Also take a look at Fava investor, also discussed here.

Reply all
Reply to author
Forward
0 new messages