Home Calibration record Disclaimer Documentation العربية
Metric Risk · QuantMarketEngine

Engine commands

The commands that generate reports or audit them. All of them run after changing into the bot project's folder once:

cd QuantMarketEngine/src/QuantMarketEngine.TelegramBot

reports/ and drafts/ are created inside that folder.

Daily commands

These are the everyday ones — and the first covers the rest.

dotnet run -- todayreport spends calls

The whole morning routine in one command — runs report, then drafts, then audit, for every pair.

WhenEvery morning. Usually the only command you need.
OutputFiles in reports/ and drafts/, plus the audit cards on screen.
dotnet run -- report spends calls 5 files per pair

The institutional report — narrative and quantitative — for every active pair.

WhenYou want the reports only, without drafts or the audit.
Output In reports/, per pair: {pair}-{date}.json · -ar.txt · -en.txt · -cone.svg (the probability-cone chart, ready to drop into Word or a PDF) · -validation.json (the pre-publication check results)
AlsoIt archives the reading as unpublished — it becomes the "what changed" reference for next time, and enters the outcome-scoring loop.
dotnet run -- report XAUUSD 1D spends calls

Exactly the same report but for one specified pair — the same five files.

WhenRefreshing gold, or the euro, on its own.
dotnet run -- drafts spends calls

English Substack drafts for every pair.

Outputdrafts/{pair}.txt
dotnet run -- audit zero calls no file

A quality audit of the numbers — self-calibration, not a report. It is the one command that checks rather than produces.

WhenTo confirm the numbers hold up against what actually happened.
OutputTerminal only — four cards, detailed below.

Periodic commands

Not every day. All of them read stored data — zero provider calls.

dotnet run -- weeklyzero calls

A weekly summary built from the archived reports.

WhenEnd of the week.
Outputdrafts/weekly-ar.txt and weekly-en.txt
dotnet run -- publishsitezero calls

Turns published reports into site pages.

OutputHTML pages in WebPublisher:OutputDirectory.
dotnet run -- publishcalibrationzero calls

The public calibration page — boundary breaches against the 5% target, per pair. This is a trust and sales instrument, not a report.

WhenAfter audit or backfill, when refreshing the site.
Outputcalibration.html

Setup commands

Once, or rarely.

dotnet run -- seedhistoryspends calls

Fetches and stores the full daily history, deepening what the analysis can reach back into.

WhenOnce, at setup.
dotnet run -- backfillone call per symbol

Builds the VaR and ES record out of the past with a walk-forward sweep.

WhenOnce, after seedhistory — this is what brings the calibration cards to life, ES especially.
OutputStores the scored outcomes that feed the audit cards.
dotnet run -- backupzero calls

A verified backup of the database — its integrity is checked before it counts.

WhenBefore any destructive command. The live bot also takes one daily on its own.
Outputbackups/quant-YYYYMMDD-HHmmss-fff.db
dotnet run -- purgeweekendpreview · deletes nothing

A preview of the stored weekend candles. It deletes nothing.

OutputA table of series and how many candles are candidates for deletion.
dotnet run -- purgeweekend applydestructive

Actually deletes those candles.

WhenAfter backup, and after reading the preview.
ScopeSaturdays and Sundays from daily series only — the monthly macro series are untouched.

Why a command that deletes candles exists at all

The GOLD_SILVER_HISTORY feed returned a row per calendar day — 26% of them Saturdays and Sundays, which are not trading sessions. Ingestion now drops them, and accumulated history is cleaned with this command.

The effect was measured: gold's VaR95 over the live window moved from 96.33 to 113.44, up 17.8%. Silver moved 17.9%. The euro, sterling, the yen and the US 10-year were unchanged — they carry no weekend candles to begin with.

Running as a service

dotnet runno command

Runs the bot live: the Telegram receiver, the automatic scheduler, and continuous scoring.

WhenContinuous operation, or production.
OutputIt keeps running until you stop it.

Supported markets

Three active symbols. What separates them is the shape of the data, not the engine.

EURUSD

Euro / US dollar, FX · FX_DAILY endpoint · full OHLC · quality complete

XAUUSD

Gold / US dollar · GOLD_SILVER_HISTORY · one price per day, no intraday movement · quality FAIR

XAGUSD

Silver / US dollar · same feed and same shape · quality FAIRand its calibration still reads "sample too small", because it has fewer outcomes it can score

The metals' limit — and it is a data limit, not an engine limit

The free tier returns one price per day (about 5,300 candles back to 2011), with no separate open, high and low. The consequence:

  • Works well: trend, momentum, risk (VaR), state, support and resistance, the liquidity map, historical context.
  • Weak or empty: candle patterns, intraday liquidity sweeps, fair-value gaps — all of which need movement inside the day.
  • Market quality settles at FAIR and may return "no read" more often than the euro does.

seedhistory will not lift it — this is the shape of the data itself. Raising the quality needs a paid provider that supplies intraday movement.

In short: dotnet run -- report XAUUSD 1D works perfectly — just expect FAIR from the metals rather than complete.

The provider quota

The free allowance is 25 requests a day, with a burst limit of roughly one a second — handled automatically by spacing the calls.

Spends calls

report · drafts · seedhistory · backfill (one call per symbol — it fetches the full history, then sweeps it)

Zero calls

audit · weekly · publishsite · publishcalibration · backup · purgeweekend — all read stored data only

What does a report cost? Don't plan on a remembered number

report XAUUSD 1D measured 5 calls — the pair itself, its cross-asset companions, and the macro series.

That number is not fixed. It moves with the fetch spacer (candles pulled a moment ago are not pulled again), with which companions are configured, and with the economic calendar and fundamental analysis being disabled at present.

report, drafts, seedhistory and todayreport each print this run's call count at the end. The counter is per-process — every run starts at zero, there is no daily total. It is the reference, not this page.

The four audit cards

What audit prints to the terminal.

VaR calibration

Is the 95% expected range breached on about 5% of days, as it should be? Includes the breach-clustering test — Christoffersen.

ES calibration

On breach days, did the average actual loss match the declared Expected Shortfall — a ratio near 1? It appears once enough breach days have accumulated, after backfill or through live accrual.

Level resilience

When the system marks a level as tested, how often did it actually hold? A historical sweep with no lookahead.

Correlation stability

Is the published 30-day correlation figure dependable, or does it swing?

Notes

Use 1D, not 4H

The free provider is daily only, and asking for 4H produces an empty report.

The practical route to the institutional report is the report command

The HTTP endpoint api/reports/institutional/... is behind operator permission, not open.