Vectorized Backtest Engine - Quant Researcher Interview Question
Difficulty: Medium
Category: backtesting
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: pandas, numpy, finance, vectorization
Problem Description
Backtesting simulates a trading strategy using historical data to evaluate potential risk and profitability before capital deployment. A critical requirement for any backtest is the elimination of look-ahead bias, ensuring that strategy decisions at any given time rely solely on data available up to that moment.
Task
Implement a function solution(prices, signal) that calculates the performance metrics of a trading strategy based on a series of asset prices and trading signals. The function must
Practice this medium researcher interview question on MyntBit - the all-in-one quant learning platform with 200+ quant interview questions for Jane Street, Citadel, Two Sigma, and other top quantitative finance firms.