返回题库

Quant Interview Practice Questions

专题
architecture & logic
难度
L1
来源
MyntBit

题目详情

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