Skip to main content

How to easily reformat your CSVs to Awaken's CSV format

How to use AI to get your CSVs reformatted in under a minute

Written by Alex McCullough

The easiest way to reformat your CSVs into Awaken's format is by using Claude.ai or ChatGPT. Navigate to the website of the AI tool you prefer, and follow these instructions:

  1. Attach the CSV to your message, and copy/paste the instructions on our CSV Formatting Guide. If it is a perps/futures CSV, use this guide instead.

  2. In your prompt, ask it to reformat the CSV to Awaken's standard, and say "if you have any questions or need further information in order to do this 100% accurately, please ask me."

  3. Answer any questions the AI may have about your CSV.

Reformatting Perps/Futures CSVs that don't include a PnL column

If your exchange's CSV doesn't include a PnL column, you should include this in your prompt:

Some exchanges do not include a realized PnL column in their trade exports. In these cases, PnL must be estimated manually by matching each closing trade to its corresponding opening trade.

The core rule: PnL = close value minus open value, reported on the closing row only. Opening rows always get PnL = 0.

  • Long position (buy to open, sell to close): PnL = close_price - open_price

  • Short position (sell to open, buy to close): PnL = open_price - close_price

How to identify the price/value to use: Use whatever column in the export represents the total notional value of the trade. This may be labeled price, value, total, or similar. If the export only provides a per-unit price and a quantity, multiply them together to get the notional value before subtracting: notional = price × qty.

Matching logic:

  • Pair opening and closing trades chronologically (FIFO) per asset/instrument

  • Match on quantity — a close should equal the size of a corresponding open

  • Use a small fuzzy tolerance (~0.1%) on quantity to handle minor rounding differences

  • If a trade has no matching counterpart in the file (position opened before or closed after the export's date range), report PnL = 0 and tag it as open_position

PnL is always reported on the closing row only. Never report PnL on an opening row.

Did this answer your question?