Skip to content

Support custom option chain provider for options universe generation - #43

Merged
jhonabreul merged 3 commits into
masterfrom
feature-universe-option-chain-provider
Aug 20, 2026
Merged

Support custom option chain provider for options universe generation#43
jhonabreul merged 3 commits into
masterfrom
feature-universe-option-chain-provider

Conversation

@jhonabreul

@jhonabreul jhonabreul commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds support for sourcing option chains from a custom IOptionChainProvider during universe generation, mirroring the existing futures-chain-provider support in FutureChainSymbolProvider:

  • New OptionChainSymbolProvider (options generator project) instantiates an IOptionChainProvider through the Composer when the universe-option-chain-provider config is set, the same way FutureChainSymbolProvider does for futures.
  • Its GetSymbols() override makes a single GetOptionContractList call with a tickerless dummy symbol carrying the generator's security type and market, fetching the contracts of every canonical the provider finds instead of discovering canonicals from the data folder zip files.
  • The result is filtered to the generator's security type and market, expired contracts are dropped, and chains are grouped by canonical with the same ordering as the file-based path.
  • With no provider configured, or when the provider returns nothing, behavior is unchanged: chains are read from the data folder zip entry names via the base ChainSymbolProvider.
  • ChainSymbolProvider is now abstract and purely file-based, and DerivativeUniverseGenerator.GetSymbols() is abstract, with each generator creating its own chain symbol provider (OptionsUniverseGeneratorOptionChainSymbolProvider, FuturesUniverseGeneratorFutureChainSymbolProvider).

Related Issue

N/A

Motivation and Context

Allows generating universe files when the price data files for the processing date are not on disk, by fetching the chains from a custom provider (e.g. backed by a live data store) instead.

Requires Documentation Change

No

How Has This Been Tested?

  • Full test suite passes: 19/19.
  • The custom provider path is exercised through the concrete provider implementation's own test suite.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@jhonabreul
jhonabreul marked this pull request as ready for review August 19, 2026 15:52
@jhonabreul
jhonabreul requested review from Martin-Molinero and a lite review from Copilot and removed request for Copilot August 19, 2026 15:52
@jhonabreul
jhonabreul merged commit 31b1633 into master Aug 20, 2026
2 checks passed
@jhonabreul
jhonabreul deleted the feature-universe-option-chain-provider branch August 20, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants