eventclock measures event-clock time (information time) ahead of scheduled events — referendums, elections, central-bank decisions — from traded event state prices such as prediction-market contracts. Event-clock time \(A_{t,T}\) is the quadratic variation of the log-odds of the state-price-implied event probability: how much outcome-relevant information arrived, and when.
The package implements the estimators, closed-form calculators, and datasets of the working paper
Hanke, M., Schadner, W., Stöckl, S., and Weissensteiner, A. (2026). Learning Before Scheduled Events: Prediction Markets, State Prices, and Option Valuation. Working Paper.
A Python port is available at cgebe/eventclock-py.
The workflow
The package implements the paper’s architecture end to end. The logic is sequential: event-market prices supply the probability and the clock; event-spanning options identify the asset’s outcome-conditional distributions; options expiring before the event are deliberately left out of the estimation, so that they remain available as an out-of-sample test of the learning channel.
| Step | Object | Functions | Vignette |
|---|---|---|---|
| 1. Standardize event prices | state-price-implied event probability \(q_t\) |
as_event_prices(), q_from_price(), q_from_ffutures(), q_from_deal_spread(), ec_validate(), pm_*()
|
Brexit tour |
| 2. Measure the clock | \(A_{t,T}\) = log-odds quadratic variation, with robustness and inference |
event_clock(), event_clock_path(), ec_recovery_set()
|
Brexit tour |
| 2b. Measure it in practice | sampling frequency, real-time forecasts chosen without look-ahead, two venues |
event_clock_staggered(), ec_signature(), event_clock_forecast(), ec_forecast_select(), event_clock_venues(), ks_prices()
|
Measurement in practice |
| 3. Validate the estimator | Monte Carlo: consistency, CI coverage, jumps, microstructure |
ec_simulate_path(), ec_simulate()
|
Validation |
| 4. Exposure from returns | \(\widehat{\Delta\eta}\) from \(r_t \approx \Delta\eta\,\Delta q_t\) |
event_beta(), ec_relevance()
|
Event betas |
| 5. Exposure from event-spanning options | log exposure \(\theta = \log(\eta_1/\eta_2)\) via the lognormal event mixture |
ec_mix_price(), ec_mix_iv(), ec_theta_fit(), ec_theta_hump(), ec_delta_to_k()
|
Event-spanning options |
| 6. Pre-resolution pricing and the learning test | held-out options vs. the no-learning benchmark |
ec_mix_price_pre(), ec_mix_iv_pre(); first order: ec_sigma_eff(), ec_variance_share(), ec_iv_rule()
|
Event-spanning options |
| 6b. Ordinary smile for the test | template rules fixed in advance, chosen on earlier quiet surfaces |
ec_quiet_library(), ec_quiet_rules(), ec_quiet_select(), ec_quiet_shape()
|
Event-spanning options |
Features
-
as_event_prices()— standardize any probability series (prediction markets, betting quotes, state prices) with flag-don’t-drop cleaning; convertersq_from_price()(discount / overround),q_from_ffutures()(fed funds futures, 25bp grid), andq_from_deal_spread()(merger-arb deal clocks); data screening withec_validate(). -
event_clock()— realized-variation estimator of \(A\) with truncation, bipower, and largest-move robustness variants, plus standard errors and confidence intervals (se = TRUE, quarticity or wild bootstrap);event_clock_path()for the cumulative clock over time;event_clock_forecast()for the trailing-window real-time benchmark;ec_signature()for the sampling-frequency (microstructure) diagnostic. -
Assets & finance —
event_beta(): realized event exposures \(\widehat{\Delta\eta}\) from returns with Newey-West errors and the \(\beta = 1\) loading test against an external exposure;ec_relevance(): the sufficient statistic for pricing relevance. -
Event-spanning options — the lognormal event mixture (
ec_mix_price(),ec_mix_iv());ec_theta_fit(): the common conditional-mean-ratio surface fit for the log exposure \(\theta = \log(\eta_1/\eta_2)\);ec_theta_hump(): the first-order variance-hump estimator;ec_delta_to_k()for standardized delta grids;ec_mix_price_pre()/ec_mix_iv_pre(): exact pre-resolution option prices under event learning (the no-learning benchmark is the \(A = 0\) special case). -
Ordinary-risk benchmark —
ec_quiet_library(),ec_quiet_rules(),ec_quiet_select(),ec_quiet_shape(): the smile without event learning, built from earlier quiet-clock surfaces with a template rule chosen on pseudo-targets before the target. -
Formula book — closed-form calculators in \((q, A)\):
ec_moments(),ec_exceedance(),ec_revision(),ec_atm_event_call(),ec_sigma_eff(),ec_variance_share(),ec_iv_rule(),ec_target_clock(); exact transition law and simulators with lumpy-information jumps (ec_transition_density(),ec_simulate(),ec_simulate_path()). -
Measurement in practice —
event_clock_staggered()(staggered sampling grids),event_clock_forecast()withec_forecast_select()(real-time forecasts whose window is chosen on earlier periods only),event_clock_venues()(own, composite, and cross-venue clocks from two venues). -
Connectors — Polymarket:
pm_search(),pm_markets(),pm_prices(),pm_daily()on the public Gamma/CLOB APIs; Kalshi:ks_events(),ks_markets(),ks_prices()on the public trade API. Both keyless. Exchange options:cme_definitions(),cme_statistics(),cme_option_surfaces()turn CME Globex definitions and daily settlements (DatabentoGLBX.MDP3files you license yourself) into option surfaces. -
Datasets —
brexit2016,us2016(the working paper’s event windows),polymarket2024(hourly 2024 U.S. election prices),kalshi2024(the same event on Kalshi, daily 15:45 snapshot),djt2024(the matching exposed stock),us2016_surfaces_sim(simulated event-spanning option surfaces), andfomc_meetings(2021-2027 FOMC calendar). -
Plots —
plot_q(),plot_clock(),plot_clock_vs_calendar(),plot_signature().
Quick start
library(eventclock)
ep <- as_event_prices(brexit2016,
time = "date", price = "q_leave",
market_id = "Brexit: Leave", event_date = as.Date("2016-06-23")
)
# the working paper's headline estimates
event_clock(ep,
from = as.Date("2016-05-24"),
to = c(`1W` = as.Date("2016-05-31"), `2W` = as.Date("2016-06-07"),
`1M` = as.Date("2016-06-23"))
)
#> # A tibble: 15 × 10
#> market_id from to horizon n_obs n_incr n_gaps max_gap_days
#> <chr> <date> <date> <chr> <int> <int> <int> <dbl>
#> 1 Brexit: Leave 2016-05-24 2016-05-31 1W 8 7 0 1
#> 2 Brexit: Leave 2016-05-24 2016-05-31 1W 8 7 0 1
#> 3 Brexit: Leave 2016-05-24 2016-05-31 1W 8 7 0 1
#> 4 Brexit: Leave 2016-05-24 2016-05-31 1W 8 7 0 1
#> 5 Brexit: Leave 2016-05-24 2016-05-31 1W 8 7 0 1
#> 6 Brexit: Leave 2016-05-24 2016-06-07 2W 15 14 0 1
#> 7 Brexit: Leave 2016-05-24 2016-06-07 2W 15 14 0 1
#> 8 Brexit: Leave 2016-05-24 2016-06-07 2W 15 14 0 1
#> 9 Brexit: Leave 2016-05-24 2016-06-07 2W 15 14 0 1
#> 10 Brexit: Leave 2016-05-24 2016-06-07 2W 15 14 0 1
#> 11 Brexit: Leave 2016-05-24 2016-06-23 1M 31 30 0 1
#> 12 Brexit: Leave 2016-05-24 2016-06-23 1M 31 30 0 1
#> 13 Brexit: Leave 2016-05-24 2016-06-23 1M 31 30 0 1
#> 14 Brexit: Leave 2016-05-24 2016-06-23 1M 31 30 0 1
#> 15 Brexit: Leave 2016-05-24 2016-06-23 1M 31 30 0 1
#> # ℹ 2 more variables: method <chr>, A <dbl>
plot_clock(event_clock_path(ep, from = as.Date("2016-05-24")))
Live data from Polymarket:
mkts <- pm_markets("presidential-election-winner-2024")
tok <- mkts$token_id[grepl("Trump", mkts$question) & mkts$outcome == "Yes"]
ep24 <- pm_prices(tok, from = "2024-06-01", to = "2024-11-06")
event_clock(pm_daily(ep24))(An alternative community client for the same APIs is polymarketR.)
See the workflow table above for which vignette covers which step; the full tour starts at vignette("eventclock-brexit", package = "eventclock").
Citation
citation("eventclock")Please cite the working paper above when you use the Event Clock methodology, and for the identification theory (exact and partial recovery, multiple venues) also the companion paper
Hanke, M., Schadner, W., Stöckl, S., and Weissensteiner, A. (2026). The Event Clock: What State Prices Identify About Physical Information. Working Paper. SSRN 7420838.
