Principle:51bitquant Ai hedge fund crypto Portfolio Valuation
| Knowledge Sources | |
|---|---|
| Domains | Portfolio_Management, Backtesting |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
A valuation pattern that computes total portfolio equity as cash plus the market value of long positions minus the market liability of short positions.
Description
Portfolio valuation mark-to-markets the portfolio each bar. Total equity is:
Long positions contribute their market value (shares × price); short positions subtract their market liability (shares × current price, since covering requires buying back). This value is recorded per bar to build the equity curve and to compute returns, drawdowns, and risk ratios.
Usage
Use this pattern after each bar's trades execute to record the current portfolio value. The value series feeds Performance_Analytics.
Theoretical Basis
where is cash, long shares, short shares, and the price of ticker at bar .