Stock Watcher

Tutorial – Portfolio Performance

Article from Issue 242/2021

Portfolio Performance helps you manage and analyze your investment portfolio.

In an age of ultra-low interest rates that make it impossible for legacy savers to build up assets, more investors are turning to securities and other riskier investments. But stocks and mutual funds will not earn money automatically. Many users prefer active oversight and management of their investment portfolio. Computer-aided portfolio analysis tools let you monitor the performance of your portfolio and make adjustments as necessary to maximize the return.

This kind of investing does not require expensive software subscriptions: All you need is a Linux PC and the Portfolio Performance [1] program. Portfolio Performance tracks your investments and even provides tools for analyzing your portfolio.

The Portfolio Performance application was created in Germany, but it supports a number of different currencies and investment types, so you can use it in other countries as well.


Pick up Portfolio Performance from the project's website. The tarball weighs in at around 45MB. After downloading, unpack the archive into a directory of your choice and then change to that directory. Then start the program by typing the ./PortfolioPerformance command at the prompt or by clicking on the file in the file manager.

To enable integration into the popular desktop environments' menu structures, the developer also provides an XPM file containing a program icon for displaying in a menu or on the desktop. Listing 1 shows an example of the desktop file required for the /usr/share/applications/portfolio.desktop menu entry. For the system to find the program and the icon, you will need to adjust the paths in lines 7 and 11.

Listing 1

Desktop File

01 [Desktop Entry]
02 version=1.0
03 Type=Application
04 Name=Portfolio Performance
05 GenericName=Personal finance
06 Comment=Track your portfolio performance (finance)
07 Exec=/<Path>/<to>/PortfolioPerformance %f
08 Terminal=false
09 StartupNotify=false
10 Categories=Office;Finance;
11 Icon=/<usr>/<share>/<icons>/portfolio.xpm

After launching the software, a fairly spartan program window appears (Figure 1). Except for a small menubar, it has no other controls. In the free area of the welcome window, there are only a couple of links in the Actions, Samples, and Help groups. They are intended to make it easier for users to get started with the application.

Figure 1: The program window looks a bit spartan when first opened.

First of all, create your own portfolio file by clicking on File | New top left in the window. The application now opens a wizard in a small superimposed window, in which you select the base currency for the securities account as the first step. In the next step, you create an individual name for the securities account and assign a name for the corresponding clearing account, which is referred to as the Reference account in the dialog.

Then press the Add button to the right of the input fields. The names of the securities account and the reference account now appear in a table below. If required, you can create additional accounts or switch to the next window by pressing Next at the bottom of the dialog. You can then add another account to the program. However, this account is not linked to a securities account, but could be, say, a sight deposit account.

The newly added account will also appear in the list of existing accounts further down after you press the Add button. This is where you will also find the reference accounts for your securities accounts. After pressing Next, the next dialog will let you add existing securities to the securities account. To help you do this, the program shows you a selection of different shares, each of which it lists depending on the current share index. Top left in the wizard, a small selection field shows a popular share index and below that, in the tabular view, the securities listed in this index (Figure 2).

Figure 2: You first need to enter the master data for your securities account in a wizard.

In the last step of the wizard, you classify the shares using a list, which you can use later on in the analysis phase to make the charts more meaningful.

You are then taken to the statement of assets. It contains the Securities, Accounts, Reports, Taxonomies, and General Data categories on the left side of the window. On the right, you can see context-specific information.

In the Accounts section, first update your accounts in the subgroups. This means, above all, entering the current account balance, which the software – if it is a reference account for a securities account – will automatically modify to reflect any new securities investments.

To do this, right-click on the desired account and select the Add option from the context menu that appears. The program then opens a dialog where you can enter the required data. Then the account balance appears at the top of the account view in the main window, while the program lists the transactions at the bottom.


If you now want to buy securities or update your stock, open the Securities dialog. If you have already selected some securities in the setup wizard, they will appear on the right side of the program window as soon as you click on the All securities subgroup in the Securities category.

If you click on one of the values, a chart appears in the lower part of the program window, tracking the share price (Figure 3). By selecting the desired period of time to the right, you can limit the display to a specific time window. On the far right in the window, the program also displays some statistical information. The program retrieves the share price history from the web.

Figure 3: Portfolio Performance attractively presents the development of individual shares in a chart.

To add new values to the list, press the Add instrument button in the top right corner of the program window. If you only know the name of a share, but not the symbol it uses internally, click on the Search for instruments… entry in the context menu that appears. Another window opens, and you can enter the name of the security. Then click on the Search button to the right of the input field.

The software now looks for the required information on the web; a longer list can appear containing, say, a separate entry for each trading location (Figure 4). Select the desired entry and then click on Apply to transfer the information to the input dialog for the new instrument.

Figure 4: You add new values via a selection dialog. The search supports multiple stock exchanges.

Once you have completed the list, you still have to add the stocks. To do so, select the corresponding share and then right-click to open a context menu in which you select the first option Buy…. In a new dialog, you now enter all the required information including the fees and taxes. Make sure the purchase is offset against the correct reference account, which you can modify in a selection field if necessary. After pressing the Save button, the inventory is saved and added to the first column of the Reports | Statement of Assets list view.

Using these steps, you can manage your entire stock portfolio. The context menu, which can be opened by right-clicking, also lets you enter sales for each value, delete an instrument completely from the listing, and add dividend payments or tax refunds in individual dialogs.


For an overview of your current asset status, click on the Reports group in the navigation area on the left side of the program window. You can call up a tabular view of your portfolio in the Statement of Assets category. Securities that are included in the All Securities list but do not show any stock information are not included in the assets.

Since a tabular view can quickly become confusing, especially with extensive portfolios, the Holdings option gives you the possibility to visualize the portfolio. For this purpose, the application displays all the available shares in a wheel chart by their percentage share in the holding (Figure 5).

Figure 5: The shares in the holding can be displayed graphically in a wheel chart.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Follow the Money

    Looking for software to help you manage your money? The personal finance program KMyMoney can help you track income and expenses and better plan your financial future.

  • Perl: Portfolio Watch

    We'll show you a Perl script that helps you draw area graphs to keep track of your portfolio's performance.

  • Free Software Projects

    Are you ready to assess your assets and limit your liabilities? Or maybe you just want to find out where your money goes. This month we look at Grisbi, GnuCash, and HomeBank finance managers.

  • Determining assets across a shrinking number of financial APIs

    Financial wizard Mike Schilli is annoyed that some web services have discontinued serving up real-time stock market data. To keep an eye on his investment dollars, Mike taps into a little known interface for stock prices.

  • Comparing Cloud Providers

    Many companies now offer data storage in the cloud. We tested seven alternatives with a close look at security features.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More