Documentation Index
Fetch the complete documentation index at: https://mintlify.com/backtest-kit/uzse-backtest-app/llms.txt
Use this file to discover all available pages before exploring further.
check-gaps.ts is a diagnostic utility that inspects the trade-results MongoDB collection and identifies every calendar day between the first and last recorded trade dates that has no trade activity. Each missing day is printed with its date and Russian day-of-week abbreviation, making it easy to distinguish expected weekend gaps from unexpected weekday halts such as exchange holidays or trading suspensions.
Synopsis
This script takes no arguments. It operates on whatever data is currently present in the
trade-results collection.Behavior
The script performs the following steps:- Connects to MongoDB — uses the
MONGO_URIenvironment variable configured inconfig/setup.ts. - Queries all trade timestamps — fetches the
timefield for every document intrade-results(projection{ time: 1 }). - Extracts unique calendar dates — converts each timestamp to a
YYYY-MM-DDkey and collects unique values into aSet. - Walks the full date range — iterates from the earliest to the latest trading date, one calendar day at a time.
- Reports missing dates — any date absent from the set is appended to the missing list, annotated with its Russian day-of-week abbreviation.
Day-of-Week Labels
Missing dates are labelled using the following Russian abbreviations (taken from theDOW array in source):
| Abbreviation | Day |
|---|---|
Вс | Sunday |
Пн | Monday |
Вт | Tuesday |
Ср | Wednesday |
Чт | Thursday |
Пт | Friday |
Сб | Saturday |
Example Output
MongoDB
| Setting | Value |
|---|---|
| Database | backtest |
| Collection | trade-results |
| Connection | MONGO_URI env var (default: mongodb://localhost:27017/backtest) |
Interpreting Results
Missing weekend dates (
Сб, Вс) are expected — the UZSE does not trade on weekends. Missing weekday dates (Пн–Пт) indicate public holidays, exchange closures, or trading halts that should be verified against the official UZSE calendar.