返回题库

Quant Interview Practice Questions

专题
concurrency
难度
L1
来源
MyntBit

题目详情

In quantitative trading, pair trading strategies require simultaneous execution of orders across multiple assets. When execution engines process fill callbacks concurrently, portfolio positions must be updated atomically to maintain an accurate risk profile and prevent race conditions. Utilizing scoped locks ensures thread-safe updates across overlapping asset pairs while avoiding deadlocks caused by arbitrary lock acquisition orders. Task Implement the Portfolio class to manage positions for 1