Download README.md from paperswithbacktest/Options-Yearly-TransactionCostParams: direct link, hf CLI and curl.
- Browser
- Download file 7.84 kB
-
https://huggingface.co/datasets/paperswithbacktest/Options-Yearly-TransactionCostParams/resolve/main/README.md
- Command line
-
hf download hf://datasets/paperswithbacktest/Options-Yearly-TransactionCostParams/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/paperswithbacktest/Options-Yearly-TransactionCostParams/resolve/main/README.md
pretty_name: Options Yearly Transaction Cost Params
language:
- en
license: other
task_categories:
- tabular-regression
tags:
- finance
- quantitative-trading
- backtesting
- options
- derivatives
- transaction-costs
- bid-ask-spread
- market-microstructure
size_categories:
- n<1K
extra_gated_prompt: >-
This dataset is free to browse and gated for download. Approval is tied to a
Papers With Backtest subscription, which also covers the other datasets of the
organisation: https://paperswithbacktest.com/pricing
dataset_info:
features:
- name: symbol
dtype: string
- name: tier
dtype: int64
- name: year
dtype: int64
- name: moneyness
dtype: string
- name: price_min
dtype: float64
- name: price_max
dtype: float64
- name: half_spread
dtype: float64
- name: n_quotes
dtype: int64
- name: n_underlyings
dtype: int64
- name: method
dtype: string
- name: volume_min
dtype: float64
- name: volume_max
dtype: float64
- name: underlying_volume
dtype: float64
- name: period_start
dtype: string
- name: period_end
dtype: string
- name: n_sessions
dtype: int64
splits:
- name: train
num_examples: 880
Options Yearly Transaction Cost Params
The parameters of the cost model a backtest charges on a listed US option: half the quoted bid-ask spread, in dollars, by option price, distance to the money and liquidity of the underlying, with a row of its own for each of the 50 underlyings with the largest option volume. The options counterpart of Stocks-Yearly-TransactionCostParams and Forex-Yearly-TransactionCostParams.
880 rows, 16 columns: 5 liquidity tiers and 50 underlyings, each a grid of 2 moneyness bands by 8 price bands, measured in 2026 on 4.4 million quotes of 5,416 underlyings.
Why It Matters
Options-Daily-Price holds trades, not quotes, so a backtest fills at the last trade and must add the spread itself. On options that spread is not a rounding error: the median half spread is 2.6 % of the option's price for the ten most traded underlyings, 5.3 % for the next 80, 9.3 % for the next 470, 13 % below them and 24 % for underlyings trading under a thousand contracts a day. A strategy that pays nothing for it, or a flat fee, is measuring something else.
Load It
pip install --upgrade pwb-toolbox
from pwb_toolbox import datasets as pwb_ds
params = pwb_ds.load_dataset("Options-Yearly-TransactionCostParams")
spy = params[params["symbol"] == "SPY"]
From pwb-toolbox 0.1.47, pwb_toolbox.backtesting.options_half_spread(price, otm, tier=..., underlying=..., year=...) reads this table and returns the dollar half spread of one contract, with the fallbacks below.
Columns
| Column Name | Description |
|---|---|
| symbol | Underlying ticker for an underlying's own row (SPY, AAPL); tier_0 to tier_4 for a liquidity-tier row. |
| tier | Liquidity tier, 0 to 4, by mean daily option volume of the underlying: <1k, 1k-10k, 10k-100k, 100k-1M, >1M contracts. On an underlying's row, the tier it sat in over the measurement window. |
| year | Calendar year of the measurement. |
| moneyness | near: strike within 10 % of the spot (K/S for a call, S/K for a put, between 0.9 and 1.1). far: beyond. |
| price_min, price_max | Option price band, in dollars per share: 0, 0.10, 0.50, 1, 2, 5, 10, 25, and no upper bound (price_max null) for the last. |
| half_spread | Median of (ask - bid) / 2 over the cell, in dollars per share, to $0.001. Multiply by the contract multiplier (100) for the cost of one contract, on each side. |
| n_quotes | Quotes in the cell. On a tier_fallback row, the underlying's own count, under 20. |
| n_underlyings | Underlyings contributing to the cell (1 on an underlying's row). |
| method | measured, or tier_fallback when the underlying had fewer than 20 quotes in that cell: the row then carries its tier's value. |
| volume_min, volume_max | Bounds of the tier, in contracts a day (volume_max null for the top tier). |
| underlying_volume | On an underlying's row, its mean daily option volume over the window; null on a tier row. |
| period_start, period_end | First and last snapshot of the measurement window. |
| n_sessions | Snapshots in the window. |
How It Was Measured
End-of-day snapshots of the whole US listed chain: the last quote of each contract before the close (15:59 ET for equity options, 16:14 for the ETFs that close late). Two-sided quotes only, and only contracts that traded that session, the ones a backtest on daily bars can actually fill. Each quote is placed in a price band by its mid, in a moneyness band by its strike against the underlying's price, and in a tier by its underlying's mean daily option volume over the window; the half spread of a cell is the median over its quotes.
The 50 underlyings with the largest option volume get a grid of their own, measured on their quotes alone. Their rows are not always tighter than their tier (Apple near the money at $1-2: 0.105 against 0.03 for the top tier); they are more accurate, not more lenient.
How to Read a Contract's Cost
- Use the underlying's own row if it has one, else its tier from its trailing option volume (21 sessions is what the published strategies use).
- Pick
nearorfar, then the price band holding the option's price. - Never charge more than the price itself: a $0.05 option cannot cost $0.05 on top of its price to sell.
- A year without a measurement takes the nearest measured year, and the cost should be labelled as extrapolated. Today only 2026 is measured, so every earlier year falls back to it.
pwb-toolbox applies these four rules, and maps FB to META's row (the options table names an underlying as it was named at the time).
Caveats
- One window, applied to every year. The 2026 level is the only measurement so far. Option spreads were wider in 2014-2016, so the cost of the early years is understated; the tier, which follows the underlying's volume at the time, absorbs part of it. Years measured later are added as rows of their own and take precedence over the fallback.
- Quoted, not effective. A patient order inside the spread pays less than half the quoted spread; this is the cost of crossing it, the conservative side.
- Five snapshots. It measures the level of a cell, not its day-to-day variation, and the close of a quiet week rather than a stressed market.
- No SPX, RUT, XSP or VIX quotes in the snapshots: those options are priced by their tier. NDX is measured, and wide at 16:15.
- Contracts that did not trade are left out, so a far, deep or long-dated contract is measured only on the days it traded.
Access
Browsing the card and the schema is open to anyone. Downloading the files needs an approved request, tied to a subscription: what each plan includes. The same approval covers every dataset of the organisation.
Elsewhere
- Options-Daily-Price, the contracts these costs apply to
- The strategy catalogue
pwb-toolbox, the loader and the backtest harness- Every dataset in this organisation