Why Shifting a Spread Does Not Preserve Log Returns
Summary
The document asks how to calculate returns for a spread that can take negative values, since the logarithm of a negative spread level is undefined. It considers adding a constant large enough to make every observation positive, which keeps absolute differences between observations unchanged but changes percentage and log returns.
A numerical example compares the log return from spread values of negative one and negative two with the result after adding fifty. The shifted values produce a much smaller log change, showing that the transformation does not preserve the return measure. The post raises the issue but provides no accepted solution or comparison of alternatives. Its practical lesson is that a spread is not a positive price series: adding an offset cannot make price-based log returns invariant. Researchers need to choose a performance measure suited to the spread or to the strategy's gains and losses, and should define that measure explicitly before backtesting.
Key ideas
- A spread can be negative, so its level cannot be used directly in a logarithm.
- Adding a constant preserves absolute differences but changes relative and log changes.
- The example shows that shifted values yield a different log return from the original magnitudes.
- The document poses the problem but does not establish a standard transformation or solution.
Tags
Full text
# Turning a spread always-positive for profit calculations? # Turning a spread always-positive for profit calculations? I have a strange problem. I am running a backtest on a strategy whose signal is based on a spread. Naturally, a spread can go negative or positive. If I try to calculate the log return of a difference between two negative points in the spread it goes undefined. Is there a standard method of "pushing the spread up"? I thought about a few very naive methods and the only one that made sense was to add a constant value to every element equal to the lowest value the spread goes. By doing this the distance between two successive points is maintained. The only problem is the return is not: Take two points on a spread -1 and -2 and let's say we add 50 to them when we push the spread above the zero line: ``` log(1) - log(2) = -0.69314718055994 (1 and 2 made positive here to show the expected value) log(51) - log(52) = -0.019418085857101808 ``` So this method, while simple, does not work. As you might expect the log-percentage difference between 51 and 52 is significantly smaller than 1 and 2. Is there a better, more effective way to do this?
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.