I would like to know if it is possible to automate Portfolio-performance to always import a IBKR file at a certain time, import these trades into the software and then export the trades and transactions csv automatically to a specific folder?
Why I’m asking? Because I have a budgeting tool build in powerquery and vba in Excel that is automated to import the data from Portfolio-Performance to see the gains, losses, dividends, fees, taxes from my broker etc into my budgeting tool.
In short: Portfolio Performance itself does not offer native automation via schedule or command line, but there are workarounds – using scripts and file watching.
Since Portfolio Performance doesn’t have a command-line interface (CLI), you can partially automate the process – but the part within Portfolio Performance can only be automated using workarounds.
Possible automation workflow:
Save the IBKR file automatically (e.g., via a scheduled report from IBKR or via API).
A watcher script regularly checks the folder (e.g., with Python or PowerShell).
As soon as the file is there:
Start Portfolio Performance (if closed).
Import the file via GUI automation (e.g., with AutoHotKey, pywinauto, Sikuli, etc.).
Afterward: Initiate an automated export (also via GUI automation).
Move exported CSVs to the target directory or save them there.
PowerQuery & VBA then pull the fresh data as usual.