The trend portion calculation in the _getWeights function deviates from the whitepaper specification for the channel-following strategy. The deviation involves an additional division by 2โ
๐, which reduces the magnitude of the trend contribution. This discrepancy impacts the behavior of the trend-following component, particularly for larger price gradients, leading to potential underperformance in capturing trends.
The whitepaper defines the trend portion as:
In the _getWeights function, the following steps calculate the trend portion:
Absolute Gradient Calculation
This computes โฃ๐โฃ, the absolute value of the price gradient, as required
Scaling the Absolute Gradient
Here, the absolute gradient is scaled down by 2โ
๐. This step is not specified in the whitepaper.
Exponentiation
The scaled gradient is raised to the power of the exponent
Reintroducing the Sign
Combining with the Envelope
The division by 2โ
๐ during the scaling step artificially reduces the magnitude of the trend portion. This scaling is not part of the whitepaperโs formula, leading to smaller contributions from the trend-following component, especially for larger price gradients.
The division by 2โ ๐ dampens the trend portionโs magnitude. As a result:
For small gradients, the trend portion may become negligible, diminishing the systemโs ability to respond to subtle market trends.
For large gradients, the reduced trend magnitude may fail to capitalize on significant directional changes.
Manual Review
Remove the division by 2โ
๐ in the scaling of the absolute gradient
If the division by 2โ
๐ is intentional (e.g., for stability or design constraints), document this deviation in the code and any associated documentation to ensure transparency.
The formula here is the one in Whitepaper page 11, which is right and the division is explained on the last line : "Finally note โฆ".
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.