How dividend data is stored locally

Overview

This page describes how local dividend data is stored by the External Data Management Scripts before the final Dividends.csv file is created.

This is useful when you want to:

  • troubleshoot missing dividends
  • understand how dividend files are stored locally
  • repair or rebuild dividend history
  • understand what the scripts do when they append new dividend data

Dividend Data Location

When the dividend-extract scripts run, they download dividend data from an internet source and store it locally in the Dividends folder under your data root.

The location is controlled by the DataRootFolder parameter in psConfig.txt.

Examples:

  • If your scripts are stored in C:\PortfolioSlicer\Scripts and DataRootFolder is empty, then dividend files will normally be stored in C:\PortfolioSlicer\Dividends.
  • If your scripts are stored in C:\PortfolioSlicer\Scripts and DataRootFolder is C:\OneDrive\PortfolioSlicer\, then dividend files will normally be stored in C:\OneDrive\PortfolioSlicer\Dividends.

Dividends folder example

Dividend File Naming

There is normally one dividend file per symbol.

The file naming pattern is _Symbol_.txt.

If a symbol contains special characters such as :, ^, or &, those characters are replaced with _ in the file name.

Examples:

  • CCL becomes _CCL_.txt
  • TSE:XEI becomes _TSE_XEI_.txt
  • ABC.L becomes _ABC.L_.txt

How Dividend Files Are Structured

Dividend files usually contain data for one symbol only.

Important expectations:

  • files normally do not use double quotes around values
  • each file should contain just one symbol
  • for each date, there should normally be only one record
  • files can be edited with a text editor if you need to inspect or repair them

How Dividend Data Is Updated

The dividend scripts normally append new dividend data after the latest dividend date already present in the file.

That means:

  • existing historical records are left in place
  • only newer dividend data is appended
  • if an earlier period is missing, you may need to remove later records and re-run extraction so the script can refill the gap

For example, if the file contains dividends up to 2017-09-19, but a missing period begins in August 2017, then you may need to delete the later records and re-run the extraction.

What Happens If MinDate Changes

Changing MinDate does not automatically rebuild existing dividend files.

That means:

  • if the new MinDate is earlier, older dividends will not automatically be added to an existing file
  • if the new MinDate is later, older dividend records will not automatically be removed

If you make a major MinDate change, it is often safer to back up and rebuild the local dividend files.

Dividend Extraction Notes

Dividend extraction can depend on both the symbol and the selected data source.

Historically, some setups also used a dividend flag next to the symbol definition to decide whether dividend extraction should be attempted for that symbol.

If you expect dividend data but do not see any dividend file updates, check:

  • whether the symbol is configured for dividend extraction in your source section
  • whether the source supports dividend data for that symbol
  • whether the local file already contains the latest available date

Practical Advice

  • keep backups of your dividend files
  • consider storing them in a cloud-synced folder
  • inspect the raw files when troubleshooting missing dividend history
  • remember that dividend providers can stop supporting specific symbols or change their output