Skip to contents

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

Installation

# install.packages("devtools")
devtools::install_github("sstoeckl/eventclock")

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.

License

MIT © Sebastian Stöckl