Quant Interview Practice Questions
题目详情
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