Add VIX Mini Futures (VXM) Support#9400
Open
Ruuudy1 wants to merge 2 commits into
Open
Conversation
Member
|
Would be nice to add a sample margin file too see VX at https://github.com/QuantConnect/Lean/tree/master/Data/future/cfe/margins |
Comment on lines
+558
to
+561
| if (holidays.Contains(expiryDate) || holidays.Contains(nextThirdFriday)) | ||
| { | ||
| expiryDate = expiryDate.AddDays(-1); | ||
| } |
Member
There was a problem hiding this comment.
Minor but this is blindly shifting a day backwards, doesn't validate it's a tradable date, just if it's a holiday, which seems error prone?
Member
There was a problem hiding this comment.
*suggest checking how it's done in the others
Adds complete LEAN support for VIX Mini Futures (VXM) traded on CBOE: - Add Futures.Indices.VIXMini = "VXM" constant - Add expiry function: 30 days before third Friday of following month - Add symbol properties: multiplier 100, tick 0.01 (USD) - Add 15 test date pairs for 2023-2025 to FuturesExpiryFunctionsTestData.xml - Add [TestCase(VIXMini, EightOClockChicagoTime)] to IndicesExpiryDateFunction test - Add market hours configuration mirroring VX trading hours Closes QuantConnect#6655 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Replace single `if` holiday check with `while` loop using `IsCommonBusinessDay()` to ensure the computed expiry date is always a valid tradable day (not just one step back) - Fix test data: 2025-03-19 -> 2025-03-18 (April 18 2025 is Good Friday, a CFE holiday, shifting the expiry back) - Add Data/future/cfe/margins/VXM.csv margin file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fb8843d to
33eee65
Compare
Author
|
@Martin-Molinero Made the necessary changes. Added sample file, same as VIX sample file but at 1/10th of the maintenance since for VXM. |
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.
Summary
Description
Adds LEAN support for VIX Mini Futures (VXM) traded on Cboe Futures Exchange (CFE). VXM provides one-tenth the exposure of standard VIX futures contracts with identical expiration mechanics.
Related Issue
Closes #6655
Motivation and Context
VIX Mini Futures enable traders to get VIX exposure with lower capital requirements. Without LEAN support, users cannot trade or backtest VXM contracts in the framework.
Requires Documentation Change
N/A
How Has This Been Tested?
Types of changes
Checklist:
feature-[ISSUE_NUMBER]-[description]