Allow RelativeDailyVolume to be warmed up through a user-defined WarmUpPeriod - #9859
Merged
Martin-Molinero merged 1 commit intoOct 2, 2026
Conversation
…UpPeriod RelativeDailyVolume did not implement IIndicatorWarmUpPeriodProvider, so WarmUpIndicator always skipped it with a warning and there was no way to warm it up, even when the user knows how many bars are needed for the resolution they feed it with. The indicator now implements the interface with a settable WarmUpPeriod that defaults to zero, so nothing is warmed up unless the user sets it. The number of data points required still depends on the resolution and on the market hours of the security, which is why it is not derived from the period automatically. Closes QuantConnect#8629
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
RelativeDailyVolumedid not implementIIndicatorWarmUpPeriodProvider, soWarmUpIndicatoralways skipped it with the warning described in the issue and there was no way to warm it up, even when the user knows how many bars the indicator needs at the resolution they feed it with.This PR makes
RelativeDailyVolumeimplementIIndicatorWarmUpPeriodProviderwith a settableWarmUpPeriodthat defaults to0:WarmUpIndicatorrequests no history and the indicator is left as it is. TheRDV()helper does not take part in automatic indicator warm up, so that behavior is unchanged too.rdv.WarmUpPeriod = 3 * 390/rdv.warm_up_period = 3 * 390for three days of minute bars),WarmUpIndicatorwarms the indicator up with that many bars.The number of data points the indicator needs still depends on the resolution and on the market hours of the security, which is why it is not derived from the period automatically (see the reasoning in #7344). The property documentation explains this.
Related Issue
Closes #8629
Motivation and Context
Users could not warm up
RelativeDailyVolumeat all. Letting them define the warm up period themselves gives them a way to do it without LEAN having to guess the bar count.Requires Documentation Change
The indicator reference for Relative Daily Volume could mention that
WarmUpPeriodmust be set explicitly forWarmUpIndicatorto warm it up.How Has This Been Tested?
Added to
RelativeDailyVolumeTests:WarmUpPeriodDefaultsToZeroAndSkipsWarmUp: defaultWarmUpPeriodis0,WarmUpIndicatorleaves the indicator untouched.WarmsUpWithUserDefinedWarmUpPeriod(minute: 3 × 390 bars, hour: 3 × 7 bars): afterWarmUpIndicatorthe indicator is ready, has processed exactlyWarmUpPeriodsamples and has a non-zero value.Ran the
RelativeDailyVolumeTestsfixture locally (macOS arm64, .NET SDK 10.0.401): 14 passed, 1 skipped (WarmUpIndicatorProducesConsistentResults, skipped by design whenWarmUpPeriodis0).AlgorithmIndicatorsTestswas also run; the only failures are the PythonIndicatorHistorytests, which fail in this environment because pandas is not installed (PandasConvertertype initializer), unrelated to this change.Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>