Skip to content

Add a Charles Schwab transaction-history adapter #18

Description

@DanMat

Goal

Let Schwab users bring their own data. The backtest engine only needs a contribution calendar (date, contributed); optionally also dividends received (date, symbol, dividend) for the real-account comparison row.

What to do

  1. Copy src/divvy/importers/broker_template.py to src/divvy/importers/schwab.py.
  2. Implement contributions() (and optionally dividends_actual()) to parse Schwab's Transactions CSV export into the documented schemas. See src/divvy/ledger.py for the complete Fidelity example (how it classifies buys vs. reinvestments vs. dividends).
  3. Add a test with a small fake fixture (follow tests/test_ledger.py). Never commit a real statement.
  4. Optionally wire a --broker schwab path into divvy compare in src/divvy/cli.py.

Acceptance criteria

  • contributions() returns columns date, contributed (positive $, DRIP reinvestments excluded).
  • Test passes; ruff check + ruff format clean.

Good first issue — self-contained, one new file + one test. See CONTRIBUTING.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions