A CLI application for the great Portfolio Performance app to run different analysis on the portfolio data.
For example, pp-terminal includes a command to calculate the preliminary tax ("Vorabpauschale") for Germany:
pp-terminal is a handy tool for all the nice-to-have features that won't make it into the official Portfolio Performance app. This can be because of country-dependant tax rules, complex Java implementation, highly individual requirements, too many edge-cases, etc.
By default, pp-terminal provides the following commands:
| Command | Description |
|---|---|
view accounts |
display a detailed table with the balances per account |
view depots |
display a detailed table with the current values per depot |
simulate vorabpauschale |
run a simulation for the German preliminary tax ("Vorabpauschale") on the portfolio |
Code completion for commands and options is also available.
The application does not modify the original Portfolio Performance file.
In addition to the standard set, you can easily create your own commands and share them with the community.
- pipx to install the application (without having to worry about different Python runtimes)
- Portfolio Performance version >= 0.70.3
- Portfolio Performance file must be saved as "XML with id attributes"
pipx install git+https://github.com/ma4nn/pp-terminal
The commands mentioned above all require the Portfolio Performance XML file as input.
You can either provide that file as first parameter to the command
pp-terminal --file=depot.xml view depots
or by setting an environment variable you can omit the parameter
export PP_TERMINAL_INPUT_FILE=depot.xml
pp-terminal view depots
To view all available arguments you can always use the --help option.
If you want another formatting for numbers, assure that the terminal has the correct language settings, e.g. for Germany:
export LANG=de_DE.UTF-8
To disable all colors in the console output for a better readability, you can set the NO_COLOR environment variable
to any value like this
export NO_COLOR=1
Developers can easily extend the default pp-terminal functionality by implementing their own commands. Therefore, the Python
entry point pp_terminal.commands is provided.
To hook into a sub-command, e.g. view, you have to prefix the entry point name with view..
The most basic pp-terminal command looks like this:
from rich.console import Console
import typer
app = typer.Typer()
console = Console()
@app.command
def hello_world() -> None:
console.print("Hello World")This will result in the command pp-terminal hello-world being available.
For more sophisticated samples take a look at the packaged commands in the pp_terminal/commands directory,
e.g. a good starting point is view_accounts.py.
The app uses Typer for composing the commands and Rich for nice console outputs. The Portfolio Performance XML file is read with ppxml2db and efficiently held in panda dataframes.
If your command makes sense for a broader audience, I'm happy to accept a pull request.
- The script is still in beta version, so there might be Portfolio Performance files that are not compatible with and also public APIs can change
- Only Euro currency is supported at the moment
I am not a tax consultant. All results of this application are non-binding and without guarantee. They may deviate from the actual values.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for more details.