PP Dividend Import Generator

I created a tool to automatically import dividends: https://github.com/traderonfire/pp-dividends

PP Dividend Import Generator

Automatically backfills dividend history into Portfolio Performance from a single transaction export CSV, without manual data entry.

What it does

Portfolio Performance does not fetch dividend history automatically. This script bridges that gap:

  1. Reads your full PP transaction export (all accounts, all securities).

  2. Reconstructs exactly how many shares you held in each account on every historical ex-dividend date.

  3. Fetches dividend-per-share data from Yahoo Finance for every security ever held.

  4. Writes a PP-compatible import CSV containing, for each dividend event:

    • A Dividend transaction — credits the correct cash deposit account, linked to the security.

    • A Removal (Outbound Delivery of cash) on the same day for the same amount — so the deposit account balance stays at zero, but PP correctly counts the dividend in total return calculations.

The note field on each row records the full calculation detail, e.g.:

Dividend 2024-03-15 | 1005 shares × 21.929p = 220.39 GBP