SatoshiDice
Abstract
Approaching the Hot Hand with a Cool Head Data preparatory and analytical scripts of "Approaching the Hot Hand with a Cool Head. A Comment on Xu and Harvey (Cognition, 2014)" by Máté Csaba Sándor and Barna Bakó of Corvinus University of Budapest Producing the gambling dataset The gambling dataset was created using the transactional data extractable from the bitcoin ledger. To make things simpler we have been using a formated dataset from Kondor et al. (2), since its original publication, the referenced data of the article became unavailable, but we reshared it beside our data extracts at Zenodo (4). To replicate the dataset: Setup of R: - Use the latest R-core and the tidyverse package (but R 4.2.2 and tidyverse 2.0.0 should work 100%)- If you are using RStudio rmarkdown and ggpubr are automatically installed, otherwise needed manually (rmarkdown 2.20 and ggpubr 0.6.0 should work 100%)- Install fixest package for the fixed effects estimations (fixest 0.14.1 should work 100%) Preparing files: - Clone the codebase (7)- Create a working directory (where your R session has access to write to) and set the path in the first chunk as WORKDIR- Create the sub-directories calcdata and rawdata under WORKDIR- Download and extract the kondor_et_al_do_the_ritch_get_richer_data_2014.zip file from (4), place them under rawdata (5.8GB total size uncompressed!) Executing the R script and obtaining results: - make sure you have a machine with optimally up to 16GB of available (!) RAM- run the script data_preparation_bitcoin.R as is to recreate the dataset for the first time window (can take up to an hour)- to generate the other csv files adjust the value of the variable WINDOW at line 31 between 1-5- this step is necessary to save your computer for running out of memory and killing the R process before saving outputs... Data extract used in "Approaching the Hot Hand with a Cool Head" [^1] The 5 samples that we have created are made available at Zenodo(4). These contain bets placed at SatoshiDice, a bitcoin based gambling site that was the most popular of such between 2012 and 2014 and using the public information available in the ledger and the user contraction approximation of Kondor et. al. (2). A representative archive state of the game and the website is available at the WebArchive (5). The columns featured in the dataset (names in the first row): * txID_bet: transaction ID of the bet transaction [integer] * txID_answer: transaction ID of the answer transaction [integer] * time_bet: unixtime of the bet transaction based on the block timestamp [integer] * timediff: seconds between the timestamp of the bet transaction and the answer based on the block timestamps [integer] * addrID_player: initiating address ID of the bet transaction, the ID gathered from the dataset, not resolved to true bitcoin IDs, in case of multiple addresses, the top address is used, since this is the one SatoshiDice uses for the return transaction by default [integer] * addrID_game: reciving/initiating address ID of the bet/answer transaction, the ID gathered from the dataset, not resolved to true bitcoin IDs [integer] * bet_value: bet ammount (or wager) measured in satoshis (1 satoshi = 1e-8 BTC) [integer] * answer_value: answer ammount (or payout) measured in satoshis (1 satoshi = 1e-8 BTC), 1e5 satoshis [integer] * PriceMultiplier: price multipliers (or odds) of the games the bets are put on, these are used to decide on status using bet and answer value, the multipliers are mined from (5) [double] * status: "win"/"loss" tags calculated using bet and answer value combined with odds [string] * userID: assigned based on addrID_player using the methods and dataset of (2) [integer] With questions about the dataset or the process, contact Máté Sándor (sampaat at gmail dot com). [1]: Sándor, M.C., Bakó, B (2021). Approaching the Hot Hand with a Cool Head (Working paper) https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3952051 [2]: Kondor, D., Pósfai, M., Csabai, I., & Vattay, G. (2014). Do the rich get richer? An empirical analysis of the BitCoin transaction network. PLoS ONE, 9(2), e86197. https://doi.org/10.1371/journal.pone.0086197 [3]: https://doi.org/10.5061/dryad.qz612jmcf [4]: https://zenodo.org/records/21480046 [5]: https://web.archive.org/web/20130403062213/http://www.satoshidice.com/ [6]: https://ff137.github.io/bitstamp-btcusd-minute-data/?utm_source=chatgpt.com [7]: https://github.com/sampaat/hot_hand_cold_head Version notes 1.1.0: lower (94%) average match rate, but higher accuracy Serial assignments used to reduce ambiguity on matching return transactions Ambiguous transactions now have NA answers (not used for streaks) Bets outside the min/max range are now have NA answers (not used for streaks) Tests have been added to the matching process 1.2.0: added the original files of Kondor et al (2014) for full replicability since they became unavailable since.
Fields of Study & Subjects
Sports Analytics and Performance
Benford’s Law and Fraud Detection
Data Analysis with R
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 21 July 2026
- Language
- EN
- Document type
- Dataset