Learn
Lesson · Algorithmic and Automated Trading

Time, Sessions, Events, and Scheduling

Use exchange calendars, time zones, session boundaries, event windows, and deterministic schedulers instead of assuming every day and minute is tradable.

Review concepts
Core concepts

What to understand

Keep the boundaries, state, and authority explicit.

1

Trading calendar

Open, close, holiday, half-day, and instrument-session rules.

2

Event window

A defined period around earnings, news, auctions, or scheduled releases.

3

Scheduler state

Record planned run, actual run, skipped run, lateness, and recovery action.

Interactive lab

Market Clock and Scheduler Lab

Change session rules, clock drift, scan frequency, and event blackouts. Observe late, skipped, and valid executions.

Market Clock and Scheduler Lab

Deterministic synthetic educational data · no broker or live-market connection

SYSTEM MODEL
Process

Use one authoritative clock

Every event and decision should use explicit timezone and session metadata.

1

Resolve

Load the correct calendar and current session state.

2

Schedule

Create deterministic jobs with deadlines and idempotent run identifiers — an identifier the scheduler can be handed twice without running the job twice; Reliability, Idempotency, Retries, and Recovery makes the idea precise.

3

Guard

Skip or require approval when the job is late or inside a blocked event window.

Knowledge check

Check your understanding

Select one answer for each question. Feedback appears immediately, and a wrong choice is answered on its own terms before the rule is restated.

1. Why is a weekday check insufficient?

2. A late signal should be:

3. A deterministic scheduled run should have:

4. The exchange opens at 09:30 New York. A server on UTC schedules the open job at 13:30 UTC all year. In November, when does the job run in New York time?

Practical rules

  • Use exchange calendars rather than fixed weekday logic.
  • Define maximum signal and job age.
  • Use explicit event blackouts and session permissions.

Common mistakes

  • Assuming local server time equals exchange time.
  • Running missed jobs later without revalidation.
  • Ignoring early closes and daylight-saving changes.
References

Official reading

These sources cover algorithmic controls, market access, broker APIs, system operations, or security.

Alpaca · WebSocket Market Data
Official example of receiving real-time stock, option, crypto, and news updates over a streaming API.

Open official reference ↗

FINRA · Regulatory Notice 15-09
Official guidance on supervision, testing, controls, documentation, and monitoring for algorithmic trading strategies.

Open official reference ↗

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.