Skip to content

Add time-series and cross-sectional information coefficient indicators - #10231

Merged
Martin-Molinero merged 2 commits into
masterfrom
feature-10104-information-coefficient-indicators
Nov 24, 2026
Merged

Martin-Molinero merged 2 commits into
masterfrom
feature-10104-information-coefficient-indicators

Conversation

@Martin-Molinero

@Martin-Molinero Martin-Molinero commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Description

Adds two information coefficient (IC) indicators and their algorithm helpers:

  • TimeSeriesInformationCoefficient (TSIC(symbol, signal, period, resolution, selector)): one asset's Spearman correlation, over the last period periods, between the signal's value at the end of each period and the asset's return over the next one.
  • CrossSectionalInformationCoefficient (CSIC(symbols, signalFactory, resolution, selector)): each period, the Spearman correlation across the assets between their signal values at the end of the previous period and their returns over this one.

Behavior:

  • Signals are owned by the indicator, so automatic warm-up works: each input updates its asset's signal first. A signal also updated elsewhere throws, and a CompositeIndicator signal is rejected. A signal chained with .Of() can't be detected; the XML docs say so.
  • Periods come from MultiSymbolIndicator's alignment (UTC end time truncated to the resolution), so assets whose bars end at different local times share a period. A period is correlated as soon as every tracked asset has an input for it, or else across the assets that have one when the next period starts, such as after a delisting. A period needs at least 3 assets.
  • Add / Remove follow a changing cross-section, as in the breadth indicators.
  • One value per period, with the end time of its period's last input, so a period correlated late keeps its own time and indicators chained to it get one value per period.
  • Returns are over one period. Ties use average ranks. A constant input gives 0, as Correlation does.
  • Python: tsic / csic overloads convert Python signals the same way register_indicator does.
  • MultiSymbolIndicator's symbol data takes the resolution of its own first input when the indicator's first input didn't set one, so assets added afterwards align too. Its other subclasses behave as before.

This takes over #10105 without its output time zone handling: like every other indicator, a value carries its input's exchange time. Publishing indicators over several exchange time zones in one clock is #10230.

Related Issue

Closes #10104

Motivation and Context

LEAN had no built-in information coefficient indicator.

Requires Documentation Change

Yes: QuantConnect/Documentation#2896, to merge after a release that includes this change.

How Has This Been Tested?

  • TimeSeriesInformationCoefficientTests and CrossSectionalInformationCoefficientTests check each value against scipy.stats.spearmanr, including missing data, delistings, Add / Remove, assets whose bars end at different local times, the zero-price skip, warm-up, Reset, signal ownership errors, one value per period, and a 1,000-asset cross-section.
  • InformationCoefficientHelpersAcceptCustomPythonSignals covers custom Python signals under automatic warm-up.
  • On Add information coefficient indicators #10105, backtests over 2024 data (equities with a delisting and add / remove, futures of different exchanges, indicator_history) matched a scipy model on every value. This branch gives the same values; it only drops the output time zone conversion of Add information coefficient indicators #10105's last two commits.
  • Locally, the information coefficient tests pass (35). CI runs the full 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>

🤖 Generated with Claude Code

Adds TSIC and CSIC, with their algorithm helpers and Python overloads.
The cross-sectional IC aligns its periods through MultiSymbolIndicator,
correlates the assets that have data when a period is incomplete, and
follows a changing cross-section with Add and Remove.

Takes over #10105.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MultiSymbolIndicator's symbol data now takes the resolution of its first input when the indicator's first input didn't
set one, such as for an asset added afterwards, and clears it on reset. The cross-sectional IC no longer tracks the
assets added after its first input, and SetResolution is private again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Martin-Molinero
Martin-Molinero merged commit 7b73d61 into master Nov 24, 2026
14 of 15 checks passed
@Martin-Molinero
Martin-Molinero deleted the feature-10104-information-coefficient-indicators branch November 24, 2026 19:00
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.

Information Coefficient Indicators

1 participant