File size: 3,616 Bytes
09b95d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
de4c6f8
 
 
 
 
09b95d3
 
 
 
 
de4c6f8
 
81f4652
 
 
 
 
 
 
 
 
 
09b95d3
81f4652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: text
    dtype: string
  - name: entities
    struct:
    - name: start
      list: int32
    - name: end
      list: int32
    - name: label
      list: string
  splits:
  - name: train
    num_bytes: 543338
    num_examples: 1287
  - name: test
    num_bytes: 90559
    num_examples: 227
  download_size: 213009
  dataset_size: 633897
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
language:
- en
license: mit
task_categories:
- token-classification
tags:
- finance
- options
- twitter
- ner
---

# options-ner

Tweets about stock options (trade alerts, unusual options flow, commentary)
with the option-contract details marked as character spans: ticker, strike,
option type, expiry, premium and price. This is the training and evaluation
data for the [options-recognizer models](https://huggingface.co/StephanAkkerman/options-recognizer-gliner2-large);
code and pipeline are in
[StephanAkkerman/options-recognizer-model](https://github.com/StephanAkkerman/options-recognizer-model).

## Splits

| split | tweets | entities |
|---|---|---|
| train | 1287 | 15346 |
| test | 227 | 2526 |

`test` is the held-out set every model was benchmarked on and is never
trained on. Use it to compare against the published models.

## Fields

| field | description |
|---|---|
| `id` | Task id |
| `text` | Tweet text, cleaned (links and quote headers removed) |
| `entities` | `start` / `end` character offsets into `text` (end exclusive) and a `label` |

```python
from datasets import load_dataset

ds = load_dataset("StephanAkkerman/options-ner")
row = ds["train"][0]
for s, e, label in zip(row["entities"]["start"], row["entities"]["end"], row["entities"]["label"]):
    print(label, row["text"][s:e])
```

## Labels

| label | entities | definition |
|---|---|---|
| `ticker` | 4316 | The stock or ETF symbol an option contract is written on, usually 1-5 letters and often preceded by a dollar sign (e.g., $AAPL, SPY, $T). MUST NOT be a company name, an @handle, or slang (YOLO, NFA, OTM, ITM). |
| `strike` | 2830 | The strike price of an option contract, e.g. 350, 162.5, or $1300 in '$1300 calls'. MUST NOT be the stock's current price, a premium or per-contract price, a date, or a percentage. |
| `option_type` | 3303 | Whether the contract is a call or a put, in any written form: C, P, call, calls, put, puts, c, p. Only the call/put word itself, not words like buyer or seller. |
| `expiry` | 2719 | The expiration date of an option contract: 10/16, 11/06/2026, 6/17/27, November 20, 2026, December, or relative like '2 days'. MUST NOT be the date a report was posted (e.g. the 10/2 in '10/2 Notable Flow'). |
| `premium` | 2534 | The total dollar size of the trade, e.g. $1.2M, $993K, 23 million. MUST NOT be a strike, the per-contract price, or the stock price. |
| `price` | 2170 | The per-contract price or average fill, e.g. .15 in '@ .15' or 4.37 in '4.37avg'. Only the number. MUST NOT be a strike, premium, or the underlying's stock price. |

## How it was made

Tweets were scraped from X/Twitter, cleaned, pre-labeled with an LLM and then
reviewed and corrected by hand in Label Studio. Annotations whose label is
unknown or whose span falls outside the text were dropped.

## Limitations

English, informal, tweet-length text from options-focused accounts, so
alert formats from specific accounts may be over-represented. The tweets are
public posts, but the text remains the work of its authors; author handles are
not included. Not financial advice.