/tradelog_importer

Python script to work with IB Third-Party TradeLog files

Primary LanguagePythonMIT LicenseMIT

Interactive Brokers TradeLog Importer

Visitors

What and Why

Python script that converts IB Third-Party TradeLog into .csv format.

2021-10-24 18_54_11

IB .tlg file turns into two dataframes with trades and executions 👇

image

The output can be further used to analize your trades or use trade data with other tools like excel and google docs.
I use the script to convert executions into trades to use in other scripts for per-trade analytics.

Libraries used

  • pandas for creating table-like dataframes to store executions and trades
  • tkinter for simple file dialog
  • pathlib for cross-platform file path detection

Try the script

Download the TradeLog .tlg file from IB.
Run the script tradelog_IB.py and choose the file. On the output you get two dataframes with with data and .csv file with trades.
CSV will be created in the same folder the script is ran from.