Get paid for your
quant questions.
Submit the interview questions, brain teasers, and strategies you've actually worked through. Accepted submissions earn $0.25–$10 each, paid in USDC within 72 hours.
- Paid in USDC / XRP within 72h
- Human reviewer on every submission
- Higher payouts for premium topics
- Crypto payout, works wherever you are
Examples
What the quality bar looks like
Three accepted submissions across our supported formats. Match this depth and clarity and your submission will move through review fast.
PythonMediumRolling Sharpe Ratio
Question
Implement a function that calculates the rolling Sharpe ratio for a time series of daily returns. The function should take a list of returns and a lookback window. Assume a risk-free rate of 0. Handle edge cases where the window is larger than the available data.
Starter code
def rolling_sharpe(returns: list[float], window: int) -> list[float]:
# Your implementation here
passSolution
import numpy as np
def rolling_sharpe(returns: list[float], window: int) -> list[float]:
if window <= 1 or len(returns) < window:
return []
result = []
returns_arr = np.array(returns)
for i in range(window, len(returns) + 1):
window_returns = returns_arr[i-window:i]
mean_return = np.mean(window_returns)
std_return = np.std(window_returns, ddof=1)
if std_return == 0:
result.append(0.0)
else:
sharpe = (mean_return / std_return) * np.sqrt(252)
result.append(sharpe)
return resultExplanation
Sharpe ratio = (mean return − risk-free rate) / std deviation. We use ddof=1 for sample std. Annualize by multiplying by √252 (trading days). Time complexity: O(n·w) naively, can optimize to O(n) with rolling statistics.
C++HardLock-Free SPSC Queue
Question
Implement a lock-free single-producer single-consumer (SPSC) queue suitable for passing market data ticks between threads in a low-latency trading system. The queue should be bounded, cache-line aligned, and avoid false sharing. Explain your memory ordering choices.
Starter code
template<typename T, size_t Capacity>
class SPSCQueue {
public:
bool push(const T& item);
bool pop(T& item);
private:
// Your implementation here
};Solution
#include <atomic>
#include <array>
template<typename T, size_t Capacity>
class alignas(64) SPSCQueue {
static_assert((Capacity & (Capacity - 1)) == 0,
"Capacity must be power of 2");
public:
bool push(const T& item) {
const size_t head = head_.load(std::memory_order_relaxed);
const size_t next = (head + 1) & (Capacity - 1);
if (next == tail_.load(std::memory_order_acquire))
return false;
buffer_[head] = item;
head_.store(next, std::memory_order_release);
return true;
}
bool pop(T& item) {
const size_t tail = tail_.load(std::memory_order_relaxed);
if (tail == head_.load(std::memory_order_acquire))
return false;
item = buffer_[tail];
tail_.store((tail + 1) & (Capacity - 1),
std::memory_order_release);
return true;
}
private:
alignas(64) std::atomic<size_t> head_{0};
alignas(64) std::atomic<size_t> tail_{0};
alignas(64) std::array<T, Capacity> buffer_;
};Explanation
Uses acquire-release semantics: producer releases head after write, consumer acquires before read. alignas(64) prevents false sharing by placing atomics on separate cache lines. Power-of-2 capacity enables fast modulo via bitwise AND. No locks = predictable latency (~10–20 ns on modern CPUs).
Puzzle / MCQMediumExpected Coin Flips
Question
You flip a fair coin repeatedly until you get two consecutive heads (HH). What is the expected number of flips needed?
Options
Explanation
Let E = expected flips from start, E_H = expected after one H. From start: flip once, then with prob 1/2 get H (move to E_H state), or T (restart). So E = 1 + (1/2)E_H + (1/2)E. After H: flip once, prob 1/2 get HH (done), or T (restart). So E_H = 1 + (1/2)(0) + (1/2)E. Solving: E_H = 1 + E/2, and E = 1 + E_H/2 + E/2 → E/2 = 1 + E_H/2 → E = 2 + E_H. Substituting: E = 2 + 1 + E/2 = 3 + E/2 → E = 6.
How it works
Write a question, get paid
Four things you should know before you submit. The bar is high but the process is fast.
01 · Payout
$0.25 – $10 per accepted question
Paid in USDC or XRP within 72 hours of acceptance. Higher payouts for harder topics: options pricing, microstructure, low-latency systems, stochastic calculus.
02 · Quality bar
Teach a concept, don't just stump
We accept questions that teach important quant concepts clearly. Hard for hard's sake gets rejected; well-explained mid-difficulty gets accepted.
03 · Review
48–72 hour turnaround
Every submission gets read by a human reviewer with quant interview experience. You get an email with the verdict, payment confirmation, and feedback if rejected.
04 · Originality
Human-written, your own work
AI-generated content is not accepted and may result in account suspension. Submissions must be your original work: your interview, your puzzle, your derivation.
FAQ