How currency exchange data is stored locally
Overview
This page describes how local currency exchange data is stored by the External Data Management Scripts before the final CurrencyConv.csv file is created.
This is useful when you want to:
- troubleshoot missing exchange-rate history
- understand how local exchange-rate files are organized
- repair or rebuild currency history
- compare data from different exchange-rate sources
Currency Exchange Data Location
When the currency-exchange scripts run, they download exchange-rate data and store it locally in the CurrExch 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\ScriptsandDataRootFolderis empty, then currency exchange files will normally be stored inC:\PortfolioSlicer\CurrExch. - If your scripts are stored in
C:\PortfolioSlicer\ScriptsandDataRootFolderisC:\OneDrive\PortfolioSlicer\, then currency exchange files will normally be stored inC:\OneDrive\PortfolioSlicer\CurrExch.

Currency Exchange File Naming
If your setup uses only one currency, then the CurrExch folder will usually be empty.
If you use more than one currency, there will normally be 2 files for each currency pair, one for each direction.
Examples:
CAD_USD.txtUSD_CAD.txt
If you use three currencies such as CAD, USD, and EUR, then you will typically see six files, one for each direction between the pairs.
How Currency Exchange Files Are Structured
These files usually contain comma-separated values without a header.
A typical record might look like this:
2016-01-29,0.7102,CAD,USD
2016-01-28,0.7106,CAD,USD
2016-01-27,0.7121,CAD,USD
These local files are later combined into the final CurrencyConv.csv file used by Portfolio Slicer.
How Currency Exchange Data Is Updated
When the exchange-rate scripts run, they normally:
- calculate the expected local file name for the currency pair
- check whether that local file already exists
- find the latest stored date
- request new exchange rates after that date
- append any newly received rates to the file
Some scripts also clear old intraday exchange-rate data before rebuilding the intraday files.
Important Notes About Sources
Multiple exchange-rate sources can write into the same local file structure.
That means you can theoretically change sources later and keep using the same local files, but keep in mind that different providers may calculate or publish daily exchange rates differently.
For example:
- one source may use end-of-day values from one market close
- another source may use values based on a different market or time zone
So even when both sources are valid, the numbers may not match exactly.
What Happens If MinDate Changes
Like quotes and dividends, changing MinDate does not automatically rebuild existing local exchange-rate files.
If you need a true rebuild of historical exchange rates after a major MinDate change, it is often better to back up the old files, delete the local currency files, and re-run extraction.
Practical Advice
- use the same currency codes consistently in
psConfig.txtand Excel - inspect raw currency files when troubleshooting conversion problems
- keep backups of your local exchange-rate files
- do not assume that different data sources produce identical daily values