← AkunaCapital Interview Insights

AkunaCapital·Software Engineer·Technical Phone Screen·Junior

Junior
Jun 2026

Summary

Akuna Capital coding screen, pretty focused on financial data processing. One problem, real-time flavor, not too long but the edge cases kept me busy.

Questions Asked (1)

Q1

Build a system that computes a moving average over a live stream of market prices and emits a trading signal whenever the moving average crosses a fixed threshold.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

Seemed straightforward at first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (latency, throughput, window type, threshold semantics) and then design a streaming pipeline with a ring buffer for the moving average and a state machine for signal emission. Discuss trade-offs between exact and approximate methods, and how to handle out-of-order or missing data.

Pro tip: Emphasize that the moving average and signal logic must be idempotent and deterministic per event to ensure correctness in replay or recovery scenarios, and mention that you would use a monotonic clock for latency measurements.

1. Clarify Requirements and Constraints

Ask about expected message rate, latency requirements, window size, threshold value, and whether the signal should be emitted once per crossing or continuously while above/below.

2. Design the Data Flow and Components

Outline a pipeline: ingest (e.g., Kafka), compute moving average (e.g., using a ring buffer or exponential moving average), compare to threshold, and emit signal (e.g., to a trading engine).

3. Choose the Moving Average Algorithm

Discuss simple moving average (SMA) with a ring buffer for O(1) updates, or exponential moving average (EMA) for lower memory and recency weighting. Mention trade-offs in accuracy and responsiveness.

4. Implement Signal Generation with State

Maintain a boolean state (above/below threshold) and emit a signal only on state change. Handle edge cases like exactly equal to threshold and initial state.

5. Address Scalability, Fault Tolerance, and Testing

Discuss partitioning by symbol, handling out-of-order events with watermarks, exactly-once semantics, and how to test with historical data and simulated streams.

Key Points to Mention

  • Choice of moving average: SMA vs EMA, and window size trade-offs
  • Data structures: ring buffer for O(1) updates and memory efficiency
  • Signal emission logic: state machine to avoid duplicate signals
  • Handling out-of-order or late data: watermarks or event-time processing
  • Scalability: partitioning by symbol and parallel processing
  • Fault tolerance: checkpointing, replay, and idempotent processing

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.