Skip to content

feat(resolve): include nullified questions in the resolution file - #357

Open
karoliskascenas-fri wants to merge 3 commits into
forecastingresearch:mainfrom
karoliskascenas-fri:feat/nullified-forecasts-in-resolution-file
Open

karoliskascenas-fri wants to merge 3 commits into
forecastingresearch:mainfrom
karoliskascenas-fri:feat/nullified-forecasts-in-resolution-file

Conversation

@karoliskascenas-fri

@karoliskascenas-fri karoliskascenas-fri commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #313.

Nullified questions are now kept in the resolution sets as resolved: true with resolved_to: null, instead of being dropped. They are still never scored, and the file format gains no new fields.

  • Commit 1 gives each market question one row in explode_question_set() instead of one per dataset horizon (a leftover from scoring markets at every horizon; same reasoning as Remove forecast horizons for all market-based sources #84, which removed market horizons from question sets). No output change; it stops nullified markets appearing once per horizon.
  • Commit 2 keeps nullified rows in resolve_all() and drops them in set_resolution_dates() before scoring, using an internal nullified column that is not published. It also writes real nulls to the JSON instead of NaN.
  • Commit 3 also nullifies markets annulled by their platform (final value NaN: cancelled, annulled, ambiguous or void), which were previously dropped. Other final values that are not 0 or 1 still raise a Slack warning and are dropped.
Nullified row resolved resolved_to resolution_date
Market on a nullified_questions list true null nullification_start_date
Dataset question on a nullified_questions list true null horizon date
Market resolved on or before the due date true null real date
Market annulled by its platform true null real date

Combos follow their legs: a combo with a listed market leg gets the earliest listed leg's nullification_start_date.

All past rounds' files gain these rows on the first nightly run after merge. The data warehouse ingestion change is forecastingresearch/data-warehouse#473.

Testing: 1835 tests and ruff pass; leaderboard goldens unchanged. In a dev GCP project, main and this branch were run on the same day over all 41 rounds: all 119,558 existing rows are identical, and 4,152 nullified rows were added (129 of them from annulled markets and their combos), all following the table above.

🤖 Generated with Claude Code

@karoliskascenas-fri
karoliskascenas-fri force-pushed the feat/nullified-forecasts-in-resolution-file branch 2 times, most recently from fe71d2d to 8ba48c8 Compare November 24, 2026 13:46
@houtanb

houtanb commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Thanks @karoliskascenas-fri Issues pointed out by a quick Claude review. I agree with 2 and 4 (though you should check that for 2 that Claude is right to say they're not currently included), your choice for wording on 3.

  2. Markets annulled by the platform are still dropped (scope question)

  src/sources/_market.py:106 sets resolved_to to NaN for a resolved value that is not 0 or 1, and does not set nullified.
  src/resolve/resolve_all.py:110 then drops the row. The new assertion at src/tests/unit/test_market_source.py:426 says this is deliberate
  for suspect values. But a NaN resolved value (the platform annulled the market) is expected data: src/sources/_market.py:115 sends no
  Slack warning for it. These questions stay absent from the file, which is the gap issue #313 wants to close. Ask the author if this is
  in scope.
   
  3. The docstring fix

  src/resolve/explode_question_set.py:1:

  """Explode a question set into one row per (question x resolution_date x direction).

  Market questions have no resolution dates in the question set. They get one row per direction
  with `resolution_date` NaT.
  """

  src/_schemas.py:58:

  """Output of explode_question_set(), input to resolve_all().

  Dataset questions: one row per (question x resolution_date x direction).
  Market questions: one row per (question x direction) with `resolution_date` NaT. The source
  sets the date when it resolves the question.
  `id` is str for standard questions, tuple for combos.
  `direction` is tuple for combos, empty tuple for standard.
  """
 
  4. Nits
   src/resolve/resolve_all.py:100 has a parentheses-only change that is not related to the PR.

@karoliskascenas-fri

Copy link
Copy Markdown
Contributor Author

The annulled rows are not included. Should they be treated the same as nullified?

karoliskascenas-fri and others added 2 commits November 24, 2026 17:55
…tion_set()`

Market questions no longer get every dataset resolution date; `MarketSource._resolve()` already set
their dates and dropped the duplicates, so the output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oses forecastingresearch#313)

Nullified questions stay in the resolution set with `resolved: true` and `resolved_to: null`
instead of being dropped, and are still left out of scoring. Dataset questions keep their horizon
dates; markets on a nullified list get their `nullification_start_date`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@houtanb

houtanb commented Nov 24, 2026

Copy link
Copy Markdown
Member

Yes

…lution file

A resolved market whose final value is NaN (annulled, cancelled or void on its platform) is now
nullified and published with `resolved: true` and `resolved_to: null`, instead of being dropped.
Other values that are not 0 or 1 still raise a Slack warning and are dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@karoliskascenas-fri
karoliskascenas-fri force-pushed the feat/nullified-forecasts-in-resolution-file branch from 8ba48c8 to 24e2b5a Compare November 24, 2026 21:01
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.

include nullified forecats in the resolution file

2 participants