awesome-quant icon indicating copy to clipboard operation
awesome-quant copied to clipboard

Transaction Analysis

Open kuatroka opened this issue 2 years ago • 3 comments

Hi, before asking this question, I did try to look for the tool I need in the list, but I couldn't find it.

I'm looking for transaction performance analysis tool in Python. Something where I could input a spreadsheet, CSV file, or dataframe with the real open/buy/sell/add/reduce/exit transactions and have the tool spit out the performance metrics on those transactions. Like what was the best transaction in terms of P/L what was the worst one, how many transactions were there? What was the longest? What was the shortest one, etc. What I do find multiple tools that create a portfolio metrics on a forecasted/ephemeral by and hold strategy, but not based on real transaction history. Any help in identifying such a tool would be very much appreciated. Thanks

kuatroka avatar Dec 09 '22 10:12 kuatroka

Did you have a look at https://github.com/cuemacro/tcapy it's an Open source TCA (transaction cost analysis) Python library for FX spot

femtotrader avatar Dec 11 '22 11:12 femtotrader

Just eyeballing it, it looks more like a transaction cost (brokerage, slippage, etc) analysis and not the P/L analysis. I need the latter. In any case, I'll check it too. Thanks

kuatroka avatar Dec 12 '22 22:12 kuatroka

Sharing a thought:

I needed something similar. My need was to generate comprehensive reports for my transaction log after a backtest. I wanted to plot things like trade duration, P/L distribution by day of week (and hour of day), etc.

I couldn't find a tool so i asked ChatGPT to generate python code for me that did what I needed. I described my needs in a few paragraphs, and it worked like a charm. I highly recommend trying it.

Good luck.

ikamanu avatar Dec 12 '22 23:12 ikamanu