Skip to content

mostlyright.finance.transcripts.resolver

Kalshi earnings-mention resolver.

KXEARNINGSMENTION{TICKER} / KXMENTIONEARN{TICKER} / KXBRKEM markets resolve on whether a target word is said by a company representative on a given earnings call. resolve(contract_id, event_date, target_word=...) is the deterministic mapping from a Kalshi market identifier to the frozen EarningsResolution tuple used by downstream code.

It follows the same structure as mostlyright.markets.catalog.kalshi_nhigh:

  • prefix dispatch over the three root variants, with the suffix as the ticker;
  • the suffix ticker is validated against the codegen’d EARNINGS_SERIES_ROSTER, a per-company enumeration rather than a global status=open sweep, which loops over high-volume sports series and never reaches earnings-mention before timing out;
  • event_date is a calendar date with no time component. A datetime is rejected with TypeError, the same guard kalshi_nhigh applies and the TypeScript twin’s coerceContractDate mirrors, because the time component would break the date-equality settlement match.
FunctionDescription
resolve(contract_id, event_date, *, target_word)Resolve a Kalshi earnings-mention contract to its frozen tuple.
ClassDescription
EarningsResolution(ticker, target_word, …)The frozen tuple a Kalshi earnings-mention contract resolves to.

class mostlyright.finance.transcripts.resolver.EarningsResolution(ticker, target_word, event_date, resolution_rule, resolution_status=‘qualifying_event’)

Section titled “class mostlyright.finance.transcripts.resolver.EarningsResolution(ticker, target_word, event_date, resolution_rule, resolution_status=‘qualifying_event’)”

Bases: object

The frozen tuple a Kalshi earnings-mention contract resolves to.

Shaped like NHighResolution: an immutable (ticker, target_word, event_date, resolution_rule) carrier, so a resolution cannot be mutated downstream. The TypeScript twin freezes the equivalent object with Object.freeze.

  • Parameters:
    • ticker (str)
    • target_word (str)
    • event_date (date)
    • resolution_rule (str)
    • resolution_status (str)

Whether a qualifying call exists for this date. "qualifying_event" for a normal resolution; "no_qualifying_event" when the Polymarket derive sees a postponed or cancelled call. It carries a default so the Kalshi resolve path never has to set it.

mostlyright.finance.transcripts.resolver.resolve(contract_id, event_date, , target_word)

Section titled “mostlyright.finance.transcripts.resolver.resolve(contract_id, event_date, , target_word)”

Resolve a Kalshi earnings-mention contract to its frozen tuple.

The contract_id is the Kalshi market identifier — one of the three root variants KXEARNINGSMENTION<TICKER> (e.g. KXEARNINGSMENTIONNKE), KXMENTIONEARN<TICKER>, or the Berkshire fixed root KXBRKEM. The suffix is the ticker; it is validated against EARNINGS_SERIES_ROSTER.

  • Parameters:
    • contract_id (str) – Kalshi market identifier. Case-insensitive.
    • event_date (date) – The calendar date the call airs / the market settles for. Must be a datetime.date with no time component.
    • target_word (str) – The word/phrase the market resolves on. Required, non-empty.
  • Return type: EarningsResolution
  • Returns: A frozen EarningsResolution.
  • Raises:
    • TypeErrorcontract_id is not a string, event_date is a datetime (or any non-date), or target_word is not a string.
    • ValueErrorcontract_id matches no known root, the ticker suffix is empty, the ticker is not in EARNINGS_SERIES_ROSTER, or target_word is empty.