Fava Investor - ticker-util - Asset Class & Allocations

66 views
Skip to first unread message

Justin Steffen

unread,
Sep 25, 2025, 9:15:55 PMSep 25
to Beancount
Hey folks,

I've been having so much fun adding more and more of my financial life to my personal beancount ledger files. I'm finally at a new point in my journey which is around taking advantage of beancount + fava investor and related plugins.

I'm trying to figure out how to get authoritative definitions of asset classes and allocations out of ticker-util which I believe sources this information from Yahoo?Or is it a manual process to get this information from somewhere else?

When I run this command:

uv run ticker-util gen-commodities-file \
  --cf ledger/commodities-generated.beancount \
  --prefix a__ \
  --metadata quoteType,longName,isin,annualReportExpenseRatio,preferredPosition,bondPosition,convertiblePosition,otherPosition,cashPosition,stockPosition,category,fundFamily \
  --appends isin \
  --include-undeclared \
  --write-file \
  --confirm-overwrite

Here is an example of what ticker-util writes:

2025-09-25 commodity BND
  a__quoteType: "ETF"
  name: "Vanguard Total Bond Market Index Fund"
  a__isin: "US9219378356"
  a__category: "Intermediate Core Bond"
  a__fundFamily: "Vanguard"

2025-09-25 commodity BNDX
  a__quoteType: "ETF"
  name: "Vanguard Total International Bond Index Fund"
  a__isin: "US92203J4076"
  a__category: "Global Bond-USD Hedged"
  a__fundFamily: "Vanguard"

2025-09-25 commodity FXAIX
  a__quoteType: "MUTUALFUND"
  name: "Fidelity 500 Index"
  a__isin: "US3159117502"
  a__annualReportExpenseRatio: "0.01"

I'd like to get accurate  asset_class, and  asset_allocation_bond from somewhere in an automated fashion if possible. Right now I just accepted what ChatGPT tells me. :D 

Thanks!

redst...@gmail.com

unread,
Sep 25, 2025, 11:10:58 PMSep 25
to Beancount

Hi there,
Author of ticker-util here. When I run your command, I get:

2025-09-25 commodity BND a__quoteType: "ETF" name: "Vanguard Total Bond Market Index Fund" a__isin: "US9219378356" a__annualReportExpenseRatio: "0.03" a__asset_allocation_bond: "7" a__category: "Intermediate-Term Bond" a__fundFamily: "Vanguard" 2025-09-25 commodity FXAIX a__quoteType: "MUTUALFUND" name: "Fidelity 500 Index Fund" a__isin: "US3159117502" a__annualReportExpenseRatio: "0.01" a__asset_allocation_cash: "0" a__asset_allocation_stock: "100"

Yes, all this comes from Yahoo data. There’s a few problems I see here in generating asset_allocation_* metadata:

  1. I don’t know why it’s not generating these for you as it did for me above. Perhaps try deleting your yahoo cache and retry?
  2. Even when it does, I don’t find the data to be fully reliable. As you can see with BND above. I use it as a good first pass, and go manually fix what I need to. If you had too many tickers to do it manually, chatGPT would be a good option
  3. As you can see above, the value is printed as a string ("100" instead of 100), which probably needs to be fixed as well.

Hope that helps! Let me know if not.

Reply all
Reply to author
Forward
0 new messages