Add Python version of IndicatorVolatilityModelAlgorithm#9580
Merged
Martin-Molinero merged 1 commit intoJul 2, 2026
Conversation
Port the C# regression algorithm demonstrating IndicatorVolatilityModel usage, including how to reset and warm up the indicator on splits and dividends to avoid volatility jumps from price discontinuities, and enable the Python variant in the regression test suite. Closes QuantConnect#6375 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7LGdW3eC9za8WMrtssHGr
c6120c9 to
b90fb92
Compare
Contributor
Author
|
@Martin-Molinero Hi, thanks for approving the CI runner earlier. I've fixed the mypy When you have a moment, could you please approve the workflows again so CI can re-run? Thank you! |
Martin-Molinero
approved these changes
Jul 2, 2026
Martin-Molinero
left a comment
Member
There was a problem hiding this comment.
Thanks @jonathanwu906!
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
Adds
Algorithm.Python/IndicatorVolatilityModelAlgorithm.py, a Python port of the existing C# regression algorithm demonstratingIndicatorVolatilityModelusage — including how to reset and warm the indicator back up on splits and dividends so volatility doesn't jump on price discontinuities. Also updates the C# definition'sLanguagesto{ CSharp, Python }so the regression suite runs both variants against the same expected statistics.Related Issue
Closes #6375
Motivation and Context
#6375 asks for an example of
IndicatorVolatilityModel. The C# example algorithm and unit tests were added in #7058; this completes the issue with the Python counterpart, matching the convention that example/regression algorithms ship in both languages.Requires Documentation Change
No — this adds the example the documentation can reference.
How Has This Been Tested?
Ran the regression tests inside the
quantconnect/lean:foundationcontainer (same image as the Regression Tests CI workflow):Result: 2/2 passed (
CSharp/IndicatorVolatilityModelAlgorithm,Python/IndicatorVolatilityModelAlgorithm); the Python variant produces statistics identical to the C#ExpectedStatistics.Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>🤖 Generated with Claude Code
https://claude.ai/code/session_01R7LGdW3eC9za8WMrtssHGr