@maxtrader/backtest-csv-loader
v0.1.1
Published
Strict CSV ingestion and normalization for deterministic datasets.
Readme
@maxtrader/backtest-csv-loader
Strict CSV ingestion and normalization for deterministic datasets.
Purpose
- Parse candle CSV text.
- Validate required columns and numeric/timestamp integrity.
- Normalize timestamps to epoch milliseconds.
- Stable sort rows by
tOpenwith original-row tie breaker.
API
import { loadCandlesFromCsv } from "@maxtrader/backtest-csv-loader";
const dataset = loadCandlesFromCsv(csvText, {
symbol: "EURUSD",
timeframe: "M1"
});Required Columns
tOpentCloseopenhighlowclosevolume
Validation Rules
tOpen <= tClosehigh >= max(open, close)low <= min(open, close)- row width must match header width
