Skip to content

parse-account-statements.py bereitet Kontoauszüge verschiedener bekannter P2P Kreditanbieter (wie z.B. Mintos, Estate…

License

Notifications You must be signed in to change notification settings

qujingpengf/ChrisRBe

Repository files navigation

PP-P2P-Parser

Code Status

Code style: black Maintainability Test Coverage pre-commit Bors enabled

Introduction

Application to read account statement files from different peer to peer lending sites, e.g. mintos.com, and produces a Portfolio Performance readable csv file.

Input format needs to be a csv file as well!

Usage

parse-account-statements.py --help
usage:
An application to read account statement files from different peer to peer lending sites, e.g. Mintos.com and creates
a Portfolio Performance readable csv file.

NOTE: The output only contains interest and interest like payments received. No other statements are currently parsed.

List of currently supported providers:
    - Bondora
    - Bondora Grow Go
    - Estateguru
    - Mintos
    - Robocash
    - Swaper
    - Debitum Network
    - Viainvest

Control the way how account statements are processed via the aggregate parameter:
    - transaction: Currently does not process the input data beyond making it Portfolio Performance compatible.
    - daily: This aggregates all bookings of the same type into one statement per type and day.
    - monthly: This aggregates all bookings of the same type into one statement per type and month. Sets
            the last day of the month as transaction date.

Default behaviour for now is 'transaction'.

Copyright 2018-03-17 ChrisRBe

positional arguments:
  infile                CSV file containing the downloaded data from the P2P site

optional arguments:
  -h, --help            show this help message and exit
  --aggregate {transaction,daily,monthly}
                        specify how account statements should be summarized
  --type TYPE           Specifies the p2p lending operator
  --debug               enables debug level logging if set
parse-account-statements.py  --type mintos src/test/testdata/mintos.csv

⚠ If you are using the --aggregate=monthly option, please note that this application aggregates always on the last day of the month. This can lead to import issues in Portfolio Performance when importing data for the current month.

E.g. import date is the 15th of a July, the account statement contains data with a date of 31st of July.

Account activity for a "future date" will be ignored/ not imported by Portfolio Performance.

Please note, that this behaviour on this application side is intentional to avoid importing account activity multiple times in Portfolio Performance.

Currently supported formats

  • mintos - Supports current account-statement.csv file format
  • estateguru - Supports current German layout account statement csv file format
  • robocash - Supports current account statement format (as of 2018-05-01) exported to csv
  • swaper - Supports current account statement format (as of 2018-05-01) exported to csv
  • bondora - Supports current account statement format (as of 2019-10-12); exported to csv
  • bondora go & grow - Supports current account statement format (as of 2019-10-12); exported to csv
  • debitumnetwork - Supports current account statement format (as of 2020-09-08) exported to csv
  • viainvest - Supports current account statement (as of 2021-12-12) exported as csv (Withdrawals do not work yet)

Alternative solution for Auxmoney

Unfortunately, the output file of Auxmoney's reports is not suitable for being parsed by PP-P2P-Parser in a meaningful way. As an alternative, you can check out the PP-Auxmoney-Parser project.

Configuration files

Configuration for this script is stored in yaml files located under the config subdirectory. The content directly reflects the format of the source account statement files.

Example:

---
type_regex: !!map
  deposit: "(Deposits)|(^Incoming client.*)|(^Incoming currency exchange.*)|(^Affiliate partner bonus$)"
  withdraw: "(^Withdraw application.*)|(Outgoing currency.*)|(Withdrawal)"
  interest: "(^Delayed interest.*)|(^Late payment.*)|(^Interest income.*)|(^Cashback.*)|(^.*[Ii]nterest received.*)|(^.*late fees received$)"
  fee: "(^FX commission.*)|(.*secondary market fee$)"
  ignorable_entry: ".*investment in loan.*|.*[Pp]rincipal received.*|.*secondary market transaction.*"
  special_entry: "(.*discount/premium.*)"

csv_fieldnames:
  booking_date: 'Date'
  booking_date_format: '%Y-%m-%d %H:%M:%S'
  booking_details: 'Details'
  booking_id: 'Transaction ID'
  booking_type: 'Details'
  booking_value: 'Turnover'

Output

CSV file format compatible with Performance Portfolio (German language setting).

Dependencies

To use this application the following dependencies need to be installed:

  • Python 3.6+ (unit test are run against Python 3.6, 3.7, 3.8, 3.9)
  • PyYaml

Installation of Python dependencies can be handled in two ways:

  • Install dependencies via pip install -r requirements.txt

  • Create a virtual environment using pipenv

    pipenv install
    pipenv shell
    

Legal

I'm not a lawyer. This project is in no way affiliated with Portfolio Performance, but intended to be used with it.

About

parse-account-statements.py bereitet Kontoauszüge verschiedener bekannter P2P Kreditanbieter (wie z.B. Mintos, Estate…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages