samjmck / tobcalc

Web app that calculates the Belgian transaction tax from foreign brokers and fills in the tax declaration PDF
https://tobcalc.com
GNU Affero General Public License v3.0
62 stars 20 forks source link

ETF IE00BDBRDM35 considered as a stock (0.35% TOB) #5

Closed vivienbo closed 1 year ago

vivienbo commented 1 year ago

Some ETF are treated as stock by TOBcalc which applies a 0.35% tax rate.

Example ISIN Code ETF Name (and link to PRIIPS)
IE00BDBRDM35 iShares Global Aggregate Bond UCITS ETF - Hedged EUR Accu

The PRIIPS KID states it is a fund, managed by iShares III PLC which from my understanding is a SICAV/BEVEK.

Note:

samjmck commented 1 year ago

This is indeed an issue with the dataset. tobcalc searches the ISIN on Yahoo Finance and uses the search results to determine the type of security which could be stock, ETF or something else.

From my understanding, the mapping of the quoteType field in the Yahoo Finance search results is as followed:

Here's the exact code that handles this:

https://github.com/samjmck/tobcalc/blob/7ac8e27537cd9a873581cd5a9dfc06a60127e40c/src/data.ts#L155-L175

I believe the problem here is that the quote type of this security is EQUITY while it should be ETF.

Looking at IE00B4L60045, another bond ETF, we can see that this is correctly identified as an ETF on Yahoo Finance:

Screenshot 2023-03-20 at 09 34 36

Possible solutions

I could maybe add some code to check if the title of the security in Yahoo Finance contains the word "ETF", but that obviously is quite hacky and again, isn't a deterministic way to determine the type of security of a current ISIN.

As you already mentioned, it's also possible to override this in the interface of tobcalc.

If this is a popular ETF within the BEFIRE community, I can look into manually overriding the security type within the code i.e. hardcoding the details.

vivienbo commented 1 year ago

Hello,

Thanks for your quick analysis.

I don't know how popular it is in the BEFire community however for sure, this one is part of the r/BEFire Beginner's guide to index investing in Belgium section 3 Funds - Bonds.

So it's more likely people who started last 36 months are to buy at least this one to complement their portfolio (either now or later).

For the other bonds ETF I own, indeed there is no issue faced.

samjmck commented 1 year ago

Fixed in 1e743e1

https://github.com/samjmck/tobcalc/blob/1e743e1504494c3cbc7c8ca8d1a32be4912cc0a1/site/src/overrides.ts#L20-L58

May take some time for your browser cache to update with the newest version.