About this question

Real-Time Position Keeper

Medium · architecture & logic · Quant Developer interview question · c++, finance, hash-map, algorithms

Real-time position keeping is a fundamental component of algorithmic trading systems, ensuring accurate tracking of inventory, average costs, and profitability. By dynamically updating Volume Weighted Average Price (VWAP) and realized Profit and Loss (PnL) upon every execution, traders maintain precise oversight of portfolio performance and risk exposure. Task Implement a function solution that processes a stream of execution fills for multiple symbols and returns a std::vector<double> represen