Fidelity Trade Parser

Turn messy Fidelity CSV exports into clean, structured trade logs for Excel, Google Sheets, or tax analysis.

Install
cmdop skills install agensi-fidelity-trade-parser

Fidelity Trade Parser is a skill that converts raw Fidelity brokerage CSV exports into clean, structured data suitable for spreadsheet analysis, tax reporting, or custom trading scripts. Fidelity’s Accounts_History.csv stores trade details inside verbose, unstructured strings such as “YOU SOLD OPENING TRANSACTION PUT (IWM) ISHARES…”, which standard CSV readers cannot interpret meaningfully. This skill functions as an ETL pipeline specifically built around the quirks of Fidelity’s export format, including multi-line disclaimers and complex option symbology.

From each row, the skill extracts ticker symbols, strike prices, expiration dates, and option type (Call or Put). It normalizes transaction action strings into consistent categories such as SELL_OPEN, EXPIRED, and DIVIDEND, making filtering and aggregation straightforward. It also handles less common events including assignments, exercises, interest payments, and foreign tax deductions. The output is a flat CSV that can be loaded directly into Google Sheets, Excel, or a Python trading script without further cleaning.

This skill is appropriate when an agent needs to process Fidelity brokerage history files repeatedly or at scale, where manual cleanup or ad-hoc prompting would introduce errors or omit rows. It is not designed for brokerage exports from other institutions such as Schwab or Interactive Brokers, and it does not perform tax lot matching, P&L calculation, or portfolio valuation on its own.

Use cases

  • Parse a Fidelity Accounts_History.csv to extract structured option trade records including ticker, strike, expiration, and put/call type
  • Normalize Fidelity transaction action strings into clean categories like SELL_OPEN or EXPIRED for downstream filtering
  • Prepare brokerage export data for tax analysis by capturing assignments, exercises, dividends, and foreign tax payments
  • Generate a clean flat CSV from Fidelity export data for import into Google Sheets or Excel
  • Feed structured trade records into a custom Python trading script without manual preprocessing
  • Automate recurring processing of Fidelity account history files as new exports are generated

When to use it

  • The source file is a Fidelity Accounts_History.csv with verbose, unstructured action strings
  • Option trade metadata such as ticker, strike, expiration, and type needs to be extracted automatically
  • Transaction types need to be normalized to consistent categories for analysis or reporting
  • The workflow requires deterministic, repeatable parsing across many rows or files
  • The output needs to be a flat CSV compatible with spreadsheet tools or Python scripts

When not to use it

  • The brokerage export is from an institution other than Fidelity
  • Tax lot matching, realized P&L calculation, or portfolio valuation is required
  • The input file is not in CSV format or does not follow Fidelity's Accounts_History export structure
  • Real-time trade data or brokerage API integration is needed rather than file-based parsing