On tickers and identifiers

113 views
Skip to first unread message

Red S

unread,
Aug 6, 2022, 5:09:22 PM8/6/22
to Beancount
Ofx files typically refer to tickers (stocks, funds, etc.) by using identifiers. For example, Fidelity’s “Fidelity 500 Index Fund” with a ticker of FXAIX is referred to in Vanguard ofx files by its ISIN, “US3159117502. Worse, different brokers use different identifiers to refer to the same ticker.

In this new article, Tickers and Identifiers, I write about how to manage these as automatically generated metadata in your commodity declarations, which your importers can use.

The utility used is ticker-util, which I wrote about previously. You may also want to check out Know Your Tickers, which talks about how to automatically download and maintain commodity metadata with ticker-util.

ticker-util ships with Fava Investor.

Martin Blais

unread,
Sep 4, 2022, 6:07:02 PM9/4/22
to bean...@googlegroups.com
Thanks for sharing Red S.

The harder questions on ticker management IMO are around options and multipliers. Options are instruments that have a limited lifetime, and a lot of parameters. IMO the best way to manage those is by using a long and explicit symbol name which includes all the relevant components, the expiration date, base instrument code, and strike price. Futures options also involve two expiration dates, and a separate product code for the options class itself (the base code being for the deliverable itself). It's not obvious since expiration dates aren't carried through in upstream systems (and I've had to resolve those using a historical database https://github.com/blais/mulmat of (futures, options) pairs and their actual expirations). There are also other complications around splits, which sometimes require, at least temporarily, a different deliverable for the stock.

What's more, is that options and futures involve a multiplier (and American options on equities typically have a 100 multiplier), and that also needs to be either pulled from a database or weaved into the symbol or commodity declaration.

See also my old doc on symbology:

The symbology I describe in the doc is actually more terse than what I'd use if I started over today; I would likely include both the base and options class codes as well as the multiplier in the symbol, and extra infos to identify European vs. American contract styles and leave space for anything else. Basically give up on having a separate lookup db and put all the parameters into the symbol name. IMO the convenience is worthwhile.



--
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/7edba807-a030-4cae-adab-b62aa0d68534n%40googlegroups.com.

Red S

unread,
Sep 17, 2022, 2:24:40 AM9/17/22
to Beancount
As usual, thanks for sharing, Martin. I personally have stopped dealing with options, but this is great for investors that do.

To be clear, many of the tools I publish here do not purport to solve the harder questions, but rather, solve the very common pain points that many or even most users would have, especially when updating their ledgers. A common experience for me in the past was to sit down to do some accounting, only to be waylaid and finding myself playing whack-a-mole with several problems that came up while importing. Which I find disruptive to my accounting workflow and state of mind.

Trace amounts of that occasionally still occur, and ticker management was one of those remaining pieces. I'd buy a new ticker, and my next import wouldn't be the usual 10 seconds, but would involve the distraction of looking up and adding it manually everywhere it needed to be added, and such.

Thanks for letting me express that! And also, there's several more parts to ticker-management I'll share soon.
Reply all
Reply to author
Forward
0 new messages