Flat Files Data Guide – Filtering by exchange_symbol (Isolating Instruments from OHLCV Data)

Flat Files contain multiple instruments in a single file, even when scoped to one exchange. To analyze a specific asset (e.g., SWVL, TSM), you must filter by exchange_symbol.

This guide shows how to properly isolate and export specific instruments.

Each row represents one instrument (symbol) for a given time period.

1id_exchange;exchange_symbol;time_period_start;time_period_end;time_open;time_close;price_open;price_high;price_low;price_close;volume_traded;trades_count
2IEXG;SWVL;2026-02-02T13:00:00.0000000;2026-02-02T13:01:00.0000000;2026-02-02T13:00:01.1326619;2026-02-02T13:00:59.9800186;3.03;3.19;2.97;3.17;4708;57
3IEXG;TSM;2026-02-02T13:00:00.0000000;2026-02-02T13:01:00.0000000;2026-02-02T13:00:01.1899337;2026-02-02T13:00:09.4006344;329.44;329.73;329.44;329.69;870;28
4IEXG;GLL;2026-02-02T13:00:00.0000000;2026-02-02T13:01:00.0000000;2026-02-02T13:00:01.1973889;2026-02-02T13:00:53.9836106;20.36;20.71;20.33;20.71;8325;6
5IEXG;SGOV;2026-02-02T13:00:00.0000000;2026-02-02T13:01:00.0000000;2026-02-02T13:00:01.4371872;2026-02-02T13:00:05.8175414;100.38;100.38;100.38;100.38;561;3
6IEXG;BMNR;2026-02-02T13:00:00.0000000;2026-02-02T13:01:00.0000000;2026-02-02T13:00:01.5840479;2026-02-02T13:00:01.5840479;22.61;22.61;22.61;22.61;100;1
7IEXG;SOXX;2026-02-02T13:00:00.0000000;2026-02-02T13:01:00.0000000;2026-02-02T13:00:02.0367595;2026-02-02T13:00:02.0367595;343.4;343.4;343.4;343.4;80;1
  • id_exchange → Exchange (e.g., IEXG)
  • exchange_symbol → Instrument (e.g., SWVL, TSM, GLL)
  • time_period_start/end → Candle interval
  • price_open/high/low/close → OHLC prices
  • volume_traded, trades_count → activity

Even though the file is:

1E-IEXG (one exchange

It still contains multiple exchange_symbol values (SWVL, TSM, GLL, etc.)

👉 Without filtering, you are analyzing multiple instruments mixed together, which leads to incorrect results.

1import pandas as pd
2
3df = pd.read_csv("D-20260202.csv", delimiter=";")
1filtered = df[df["exchange_symbol"] == "SWVL"]
2
3print(filtered)
1filtered.to_csv("SWVL.csv",index=False)

👉 This creates a new file containing only SWVL data

1filtered=df[df["exchange_symbol"].isin(["SWVL","TSM","GLL"])]
1filtered.to_csv("selected_symbols.csv",index=False)

Split the file into one file per symbol:

1for symbol in df["exchange_symbol"].unique():
2    subset = df[df["exchange_symbol"] == symbol]
3    subset.to_csv(f"{symbol}.csv", index=False)

👉 Output:

1SWVL.csv
2TSM.csv
3GLL.csv
4SGOV.csv
5BMNR.csv
6SOXX.csv

Wrong:

1df["exchange_symbol"]==SWVL

Correct:

1df["exchange_symbol"]=="SWVL"

print(filtered)# only displays

👉 You must use:

to_csv()

Wrong:

1pd.read_csv("file.csv")

Correct:

1pd.read_csv("file.csv",delimiter=";")
  • Always filter before analysis
  • Use .isin() for multiple symbols
  • Save filtered outputs for reuse
  • Validate results using .unique()

Each Flat File is:

One exchange → Many symbols → One time interval

👉 Filtering by exchange_symbol is a helpful first step before any meaningful analysis.