← Akuna Capital Interview Insights

Akuna Capital·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Apr 2026

Summary

Akuna Capital coding screen focused on market data processing, specifically building a moving average system with a signal generator. Pretty systems-heavy for what felt like a standard technical phone screen.

Questions Asked (1)

Q1

Design and implement a system that computes a moving average over a stream of incoming market prices, and emits a trading signal whenever the moving average crosses a fixed threshold. Assume the window size and threshold are both fixed.

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

The moving average part was fine, sliding window, nothing crazy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: fixed window size N, threshold T, and definition of a 'cross' (e.g., moving average crossing above or below T). Then propose an efficient data structure (e.g., circular buffer with running sum) to compute the moving average in O(1) per update, and describe how to detect crossings by comparing the current and previous moving averages relative to T. Finally, discuss trade-offs like handling missing data, latency, and backpressure.

Pro tip: Emphasize the importance of defining the signal semantics precisely—e.g., whether a crossing means the moving average transitions from below to above T (golden cross) or vice versa—and mention that you would confirm this with stakeholders to avoid ambiguity in production.

1. Clarify Requirements and Assumptions

Confirm the window size N, threshold T, and what constitutes a 'cross' (e.g., moving average crossing above or below T). Also clarify input rate, data format, and whether the signal should be emitted once per crossing or continuously while above/below.

2. Design the Moving Average Computation

Propose using a circular buffer of size N to store the last N prices and maintain a running sum. This allows O(1) update and O(1) moving average retrieval by adding the new price and subtracting the oldest.

3. Detect Crossings and Emit Signals

Keep track of the previous moving average value. After each update, compare the current moving average to the threshold and the previous moving average to the threshold. If the relationship changes (e.g., previous < T and current >= T), emit a signal.

4. Discuss Trade-offs and Edge Cases

Address handling of initial warm-up period (when fewer than N prices are available), missing data, out-of-order events, and potential floating-point precision issues. Discuss whether to use a simple moving average or exponential moving average and why.

5. Consider Scalability and Production Concerns

Mention how the design would scale to multiple symbols or high-frequency streams (e.g., sharding by symbol, using a streaming framework). Discuss latency, backpressure, and fault tolerance.

Key Points to Mention

  • Use a circular buffer with a running sum to achieve O(1) time per update and O(N) space.
  • Define crossing precisely: e.g., moving average transitions from below to above threshold (or vice versa).
  • Handle the warm-up period: either wait until N prices are collected or use a partial average.
  • Consider floating-point precision and potential need for epsilon comparisons.
  • Discuss trade-offs between simple moving average (SMA) and exponential moving average (EMA) in terms of responsiveness and memory.
  • Mention scalability: sharding by symbol, using a streaming platform like Kafka, and ensuring low latency.

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