Choosing a Return Denominator for Strategy Benchmarking
Summary
The document asks how to calculate daily returns for a long/short strategy that trades at daily closes and may hold positions overnight, so its performance can be compared with a market benchmark or used to estimate correlation and beta. It shows a mark-to-market portfolio value formed from cash and current positions, then considers taking percentage changes in that value, dividing by invested capital or exposure, and constructing a net asset value series.
The example illustrates a key issue: when the chosen portfolio value is near zero, dividing by its prior value can produce unstable or undefined returns. The post raises exposure and NAV as possible alternatives but does not resolve which denominator is appropriate or provide a recommendation. The right measure depends on the strategy's capital and financing conventions, especially for long/short portfolios, so the proposed synthetic NAV should not be assumed to be a standard return measure. Transaction costs are excluded, and the example covers only one stock.
Key ideas
- Mark-to-market value combines cash with the current market value of open positions.
- Percentage changes in mark-to-market value can become unstable when prior value is near zero.
- Return calculations for long/short strategies require a clearly defined capital or exposure denominator.
- Benchmark comparisons require strategy and market returns to use compatible time intervals.
- The example excludes transaction costs and does not settle on a standard return convention.
Tags
Full text
# How to calculate returns of backtested strategy?
# How to calculate returns of backtested strategy?
Lets say I have some strategy (long/short) backtested for certain period. Strategy has entries/exits only at the end of the day and may have overnight positions hold. Now I would like to compare returns of my strategy to the market (for instance SPY as benchmark) and find correlation coeff. between my returns and market.
So my question is what's right/standard rule for calculating returns for strategy ? I'm considering using Unrealized+Realized value
Following is simplified matlab code for single stock (there is no transaction cost accounted).
## "Backtester"
```
% positions sizes for every day
positions = [2 1 -10 15 5 0];
% execution prices (daily closes)
price=[50.0 51.0 49.0 51.0 53.0 52.0];
% actual 'trades'
tradedQty = diff([0 positions]);
% here cash for positions
cash = cumsum(-tradedQty.*price);
% and here I calculate my mark-to-market potrtfolio value
markToMarketPnL = cash + (positions).*price;
disp(markToMarketPnL)
```
It gives MTM (actually real+unreal) for every day.
`0 2 0 -20 10 5`
Now I need to compare it to market return. For finding market returns I use SPY's prices and returns as $ r_m = \frac{SPY(i)}{SPY(i-1)} - 1 $
So the question now - what is 'standard' way to calculting daily returns for my 'strategy' to be compared with $r_m$ in sense of finding correlation coefficient or $\beta$ etc ?
First thought is to use following : $$ r(i) = \frac{MTM(i)}{MTM(i-1)} - 1 $$
But in this case sometimes I may get values near/equal to 0 in denominator and my ret. goes to infinity (see results of example).
Someone uses 'invested money' as denominator, but I'm unsure about this. What should be in this case there in denominator ? long+short exposure for previous day ?
Another idea I got is to use NAV (net asset value) for portfolio to derive returns. For single stock it'd be equal to used stock prices of course, but for many stocks it has sense of price of some 'synthetical' portfolio
$$ NAV(i) = \frac{\sum_{j \in long}{pos(j,i)\cdot mktPrice(j,i)} + \sum_{k \in short}{\lvert pos(k,i)\rvert \cdot mktPrice(k,i)}}{\sum_{j \in long}{pos(j,i)} + \sum_{k \in short}{\lvert pos(k,i)\rvert}} $$
where $pos(i,j)$ - position size of i-th stock at j-th day, $mktPrice(i,j)$ - close/current price of i-th stock at j-th day
Pls advice or point me to good resource for these kind of things.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.