Design a stock price jump alert system with rolling windows.
Unlock detailed company stats for this questionUpgrade
The broker gets a price update from the exchange every second. A user can subscribe to be alerted when a stock jumps by X% within a rolling window of their choice (minute, hour, day, week, month or year, each configurable only as 1 unit, like 1 day or 1 month). The window rolls relative to the current timestamp rather than calendar boundaries. A subscription is removed once triggered once or expired (not triggered in 1 month). Focus areas were architectural trade-offs and non-functional requirements like storage size and latency.
Expect follow-ups like
- A subscription is removed once triggered once or expired (not triggered within 1 month); the rolling window (minute to year) is relative to the current timestamp, not calendar-aligned.
Community answers
No answers contributed by the community yet.


