After-work guide to parquet vs csv market data: when bars and panels should leave CSV behind. Educational only. Not investment advice.
You searched for parquet vs csv market data. After a full day of work, you do not need a 400-page manual—you need a why-first path that fits one evening: understand the angle (when bars and panels should leave CSV behind), run a tiny example, and know what not to claim.
This hub article is educational only. Not investment advice. It will not pick stocks, size positions, or promise edge.
Tool focus: parquet.
import time
from pathlib import Path
import numpy as np
import pandas as pd
rng = np.random.default_rng(2)
n = 50_000
df = pd.DataFrame({
"date": pd.date_range("2020-01-01", periods=n, freq="min"),
"ticker": np.where(rng.random(n) > 0.5, "AAPL", "MSFT"),
"close": 100 + rng.normal(0, 1, n).cumsum()/100,
})
csv_p, pq_p = Path("/tmp/toy_bars.csv"), Path("/tmp/toy_bars.parquet")
df.to_csv(csv_p, index=False); df.to_parquet(pq_p, index=False)
print("csv_mb", round(csv_p.stat().st_size/1e6, 3),
"parquet_mb", round(pq_p.stat().st_size/1e6, 3))
t0 = time.perf_counter(); pd.read_csv(csv_p); t1 = time.perf_counter()
t2 = time.perf_counter(); pd.read_parquet(pq_p); t3 = time.perf_counter()
print("csv_s", round(t1-t0, 3), "parquet_s", round(t3-t2, 3))
Run it in a throwaway venv. If an import is missing, install only what you need for tonight—do not boil the ocean.
You can explain when bars and panels should leave CSV behind in two sentences, show one chart or printout, and list one risk. That is enough progress for an after-work session.
Tomorrow, connect this tool to the adjacent skill (data hygiene, validation, or a simple dashboard)—still educational, still not investment advice.
Educational only. Not investment advice.