Security resolver and health checker #2281
Reference in New Issue
Block a user
Delete Branch "zachgoll/security-resolver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Maybe app has to import prices for thousands of unique market securities. This includes stocks, bonds, mutual funds, etfs, options, and more. Furthermore, these securities are being added to the Maybe app from multiple sources (users, market data provider, Plaid, etc.)
Due to the dynamic nature of marketable securities, this PR adds a "Resolver" and "Health Checker" to ensure that the security prices we're using for calculating historical account values is as accurate as possible.
There are three primary concepts in the Securities domain:
Resolver- how we build and save unique securities in the Maybe DB (ultimately, a "cache layer")MarketDataImporter- a daily process that pulls in market prices for known securitiesHealthChecker- a daily process that checks the health of each security and marks securities as "offline" given a consecutive group of failures to fetch pricesThese three concepts are complementary to each other. The
ResolverandHealthCheckerare responsible for improving securities data, whileMarketDataImporterassumes the data is good and pulls in all the prices it can.