Portfolio Performance - Import Forex Transactions?

Hi everyone

I’ve played a bit around with the Portfolio Manager. I was able to import the trading data from interactive brokers. What I do miss are all the forex transactions. Is there a way to import them as well?


Is there really no automated option and you guys do that manually?

I do it manually as I only make 1 or 2 trades a month, so it’s not a lot of effort.

So, I spent some time in the last few days exploring PP, it has potential but currently lacks some important features or I’m not able to find them (e.g. creating different portfolios, forecasting). No blame as it’s OSS, I rather hope we can contribute.

The best setup I found so far is to create a Cash account for each currency you have in IB, and then a Securities account for each as well. When buying selling you can offset accounts in the corresponding currency.

Re. Forex (and I assume here only to exchange CHF>USD/etc funds for later investing, not really betting on making money through fx), have stumbled across the same issue in importing.

It can potentially be solved via a cleaning script that generates a .csv for import though, so I’m working on that.

How do you go about creating the manual transaction, from an accounting PoV?

Two ways I can see for now, open to further suggestions:

  1. Simple Transfer
  • in the Deposit/Cash accounts, use the Transfer... option to move the amount from e.g. CHF to USD and set the exchange rate applied by IB in the report;

  • add a transaction in the destination account (e.g. USD) to account for the fees

  1. Buy & Sell (proper?):
  • create a CHF.USD security (ticker CHFUSD=X if you want Yahoo quotes) in CHF

  • in your CHF Securities account create a Buy transaction for (e.g.) 1’000 shares of 1 CHF each, no fees

  • now you have 1’000 CHF.USD shares in CHF account paid with IB CHF cash

  • now in the same CHF securities account create a corresponding Sell transaction for 1’000 shares of 1 CHF worth of CHF.USD but this time we are getting the proceeds in USD so the cash account will be USD, which means you can input both an exchange rate and the 2.00 USD fee directly

  • you end up with the corresponding -1’000 CHF and +1’008.34 USD minus the fee, and zero outstanding shares of CHF.USD.

I did not play around much with reporting yet so I’m not sure what are the benefits of either option.

P.S.: v0.59.3 just released, have yet to check if anything of the above changed, allegedly there is now a Yuh bank import :slight_smile:


I use option 1 as you described. However, the fees I always charge on the base currency account, not in the destination account, as this is also how it’s done in IB if I remember correctly.

It would be nice to have that in an automated way. I could live with both options, as both would get the job done :slight_smile:

I’m working on a python script to automate an import from IBKR (but not like the built-in one, different report source) - but it’s a spare time thing so not sure when it will be “production” ready.
Also I’ve never written much code before, so that slows things down :smiley:
@Burningstone you may be right, my base currency is in USD so that’s easier for me because IBs rates are USD.