Recurring charges only came from Plaid's detection, so imported statements,
bank feeds and hand-added accounts had none (Coming up stayed empty), and a
Plaid bill dropped off Coming up once its predicted date passed.
- findRecurring (pure, tested): groups by cleaned merchant name and direction,
finds a weekly, 2-weekly, monthly, quarterly or yearly rhythm (3 hits, 2 for
yearly, most gaps on the rhythm). Bills may vary 40% (electricity); everyday
spending (groceries, dining, gas) counts only at the same amount. Transfers
skipped. Next date keeps the day of the month. Stopped ones are ended.
- saveFoundRecurring runs after every sync and after a statement import. Plaid's
own stream wins for the same merchant. Updates keep the category you picked
and anything you hid. Plaid streams with a past next date roll forward.
Tested: the sample CSV alone finds Geico, Planet Fitness, Spotify, Netflix,
Verizon, rent, PG&E and Comcast, and Home's Coming up fills in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>