feat(investments): auto-classify transfers to investment accounts as savings

Open
#243 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend, database

Research direction

Start by tracing the regular transactions pipeline and how classification rules write to transaction_entries. Then inspect the investment tracking flow and investment_transactions schema, including how total_contributed is calculated. Add coverage for known providers, unknown transfers, merchant overrides, and contribution tallying; done means all acceptance criteria pass.

Written by the indexing model from the issue text.

Description

Summary

When a regular chequing/credit transaction is a transfer to an investment account, automatically classify it as savings — not as a generic transfer or expense.

This is the bridge between the regular transactions pipeline and the investment tracking system.

Detection logic

A transaction should be classified as savings when any of these are true:

  1. The merchant name matches a known investment provider (Wealthsimple, Questrade, RBC Direct Investing, Sunlife, etc.)
  2. The destination account (when detectable via Plaid transfer data) is flagged is_investment=True
  3. The user has set a classification rule or hint tagging this merchant as savings

What happens downstream

  • Transaction classified as savings → entry created in transaction_entries with the savings line item
  • Also creates a row in investment_transactions with type='contribution' for the destination account (if known)
  • Contribution is counted in total_contributed for portfolio growth calculations

Default classification rule seeded

name: "Investment account contributions"
type: savings
description: "Transfers to Wealthsimple, Questrade, RBC Direct Investing, Sunlife, 
              Manulife, TFSA, RRSP, FHSA — classify as savings"

Acceptance criteria

  • Wealthsimple / Questrade transfers → savings by default
  • User can override per merchant
  • Contribution correctly tallied in portfolio total_contributed
  • Tests: known providers classified correctly; unknown transfers not auto-tagged

Part of Epic #239

Dominant language
Python
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Riddy21/Friday_Budgeting_Pro

All issues in Riddy21/Friday_Budgeting_Pro

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.