Module 12Marks & PnLLesson 1 of 716 min
Market Value
Sum qty * mark across a book.
Market value
MV = Σ q_i m_i
Signs
Shorts have negative qty → negative contribution to long MV, but risk still matters.
Challenge
Assert equal lengths or return Result.
Tips
- zip lengths
- Shorts signed
- Multi-ccy needs FX
Try it live
Market ValueRust 2021
Loading editor…
Output
Press Run to compile and execute.