Add configs for backup universe files and separate underlying/derivative history providers - #42
Merged
jhonabreul merged 3 commits intoAug 13, 2026
Conversation
jhonabreul
marked this pull request as ready for review
August 13, 2026 22:00
Martin-Molinero
approved these changes
Aug 13, 2026
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
Two additions to the universe generation configuration (one commit each), plus a test infrastructure fix:
Backup universe files
universe-generation-backup-files(default false), read in theDerivativeUniverseGeneratorconstructor.GetUniverseFileNamesuffixes every generated universe file with.backup(e.g.20260810.csv.backup). This is the single choke point for all generated universe files (options, index options, futures, future options).Separate history providers per leg
universe-generation-underlying-history-provideranduniverse-generation-derivative-history-provider, read in the baseProgram. Each accepts the same format ashistory-provider(a single type name or a JSON list) and builds its ownHistoryProviderManager.history-provider— behavior is unchanged.DerivativeUniverseGeneratornow routes underlying history requests and derivative history requests through their own providers (_underlyingHistoryProvider/_derivativeHistoryProvider); the original single-provider constructor delegates with the same instance for both legs.Test setup fix (pre-existing CI failures)
ImpliedVolatilityInterpolatorTests(and locallyIndexHistoryProviderTests) were failing before this PR: Lean resolves the map file and factor file providers withComposer.GetPart<T>, which does not compose new instances, so in the bare test host any symbol mapping or corporate events lookup hit a null provider (Symbol.Create→SecurityIdentifier.GetFirstTickerAndDateNRE;DividendYieldProvider.LoadCorporateEventsNRE).[SetUpFixture](TestSetup) registers and initializes both providers once before any test runs, the same wayProgramdoes at startup.Related Issue
N/A
Motivation and Context
IndexHistoryProvider), so each leg can now be pointed at its own provider chain instead of sharing one provider list for everything.Requires Documentation Change
No
How Has This Been Tested?
DerivativeUniverseGeneratorTests.GeneratesUniverseFilesAsBackupFilesWhenConfigured: generated universe file name with the config off (<date>.csv) and on (<date>.csv.backup).DerivativeUniverseGeneratorTests.UnderlyingAndDerivativeHistoryRequestsShareASingleProviderByDefault: with the single-provider constructor, all underlying and derivative requests land on the one provider.DerivativeUniverseGeneratorTests.UnderlyingAndDerivativeHistoryRequestsAreRoutedToTheirOwnProviders: each leg's requests land only on its own provider.ImpliedVolatilityInterpolatorTests, which also failed in CI).Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>