Data and code for: Easing off at the session high: How prior gains and losses shape risk taking in real-money betting

Published: 28 October 2026| Version 1 | DOI: 10.17632/y37hctd94y.1
Contributor:

Description

Data and code for Kaibo Tang, "Easing off at the session high: How prior gains and losses shape risk taking in real-money betting" (submitted to the Journal of Economic Psychology). The paper locates the reference point in sequences of real gains and losses: a win that carries a trader past the best profit reached so far in the session lowers the next stake, while crossing the starting balance shows no break-even effect. The data come from the five-minute "Bitcoin Up or Down" prediction markets on Polymarket and were downloaded from the public Polymarket Gamma API (market metadata and resolutions) and Data API (fills) on 17 October 2026. The discovery sample covers the 4,032 markets that opened between 2 and 16 October 2026 (UTC) and the replication sample the 4,032 markets of the two preceding weeks; for each sample, the complete fill histories of all wallets with taker fills in 10 to 2,000 of these markets were downloaded. The primary analysis windows of the two samples contain 1,063,588 resolutions of real-money bets by 12,869 traders. Files: - discovery_raw.tar.xz and replication_raw.tar.xz: the raw API responses, one JSON file per market and per wallet (17,115 and 17,384 files). - discovery_raw_manifest.tsv and replication_raw_manifest.tsv: path, size and SHA-256 of every file in the corresponding archive. - replication_package.zip: the Python and R code that rebuilds the samples, the estimates, the tables, the figures and every number in the paper and its Online Appendix; the result files from which the tables, figures and numbers are built; and a README with the run order and a field dictionary.

Files

Steps to reproduce

1. Unzip replication_package.zip and, in the folder that contains code/, restore the raw downloads: mkdir -p data/raw replication/data/raw tar -xJf discovery_raw.tar.xz -C data/raw tar -xJf replication_raw.tar.xz -C replication/data/raw ln -s ../code replication/code 2. Software: Python 3.11+ (standard library only) and R 4.4+ with data.table, fixest, splines, rdrobust, rddensity, ggplot2, patchwork, scales, svglite, rsvg and ragg. 3. Run the scripts in the order given in README_replication.md: (1) build positions, sessions and resolution events from the raw files; (2) run the analyses of the discovery sample; (3) run the replication sample from replication/ and apply the pre-specified decision rule; (4) compute the descriptive statistics; (5) write the figures, the tables and the numbers in the text. The download scripts skip files that are already present, so after the restore they fetch nothing. 4. Step 5 also runs from the included result files alone, except Figure 1a and 1b, which need the derived data of step 1. One check in step 4 (taker fills against all fills in one market) queries the public Polymarket Data API.

Institutions

Categories

Risk Taking, Decision Making, Behavioral Economics

Licence