Difficulty: Medium
Category: market_microstructure
Practice quant interview questions from top firms including Jane Street, Citadel, Two Sigma, DE Shaw, and other leading quantitative finance companies.
Topics: backtesting, transaction-costs, pnl-calculation, numpy
Accurate backtesting requires modeling transaction costs, often decomposed into linear components like bid-ask spreads and quadratic components representing market impact. These costs significantly affect the realized Profit and Loss (PnL) of a trading strategy, necessitating precise calculation methods for realistic performance evaluation. Task Implement the function solution(prices, positions, linear_impact, quadratic_impact) to calculate the cumulative Net PnL and Total Transaction Costs for
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.