tickerforge-spec-data 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ from importlib.resources import files
2
+ from importlib.metadata import version as metadata_version
3
+ from pathlib import Path
4
+
5
+
6
+ def get_spec_root() -> Path:
7
+ """Directory containing canonical spec (exchanges/, contracts/, schemas/, tests/, ...)."""
8
+ here = Path(__file__).resolve().parent
9
+ bundled = here / "spec"
10
+ if bundled.is_dir() and (bundled / "schemas").is_dir():
11
+ return bundled
12
+ repo = here.parent / "spec"
13
+ if repo.is_dir() and (repo / "schemas").is_dir():
14
+ return repo
15
+ raise RuntimeError(
16
+ "tickerforge_spec_data: spec tree not found (expected vendored spec/ or repo-root spec/)."
17
+ )
18
+
19
+
20
+ def get_version() -> str:
21
+ return metadata_version("tickerforge-spec-data")
File without changes
@@ -0,0 +1,101 @@
1
+ contracts:
2
+ # ---- Index Futures ----
3
+ - symbol: WIN
4
+ exchange: B3
5
+ description: Mini Ibovespa Futures
6
+ ticker_format: "{symbol}{month_code}{yy}"
7
+ contract_cycle: bimonthly_even
8
+ expiration_rule: nearest_wednesday_15
9
+ contract_multiplier: 0.20
10
+ tick_size: 5
11
+ currency: BRL
12
+ aliases:
13
+ - "mini índice"
14
+ - "mini index"
15
+ - symbol: IND
16
+ exchange: B3
17
+ description: Ibovespa Futures
18
+ ticker_format: "{symbol}{month_code}{yy}"
19
+ contract_cycle: bimonthly_even
20
+ expiration_rule: nearest_wednesday_15
21
+ contract_multiplier: 1.00
22
+ tick_size: 5
23
+ currency: BRL
24
+ aliases:
25
+ - "índice cheio"
26
+ - "ibovespa futures"
27
+ # ---- Currency Futures ----
28
+ - symbol: DOL
29
+ exchange: B3
30
+ description: U.S. Dollar Futures
31
+ ticker_format: "{symbol}{month_code}{yy}"
32
+ contract_cycle: monthly
33
+ expiration_rule: first_business_day
34
+ contract_multiplier: 50.00
35
+ tick_size: 0.50
36
+ currency: BRL
37
+ aliases:
38
+ - "dólar cheio"
39
+ - "dollar futures"
40
+ - symbol: WDO
41
+ exchange: B3
42
+ description: Mini U.S. Dollar Futures
43
+ ticker_format: "{symbol}{month_code}{yy}"
44
+ contract_cycle: monthly
45
+ expiration_rule: first_business_day
46
+ contract_multiplier: 10.00
47
+ tick_size: 0.50
48
+ currency: BRL
49
+ aliases:
50
+ - "mini dólar"
51
+ - "mini dollar"
52
+ # ---- Interest Rate Futures ----
53
+ - symbol: DI1
54
+ exchange: B3
55
+ description: One-Day Interbank Deposit Rate Futures
56
+ ticker_format: "{symbol}{month_code}{yy}"
57
+ contract_cycle: monthly
58
+ expiration_rule: first_business_day
59
+ contract_multiplier: 1.00
60
+ tick_size: 0.01
61
+ currency: BRL
62
+ aliases:
63
+ - "DI futuro"
64
+ - "interest rate futures"
65
+ # ---- Commodity Futures ----
66
+ - symbol: BGI
67
+ exchange: B3
68
+ description: Live Cattle Futures
69
+ ticker_format: "{symbol}{month_code}{yy}"
70
+ contract_cycle: monthly
71
+ expiration_rule: last_business_day
72
+ contract_multiplier: 330.00
73
+ tick_size: 0.05
74
+ currency: BRL
75
+ aliases:
76
+ - "boi gordo"
77
+ - "live cattle"
78
+ - symbol: CCM
79
+ exchange: B3
80
+ description: Cash-Settled Corn Futures
81
+ ticker_format: "{symbol}{month_code}{yy}"
82
+ contract_cycle: b3_corn
83
+ expiration_rule: fixed_day_15
84
+ contract_multiplier: 450.00
85
+ tick_size: 0.01
86
+ currency: BRL
87
+ aliases:
88
+ - "milho"
89
+ - "corn futures"
90
+ - symbol: ICF
91
+ exchange: B3
92
+ description: Arabica Coffee Futures (4/5)
93
+ ticker_format: "{symbol}{month_code}{yy}"
94
+ contract_cycle: b3_coffee
95
+ expiration_rule: schedule
96
+ contract_multiplier: 100.00
97
+ tick_size: 0.05
98
+ currency: USD
99
+ aliases:
100
+ - "café arábica"
101
+ - "arabica coffee"
@@ -0,0 +1,107 @@
1
+ options:
2
+ # ---- Equity Options ----
3
+ - type: equity
4
+ exchange: B3
5
+ description: Options on listed equities
6
+ option_style: american
7
+ ticker_format: "{root}{month_code}{strike}"
8
+ contract_multiplier: 1.00
9
+ tick_size: 0.01
10
+ currency: BRL
11
+ aliases:
12
+ - "opções de ações"
13
+ - "equity options"
14
+ call_month_codes:
15
+ - A # January
16
+ - B # February
17
+ - C # March
18
+ - D # April
19
+ - E # May
20
+ - F # June
21
+ - G # July
22
+ - H # August
23
+ - I # September
24
+ - J # October
25
+ - K # November
26
+ - L # December
27
+ put_month_codes:
28
+ - M # January
29
+ - N # February
30
+ - O # March
31
+ - P # April
32
+ - Q # May
33
+ - R # June
34
+ - S # July
35
+ - T # August
36
+ - U # September
37
+ - V # October
38
+ - W # November
39
+ - X # December
40
+ contract_cycle: monthly
41
+ expiration_rule: third_friday
42
+ underlyings:
43
+ - PETR4
44
+ - VALE3
45
+ - BBDC4
46
+ - ITUB4
47
+ - ABEV3
48
+ - B3SA3
49
+ - GGBR4
50
+ - HAPV3
51
+ - MGLU3
52
+ - SUZB3
53
+ - BOVA11
54
+ # ---- Index Options (Ibovespa) ----
55
+ - type: index
56
+ symbol: IBOV
57
+ exchange: B3
58
+ description: Options on Ibovespa Index
59
+ option_style: european
60
+ ticker_format: "{symbol}{month_code}{yy}{option_type}{strike}"
61
+ contract_multiplier: 1.00
62
+ tick_size: 5
63
+ currency: BRL
64
+ aliases:
65
+ - "opções de Ibovespa"
66
+ - "index options"
67
+ option_type_codes:
68
+ call: C
69
+ put: P
70
+ contract_cycle: monthly
71
+ expiration_rule: nearest_wednesday_15
72
+ # ---- Dollar Options ----
73
+ - type: dollar
74
+ symbol: DOL
75
+ exchange: B3
76
+ description: Options on U.S. Dollar
77
+ option_style: european
78
+ ticker_format: "{symbol}{month_code}{yy}{option_type}{strike}"
79
+ contract_multiplier: 50.00
80
+ tick_size: 0.50
81
+ currency: BRL
82
+ aliases:
83
+ - "opções de dólar"
84
+ - "dollar options"
85
+ option_type_codes:
86
+ call: C
87
+ put: P
88
+ contract_cycle: monthly
89
+ expiration_rule: first_business_day
90
+ # ---- Interest Rate Options (IDI) ----
91
+ - type: interest_rate
92
+ symbol: IDI
93
+ exchange: B3
94
+ description: Options on IDI (Interbank Deposit Index)
95
+ option_style: european
96
+ ticker_format: "{symbol}{month_code}{yy}{option_type}{strike}"
97
+ contract_multiplier: 1.00
98
+ tick_size: 0.01
99
+ currency: BRL
100
+ aliases:
101
+ - "opções de IDI"
102
+ - "rate options"
103
+ option_type_codes:
104
+ call: C
105
+ put: P
106
+ contract_cycle: monthly
107
+ expiration_rule: first_business_day
@@ -0,0 +1,113 @@
1
+ contracts:
2
+ # ---- Index Futures ----
3
+ - symbol: ES
4
+ exchange: CME
5
+ description: E-mini S&P 500 Futures
6
+ ticker_format: "{symbol}{month_code}{yy}"
7
+ contract_cycle: quarterly
8
+ expiration_rule: third_friday
9
+ contract_multiplier: 50.00
10
+ tick_size: 0.25
11
+ currency: USD
12
+ aliases:
13
+ - "e-mini s&p"
14
+ - "s&p 500 futures"
15
+ - symbol: NQ
16
+ exchange: CME
17
+ description: E-mini Nasdaq-100 Futures
18
+ ticker_format: "{symbol}{month_code}{yy}"
19
+ contract_cycle: quarterly
20
+ expiration_rule: third_friday
21
+ contract_multiplier: 20.00
22
+ tick_size: 0.25
23
+ currency: USD
24
+ aliases:
25
+ - "e-mini nasdaq"
26
+ - "nasdaq 100 futures"
27
+ - symbol: RTY
28
+ exchange: CME
29
+ description: E-mini Russell 2000 Futures
30
+ ticker_format: "{symbol}{month_code}{yy}"
31
+ contract_cycle: quarterly
32
+ expiration_rule: third_friday
33
+ contract_multiplier: 50.00
34
+ tick_size: 0.10
35
+ currency: USD
36
+ aliases:
37
+ - "e-mini russell"
38
+ - "russell 2000 futures"
39
+ # ---- Interest Rate Futures ----
40
+ - symbol: ZN
41
+ exchange: CME
42
+ description: 10-Year Treasury Note Futures
43
+ ticker_format: "{symbol}{month_code}{yy}"
44
+ contract_cycle: quarterly
45
+ expiration_rule: schedule
46
+ contract_multiplier: 1000.00
47
+ tick_size: 0.015625
48
+ currency: USD
49
+ aliases:
50
+ - "10-year t-note"
51
+ - "ten year treasury"
52
+ - symbol: ZF
53
+ exchange: CME
54
+ description: 5-Year Treasury Note Futures
55
+ ticker_format: "{symbol}{month_code}{yy}"
56
+ contract_cycle: quarterly
57
+ expiration_rule: schedule
58
+ contract_multiplier: 1000.00
59
+ tick_size: 0.0078125
60
+ currency: USD
61
+ aliases:
62
+ - "5-year t-note"
63
+ - "five year treasury"
64
+ # ---- Commodity Futures ----
65
+ - symbol: CL
66
+ exchange: CME
67
+ description: Crude Oil Futures (WTI)
68
+ ticker_format: "{symbol}{month_code}{yy}"
69
+ contract_cycle: monthly
70
+ expiration_rule: schedule
71
+ contract_multiplier: 1000.00
72
+ tick_size: 0.01
73
+ currency: USD
74
+ aliases:
75
+ - "crude oil"
76
+ - "wti"
77
+ - symbol: GC
78
+ exchange: CME
79
+ description: Gold Futures
80
+ ticker_format: "{symbol}{month_code}{yy}"
81
+ contract_cycle: bimonthly_even
82
+ expiration_rule: schedule
83
+ contract_multiplier: 100.00
84
+ tick_size: 0.10
85
+ currency: USD
86
+ aliases:
87
+ - "gold"
88
+ - "comex gold"
89
+ # ---- Currency Futures ----
90
+ - symbol: 6E
91
+ exchange: CME
92
+ description: Euro FX Futures
93
+ ticker_format: "{symbol}{month_code}{yy}"
94
+ contract_cycle: quarterly
95
+ expiration_rule: schedule
96
+ contract_multiplier: 125000.00
97
+ tick_size: 0.00005
98
+ currency: USD
99
+ aliases:
100
+ - "euro fx"
101
+ - "eur/usd futures"
102
+ - symbol: 6J
103
+ exchange: CME
104
+ description: Japanese Yen Futures
105
+ ticker_format: "{symbol}{month_code}{yy}"
106
+ contract_cycle: quarterly
107
+ expiration_rule: schedule
108
+ contract_multiplier: 12500000.00
109
+ tick_size: 0.0000005
110
+ currency: USD
111
+ aliases:
112
+ - "japanese yen"
113
+ - "jpy futures"
@@ -0,0 +1,110 @@
1
+ exchange: B3
2
+ mic: XBVM
3
+ full_name: Brasil, Bolsa, Balcão
4
+ country: BR
5
+ timezone: America/Sao_Paulo
6
+ assets:
7
+ # --- Index Futures ---
8
+ WIN:
9
+ type: future
10
+ category: index
11
+ description: Mini Ibovespa Futures
12
+ sessions:
13
+ regular:
14
+ start: "09:00"
15
+ end: "18:25"
16
+ IND:
17
+ type: future
18
+ category: index
19
+ description: Ibovespa Futures
20
+ sessions:
21
+ regular:
22
+ start: "09:00"
23
+ end: "18:25"
24
+ # --- Currency Futures ---
25
+ DOL:
26
+ type: future
27
+ category: currency
28
+ description: U.S. Dollar Futures
29
+ sessions:
30
+ regular:
31
+ start: "09:00"
32
+ end: "18:30"
33
+ WDO:
34
+ type: future
35
+ category: currency
36
+ description: Mini U.S. Dollar Futures
37
+ sessions:
38
+ regular:
39
+ start: "09:00"
40
+ end: "18:30"
41
+ # --- Interest Rate Futures ---
42
+ DI1:
43
+ type: future
44
+ category: interest_rate
45
+ description: One-Day Interbank Deposit Rate Futures
46
+ sessions:
47
+ regular:
48
+ start: "09:00"
49
+ end: "18:15"
50
+ # --- Commodity Futures ---
51
+ BGI:
52
+ type: future
53
+ category: commodity
54
+ description: Live Cattle Futures
55
+ sessions:
56
+ regular:
57
+ start: "09:00"
58
+ end: "16:30"
59
+ CCM:
60
+ type: future
61
+ category: commodity
62
+ description: Cash-Settled Corn Futures
63
+ sessions:
64
+ regular:
65
+ start: "09:00"
66
+ end: "16:20"
67
+ ICF:
68
+ type: future
69
+ category: commodity
70
+ description: Arabica Coffee Futures (4/5)
71
+ sessions:
72
+ regular:
73
+ start: "09:00"
74
+ end: "16:20"
75
+ # --- Equity Options ---
76
+ EQUITY_OPTIONS:
77
+ type: option
78
+ category: equity_option
79
+ description: Options on listed equities (PETR4, VALE3, BBDC4, ITUB4, etc.)
80
+ sessions:
81
+ regular:
82
+ start: "10:00"
83
+ end: "18:25"
84
+ # --- Index Options ---
85
+ IBOV_OPTIONS:
86
+ type: option
87
+ category: index_option
88
+ description: Options on Ibovespa Index
89
+ sessions:
90
+ regular:
91
+ start: "09:00"
92
+ end: "18:25"
93
+ # --- Dollar Options ---
94
+ DOL_OPTIONS:
95
+ type: option
96
+ category: dollar_option
97
+ description: Options on U.S. Dollar
98
+ sessions:
99
+ regular:
100
+ start: "09:00"
101
+ end: "18:30"
102
+ # --- Interest Rate Options ---
103
+ IDI_OPTIONS:
104
+ type: option
105
+ category: rate_option
106
+ description: Options on IDI (Interbank Deposit Index)
107
+ sessions:
108
+ regular:
109
+ start: "09:00"
110
+ end: "18:15"
@@ -0,0 +1,82 @@
1
+ exchange: CME
2
+ mic: XCME
3
+ full_name: Chicago Mercantile Exchange
4
+ country: US
5
+ timezone: America/Chicago
6
+ assets:
7
+ # --- Index Futures ---
8
+ ES:
9
+ type: future
10
+ category: index
11
+ description: E-mini S&P 500 Futures
12
+ sessions:
13
+ regular:
14
+ start: "17:00"
15
+ end: "16:00"
16
+ NQ:
17
+ type: future
18
+ category: index
19
+ description: E-mini Nasdaq-100 Futures
20
+ sessions:
21
+ regular:
22
+ start: "17:00"
23
+ end: "16:00"
24
+ RTY:
25
+ type: future
26
+ category: index
27
+ description: E-mini Russell 2000 Futures
28
+ sessions:
29
+ regular:
30
+ start: "17:00"
31
+ end: "16:00"
32
+ # --- Interest Rate Futures ---
33
+ ZN:
34
+ type: future
35
+ category: interest_rate
36
+ description: 10-Year Treasury Note Futures
37
+ sessions:
38
+ regular:
39
+ start: "17:00"
40
+ end: "16:00"
41
+ ZF:
42
+ type: future
43
+ category: interest_rate
44
+ description: 5-Year Treasury Note Futures
45
+ sessions:
46
+ regular:
47
+ start: "17:00"
48
+ end: "16:00"
49
+ # --- Commodity Futures ---
50
+ CL:
51
+ type: future
52
+ category: commodity
53
+ description: Crude Oil Futures (WTI)
54
+ sessions:
55
+ regular:
56
+ start: "17:00"
57
+ end: "16:00"
58
+ GC:
59
+ type: future
60
+ category: commodity
61
+ description: Gold Futures
62
+ sessions:
63
+ regular:
64
+ start: "17:00"
65
+ end: "16:00"
66
+ # --- Currency Futures ---
67
+ 6E:
68
+ type: future
69
+ category: currency
70
+ description: Euro FX Futures
71
+ sessions:
72
+ regular:
73
+ start: "17:00"
74
+ end: "16:00"
75
+ 6J:
76
+ type: future
77
+ category: currency
78
+ description: Japanese Yen Futures
79
+ sessions:
80
+ regular:
81
+ start: "17:00"
82
+ end: "16:00"
@@ -0,0 +1,25 @@
1
+ exchange: B3
2
+ timezone: America/Sao_Paulo
3
+ holidays:
4
+ fixed:
5
+ - {month: 1, day: 1, name: "Confraternização Universal"}
6
+ - {month: 4, day: 21, name: "Tiradentes"}
7
+ - {month: 5, day: 1, name: "Dia do Trabalho"}
8
+ - {month: 9, day: 7, name: "Independência do Brasil"}
9
+ - {month: 10, day: 12, name: "Nossa Senhora Aparecida"}
10
+ - {month: 11, day: 2, name: "Finados"}
11
+ - {month: 11, day: 15, name: "Proclamação da República"}
12
+ - {month: 11, day: 20, name: "Consciência Negra", from_year: 2024}
13
+ - {month: 12, day: 24, name: "Véspera de Natal"}
14
+ - {month: 12, day: 25, name: "Natal"}
15
+ - {month: 12, day: 31, name: "Véspera de Ano Novo"}
16
+ easter_offset:
17
+ - {offset: -48, name: "Carnaval (segunda-feira)"}
18
+ - {offset: -47, name: "Carnaval (terça-feira)"}
19
+ - {offset: -2, name: "Sexta-feira Santa"}
20
+ - {offset: 60, name: "Corpus Christi"}
21
+ overrides:
22
+ - {date: "2023-11-20", action: add, name: "Consciência Negra"}
23
+ early_closes:
24
+ easter_offset:
25
+ - {offset: -46, name: "Quarta-feira de Cinzas", open: "13:00"}
@@ -0,0 +1,16 @@
1
+ exchange: CME
2
+ timezone: America/Chicago
3
+ holidays:
4
+ fixed:
5
+ - {month: 1, day: 1, name: "New Year's Day"}
6
+ - {month: 7, day: 4, name: "Independence Day"}
7
+ - {month: 12, day: 25, name: "Christmas Day"}
8
+ nth_weekday:
9
+ - {month: 1, weekday: monday, nth: 3, name: "Martin Luther King Jr. Day"}
10
+ - {month: 2, weekday: monday, nth: 3, name: "Presidents' Day"}
11
+ - {month: 9, weekday: monday, nth: 1, name: "Labor Day"}
12
+ - {month: 11, weekday: thursday, nth: 4, name: "Thanksgiving Day"}
13
+ last_weekday:
14
+ - {month: 5, weekday: monday, name: "Memorial Day"}
15
+ easter_offset:
16
+ - {offset: -2, name: "Good Friday"}
@@ -0,0 +1,84 @@
1
+ month_codes:
2
+ F:
3
+ month: 1
4
+ name: January
5
+ G:
6
+ month: 2
7
+ name: February
8
+ H:
9
+ month: 3
10
+ name: March
11
+ J:
12
+ month: 4
13
+ name: April
14
+ K:
15
+ month: 5
16
+ name: May
17
+ M:
18
+ month: 6
19
+ name: June
20
+ N:
21
+ month: 7
22
+ name: July
23
+ Q:
24
+ month: 8
25
+ name: August
26
+ U:
27
+ month: 9
28
+ name: September
29
+ V:
30
+ month: 10
31
+ name: October
32
+ X:
33
+ month: 11
34
+ name: November
35
+ Z:
36
+ month: 12
37
+ name: December
38
+ contract_cycles:
39
+ monthly:
40
+ description: Every calendar month
41
+ months: [F, G, H, J, K, M, N, Q, U, V, X, Z]
42
+ quarterly:
43
+ description: Standard quarterly futures cycle
44
+ months: [H, M, U, Z]
45
+ b3_corn:
46
+ description: B3 corn futures cycle (Jan, Mar, May, Jul, Aug, Sep, Nov)
47
+ months: [F, H, K, N, Q, U, X]
48
+ b3_coffee:
49
+ description: B3 arabica coffee futures cycle (Mar, May, Jul, Sep, Dec)
50
+ months: [H, K, N, U, Z]
51
+ bimonthly_even:
52
+ description: Even-month cycle (Feb, Apr, Jun, Aug, Oct, Dec)
53
+ months: [G, J, M, Q, V, Z]
54
+ expiration_rules:
55
+ nearest_wednesday_15:
56
+ description: Wednesday closest to the 15th
57
+ type: nearest_weekday_to_day
58
+ weekday: wednesday
59
+ day: 15
60
+ first_business_day:
61
+ description: First trading day of the month
62
+ type: first_business_day
63
+ third_friday:
64
+ description: Third Friday of the month (common in US options)
65
+ type: nth_weekday_of_month
66
+ weekday: friday
67
+ n: 3
68
+ tags:
69
+ - options
70
+ - US
71
+ last_business_day:
72
+ description: Last trading day of the month
73
+ type: last_business_day
74
+ fifth_business_day:
75
+ description: Fifth trading day of the month
76
+ type: nth_business_day
77
+ n: 5
78
+ fixed_day_15:
79
+ description: 15th calendar day of the month (next business day if holiday)
80
+ type: fixed_day
81
+ day: 15
82
+ schedule:
83
+ description: Dates vary per contract month; consult exchange maturity calendar
84
+ type: schedule