We use optional cookies for analytics and affiliate attribution. Essential cookies and marketing measurement are always on. Read our privacy policy

We just launched our Black Friday sale. You can use code BF2026 to get 25% off all subscriptions, valid until Nov 30th. There is a limit of 100 redemptions.

Logo

Looking for alpha

What this preview is

Looking for alpha is a easy quant coding problem on language knowledge in Python, asked at Quant.

Difficulty
Easy
Topic
Language Knowledge
Discipline
Quant development
Language
Python

Implementing a backtesting engine in Python

This easy coding problem asks you to build the core loop of a quantitative trading backtest: processing a stream of price data, executing trades according to a strategy function, and tracking two hard constraints—maximum drawdown and position size limits.

The problem tests your ability to manage state across multiple timesteps, handle account value and position tracking accurately, and enforce stopping conditions correctly. You'll need to distinguish between violations that halt all trading permanently (drawdown) and those that only restrict future trades (position limits), while correctly recording when each violation occurs and when a position constraint is lifted.

  • Position and cash accounting across trades
  • Conditional trade execution based on constraint state
  • Rounding financial values to two decimal places
  • Distinguishing violation types and their implications for future trading

Unlock full access to getcracked

Join to unlock this problem, detailed solutions, and our complete library of quant finance interview prep.