Matching Transactions - AAraKKe/ynab-unlinked GitHub Wiki

Matching Transactions

When YNAB Unlinked reads the provided input file and tries to match transactions in the file with existing transactions in your YNAB account.

The matching logic works as follows:

  • Every transaction in your input file is compared against non-reconciled transactions in your YNAB account.
  • Any transaction done within a 5 days window and the same amount are partially matchec.
  • If YNAB Unlinked is capable of matching the payee in your file with the pay in teh transaction, then the transactions are matched.

Matched transactions will be updated in YNAB while unmatched transactions will be created new.

When confirming the transactions to be loaded, partial matches will be highlighted for you to accept the match or not. If you do not accept the match, they will be considered as new transactions to be created. This allwos you to later fix those in YNAB as you prefer.

If you accept the partially matched transactions, the existing trasactions in YNAB will be updated and marked as cleared.

How are payee names matched?

The payee name of a given transaction is compared with all payees in your YNAB account and assign a partial score on matching. This is done using the partial_ratio method of the rapidfuzz python library.

The partial raio finds the optimal alignment of the shorter payee name and the longest one and provides a score based on this alignment. The partial score is used because in statements is common to find extra information added to the transaction payee by the entity. For example, for a payment done to Merchant, the entity could provide a payee in the exported file that looks like Credit Card Payment: Merchant.

Before this partial matching is done, both payee names are pre-processed by removing spaces, converting them to lowercase and decode unicode characters.