Config file for External Data Management scripts

External Data Management scripts that come with Portfolio Slicer need to be configured before they are run. All configuration parameters are stored in the file "psConfig.txt" that is located in the same folder as all PowerShell scripts.Here are basic rules about this configuration file:

  • Empty lines in this file are ignored.
  • Lines that have first symbol as # are considered to be comment lines and are ignored.
  • Each configuration parameter is defined by opening tag and closing tag that should be entered on the separate lines. For parameter MinDate opening tag would be <MinDate> and closing tag would be <\MinDate>. Parameter values should be entered on separate lines between parameter tags.
  • if for parameter we expect just one value, then we expect this value in the line right after the opening tag.
Here is sample configuration file:

Configuration file "psConfig.txt" has following parameters:

  • MinDate - Minimal date for Portfolio Slicer workbook. This parameter values must be formatted as YYYY-MM-DD.
  • DetailOutput - If value is "Yes", then scripts will output to screen detail execution information. Usually you would want to set initially this value to "Yes". But because scripts can generate many lines of output, sometimes important information could get lost. So after initial runs you might consider setting this value to "No". Please note that this value will not impact output to log files as log files will always contain detail output.
  • PSDataFolder - Folder were external data files are located. Example value: "c:\PortfolioSlicer\PSData". If value is not specified, then scripts will assume that files will be located in "\PSData\" folder just "above" folder where all scripts are located.
  • GeneratedQuotes - This parameter is used by script "AppendGeneratedQuotes.ps1". This parameter value could have multiple lines with each line with following data: "Symbol,MinDate,MaxDate,Price". Here "Symbol" usually will be your own created symbol (Example: VidasGIC20170101") and the same value should be in table "Symbol". Value MinDate (format YYYY-MM-DD) should be start date from when quotes for this symbol will be created. If value is not specified, then parameter "MinDate" value from this file is used. Value MaxDate (format YYYY-MM-DD) is value that shows up to when quotes for this symbol should be created. If MaxDate not specified, then we will use current date. Value "Price" should be price for your investment.
  • DataRootFolder - Root folder where your data files will be located. Currently this is used just by one script: "ArchiveOldQuotes.ps1" and it assumes that quotes are located in that data root folders sub-folder "\Quotes\". Probably your data root folder will also have sub-folders "Dividends" and "CurrExch", but this structure will depend on how you will populate external data files. If value is not specified it is assumed that data root folder is folder just "above" folder where scripts are located.
  • ArchiveQuotes - If value is "Yes", then script "ArchiveOldQuotes.ps1" will run. With any other value this script will exit without changing anything in your quotes files.
  • ColumnSeparator - default value is "Tab". From version 2.2 you should use just default "Tab" value.
  • DecimalSeparator - default value is "." (dot). If your computer in regional settings is set to have decimal separator as "," (comma), then you should change this parameter value to "," (comma).
  • Currency - list currencies that you want to get exchange rates for.
  • Yahoo - list of symbols to get from Yahoo Finance website. Visit Yahoo Finance website http://finance.yahoo.com and enter name/ticker in search bar, for example "Apple" and hit search. You should see page with summary information about that symbol. Take a note of symbol in url, for Apple this will be AAPL: https://finance.yahoo.com/quote/AAPL?p=AAPL , but for XEI this will be XEI.TO: https://finance.yahoo.com/quote/XEI.TO?p=XEI.TO. This is a symbol that you will have to specify in Yahoo section of psConfig.txt file. Click on "Historical Data" link from Symmary page (just below quote on the right side) - if you see historical data and "Download Data" link then you should add this symbol to Yahoo section in psConfig.txt and use Yahoo as quote source.
  • Google - list of symbols to get from Google Finance website. You can list symbols here JUST WHEN in "Historical Prices" page on the right under the chart you see option "Export"-"Download to spreadsheet". If you do not see this option, use section GoogleWeb.
  • GoogleWeb - list of symbols to get from Google Finance website. Here include just symbols that do not have "Export"-"Download to spreadsheet" link in "Historical Prices" page (on the right under chart). Visit Google finance website https://finance.google.com and enter name/ticker in search bar, for example "Apple" and hit search. You should see page with summary information about that symbol. Take a note of symbol in url, for Apple this will be AAPL: https://finance.google.com/finance?q=AAPL&ei=gRe4Wbmasdfasd, but for XEI this will be TSE:XEI: https://finance.google.com/finance?q=TSE%3AXEI&ei=gRe4Wbmasdfasd. In XEI link you see value %3A between TSE and XEI and that is code for ":". But you can see same symbol at the top of the page just after the name. This is a symbol that you will have to specify in Google or GoogleWeb section of psConfig.txt file.
    Use url: https://www.google.com/finance/historical?q=AAPL&num=30&start=0&startdate=Sep+1%2C+2017 and replace AAPL with your symbol (example TSE:XEI) and visit that page. If on the right side you see "Export" section with link "Download to spreadsheet", then you can use that symbol in "Google" section of psConfig.txt file. If you do not see "Export" section, but still see historical quotes in web table, then you can use that symbol in "GoogleWeb" section of psConfig.txt. If you do not see historical quotes, that means you cannot use Google as source for quotes for that symbol!!!!!
  • IncludeQuoteArchiveFolder - Portfolio slicer has script to archive quotes. I enabled archiving for my setup (runs faster), but sometimes I need to have daily quotes for last few years. In such case I set parameter value to "Yes" and run batch and newly created Quotes.csv file then has daily quotes for all years.
  • SymbolRename - list of symbol renames that should be done when creating Quotes.csv and Dividends.csv file. These renames allows you to change Symbol that was used to create Quotes/Dividends so that symbol there matches symbol in Excel Symbol table. For example: to get XIU.TO quotes from Google in psConfig.txt you must specify symbol TSE:XIU; then in SymbolRename section you can add line "TSE:XIU,XIU" and then in Portfolio Slicer Excel workbook in Symbol you can define symbol "XIU". With such rename Portfolio Slicer will use symbol XIU and will be able to link them to Quotes and Dividends.

Note - last parameters (from "Currency") were added by Portfolio Slicer user MaximT.

Video instructions - How to choose source for quotes