Quant Interview Practice Questions
题目详情
Profit and Loss (PnL) is the fundamental metric used to evaluate the performance of any trading strategy. Accurately and efficiently calculating realized PnL across millions of trades is critical for post-trade analysis and real-time risk management in quantitative finance. Task Implement a PnLCalculator class with a calculateRealizedPnL method that computes the realized profit or loss of a closed trade. The method receives four double parameters: entryPrice, exitPrice, quantity, and side (wher