Skip to main content

111. 24-Hour Reporting Window

Status: Accepted Date: 2025-07-06

Context

The Atlas module generates system performance reports. We need to define the standard time period that these reports will cover. A very short period (e.g., one hour) might not have enough trading activity to be statistically meaningful. A very long period (e.g., one week) might hide recent changes in performance. We need to choose a "goldilocks" timeframe that is both recent and meaningful.

Decision

The standard, automated system report generated by Atlas will cover a fixed 24-hour window.

The generateSystemReport job will be scheduled to run once every 24 hours (e.g., at midnight UTC). When it runs, it will query all relevant data from the preceding 24-hour period (00:00:00 to 23:59:59). This provides a consistent, day-by-day snapshot of the system's performance.

While the standard automated report is for 24 hours, the underlying data aggregation functions will be built to accept arbitrary start and end dates, allowing for custom, on-demand reports to be generated for different time periods if needed for specific analyses.

Consequences

Positive:

  • Consistency: Provides a consistent, comparable, day-over-day view of system performance, making it easy to spot trends and regressions.
  • Meaningful Data Volume: A 24-hour period is generally long enough to capture a significant amount of trading activity, making the performance metrics (like win rates and PnL) more statistically stable.
  • Simplicity: Having a single, standard reporting window simplifies the automation and scheduling logic.

Negative:

  • Hides Intraday Performance: A 24-hour summary can hide significant variations in performance that occurred during the day (e.g., high performance during the London session, poor performance during the US session).
  • Not Immediately Responsive: The automated report is only generated once per day. A sudden change in performance will not be reflected until the next day's report.

Mitigation:

  • Complementary Real-Time Monitoring: The 24-hour Atlas report is not our only monitoring tool. It is complemented by real-time Grafana dashboards that provide up-to-the-minute metrics on system health. The Atlas report is for strategic, day-over-day review, not real-time alerting.
  • On-Demand Reporting: As noted in the decision, the underlying functions will support custom time ranges. If we need to investigate intraday performance, an operator can manually trigger a report for a specific, shorter time window.