Skip to main content

Tool to convert exports from various brokers to a CSV format compatible with Portfolio Performance.

Project description

Broker to Portfolio Performance Converter

Tool to convert exports from various brokers to a CSV format compatible with Portfolio Performance. The system automatically detects the broker format from the input files.

CI Docker Ruff Python 3.10+ License: MIT

Motivation

TL;DR: This tool automates the transformation of bank and broker exports (often chaotic and heterogeneous) into a standardized CSV format that Portfolio Performance can import without errors.

The Problem

Portfolio Performance is an exceptional platform for monitoring financial assets, calculating returns, and managing investment portfolios. However, manually inputting every purchase, sale, or dividend is a tedious and error-prone task.

Although Portfolio Performance supports bulk importing via CSV files, the current financial ecosystem presents several challenges:

  • Heterogeneous Formats: Every financial institution exports data in a different format (XLS, CSV, JSON, XML).
  • Data Inconsistency: Column names, date formats, and decimal separators vary between brokers.
  • Incomplete Information: Key identifiers like ISIN or Ticker Symbols are often missing, preventing Portfolio Performance from correctly identifying the asset.

The Solution

This tool acts as an intelligent bridge. It automatically detects the source of your files, cleans the data, searches for missing identifiers (like Tickers), and unifies all information into a single CSV file perfectly compatible with Portfolio Performance.

Installation

🚀 Docker (Recommended)

The easiest way to run the tool without installing Python or dependencies.

Launch Web Interface:

docker run --rm -p 7860:7860 ghcr.io/marmol-dev/portfolio-performance-converter:latest

Run CLI:

docker run --rm -v $(pwd):/data ghcr.io/marmol-dev/portfolio-performance-converter:latest -i /data/input.csv -o /data/output.csv
Using uvx

Use uvx (part of the uv toolchain) to run it without manual installation.

Launch Web Interface:

uvx --from portfolio-performance-converter pp-converter web

Run CLI:

uvx --from portfolio-performance-converter pp-converter -i input.csv -o output.csv
Using pip

Install the package from PyPI:

pip install portfolio-performance-converter

Then run it:

# Web Interface
pp-converter web

# CLI
pp-converter -i input.csv -o output.csv
Run from Source

If you want to run the latest version from git without cloning:

uvx --from git+https://github.com/marmol-dev/portfolio-performance-converter portfolio-performance-converter web

Or if you have cloned the repository:

uv run pp-converter web

Usage

🌐 Web Interface (Recommended)

The easiest way for most users. Just upload your files and download the result.

  1. Launch the web app (see Installation).
  2. Upload your broker export files.
  3. Download the converted.csv.

Web Interface Demo

💻 Command Line Interface (CLI)

Ideal for advanced users or automation.

# Basic usage
pp-converter --input <path_to_file> --output <output_file.csv>

# Multiple files
pp-converter --input file1.csv file2.xlsx --output "converted.csv"

📥 Importing into Portfolio Performance

Once you have your converted.csv:

  1. Open Portfolio Performance.
  2. Go to File > Import > CSV Files...
  3. Select your converted.csv and follow the matching wizard.

Portfolio Performance Import Demo

Supported Brokers

Broker Input Format Detection Status Export instructions Example
Binance CSV ✅ Automatic Instructions Sample
Coinbase CSV ✅ Automatic Instructions Sample
Inversis Excel / HTML ✅ Automatic Instructions Sample
MyInvestor CSV ✅ Automatic Instructions Sample
XTB Excel ✅ Automatic Instructions Sample

Development

If you want to contribute or work with the source code:

1. Clone the repository

git clone <repository_url>
cd portfolio-performance-converter

2. Install dependencies (with uv)

We recommend using uv for development.

uv sync

3. Running Tests

uv run pytest

Project Structure

  • src/: Main source code.
    • converters/: Conversion modules for each broker.
    • utils.py: Shared utility functions.
    • market_data.py: Interaction with Yahoo Finance.
    • main.py: Unified CLI entry point.
    • app.py: Web graphical interface (Gradio).
  • config.yaml: Configuration of overrides for ISINs/Symbols.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

portfolio_performance_converter-0.2.0.tar.gz (3.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portfolio_performance_converter-0.2.0-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file portfolio_performance_converter-0.2.0.tar.gz.

File metadata

File hashes

Hashes for portfolio_performance_converter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 04bec6436b94c634600426cf05562e3a4e5c139a6a685f29e8abe84ceaba869a
MD5 b37d0a5ced1c500b5ae539e8b706a7a2
BLAKE2b-256 355539a0a693bf31b49e42e4255d221c92f632957a339266898a59146479d766

See more details on using hashes here.

Provenance

The following attestation bundles were made for portfolio_performance_converter-0.2.0.tar.gz:

Publisher: ci.yml on marmol-dev/portfolio-performance-converter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file portfolio_performance_converter-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for portfolio_performance_converter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d9028e3bab35e305365b63569d8a71c30bdceabc6b817118450ad703962006
MD5 00141fe97c73db678349e3b616b6f0fe
BLAKE2b-256 5cc2eda71f4725328a16b92347f1c3ea01645827fa2380dc94aaac19d69d97ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for portfolio_performance_converter-0.2.0-py3-none-any.whl:

Publisher: ci.yml on marmol-dev/portfolio-performance-converter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page