Batch file to update Portfolio Slicer external data files

Portfolio Slicer comes with batch file that executes included PowerShell scripts in required order.

First line in this file is "Echo Off" that turns off printing executed commands.

Next lines executes powershell scripts in required order.

Last line in this file waits 10 second before closing window. We keep window open for 10 seconds so you could read output of scripts executed. We close window in case you would use this script in the windows task scheduler.

This batch job will get historical and intraday data, will create 4 external data files in required format and then will check these files for any issues.

Portfolio Slicer user MaximT also created script "UpdatePSDataIntraday.bat" (now included with other scripts):

This script will update quotes and currency exchange intraday data from Yahoo Finance website. You should run this script when you know that historical data is already up to date and you just want to get mid day quotes. This script runs much faster than "UpdatePSData.bat" job as it requests just latest data.

Scheduled data updates

You might consider scheduling executions of Portfolio Slicer batch jobs. I would recommend to use Windows Scheduler to execute “UpdatePSData.bat” file late evening (lets say 10pm ET) and then early in the morning (lets say 6am ET). This way you will make sure that your external data is always up to date. Then, if you frequently refresh data in the middle of the day, you can also schedule “UpdatePSDataIntraday.bat” file to run every 60min from 9:45am ET to 16:30pm ET (assuming you are dealing with North America markets).