返回题库

Quant Interview Practice Questions

专题
backtesting
难度
L2
来源
MyntBit

题目详情

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