openbb-akshare 0.3.5__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.
- openbb_akshare/__init__.py +28 -0
- openbb_akshare/models/__init__.py +1 -0
- openbb_akshare/models/available_indices.py +72 -0
- openbb_akshare/models/company_news.py +100 -0
- openbb_akshare/models/equity_historical.py +118 -0
- openbb_akshare/models/equity_quote.py +153 -0
- openbb_akshare/models/historical_dividends.py +109 -0
- openbb_akshare/openbb.py +43 -0
- openbb_akshare/router.py +48 -0
- openbb_akshare/utils/__init__.py +1 -0
- openbb_akshare/utils/futures.csv +189 -0
- openbb_akshare/utils/helpers.py +206 -0
- openbb_akshare/utils/references.py +1387 -0
- openbb_akshare/utils/tools.py +142 -0
- openbb_akshare-0.3.5.dist-info/METADATA +148 -0
- openbb_akshare-0.3.5.dist-info/RECORD +18 -0
- openbb_akshare-0.3.5.dist-info/WHEEL +4 -0
- openbb_akshare-0.3.5.dist-info/entry_points.txt +6 -0
@@ -0,0 +1,1387 @@
|
|
1
|
+
"""AKShare References."""
|
2
|
+
|
3
|
+
# pylint: disable=too-many-lines
|
4
|
+
|
5
|
+
from datetime import datetime
|
6
|
+
from typing import Literal, Optional
|
7
|
+
|
8
|
+
from openbb_core.provider.standard_models.equity_performance import (
|
9
|
+
EquityPerformanceData,
|
10
|
+
)
|
11
|
+
from pydantic import Field, field_validator
|
12
|
+
|
13
|
+
INTERVALS = Literal[
|
14
|
+
"1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1W", "1M", "1Q"
|
15
|
+
]
|
16
|
+
|
17
|
+
INTERVALS_DICT = {
|
18
|
+
"1m": "1m",
|
19
|
+
"2m": "2m",
|
20
|
+
"5m": "5m",
|
21
|
+
"15m": "15m",
|
22
|
+
"30m": "30m",
|
23
|
+
"60m": "60m",
|
24
|
+
"90m": "90m",
|
25
|
+
"1h": "1h",
|
26
|
+
"1d": "1d",
|
27
|
+
"5d": "5d",
|
28
|
+
"1W": "1wk",
|
29
|
+
"1M": "1mo",
|
30
|
+
"1Q": "3mo",
|
31
|
+
}
|
32
|
+
|
33
|
+
PERIODS = Literal[
|
34
|
+
"1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max"
|
35
|
+
]
|
36
|
+
|
37
|
+
MONTHS = {
|
38
|
+
1: "F",
|
39
|
+
2: "G",
|
40
|
+
3: "H",
|
41
|
+
4: "J",
|
42
|
+
5: "K",
|
43
|
+
6: "M",
|
44
|
+
7: "N",
|
45
|
+
8: "Q",
|
46
|
+
9: "U",
|
47
|
+
10: "V",
|
48
|
+
11: "X",
|
49
|
+
12: "Z",
|
50
|
+
}
|
51
|
+
|
52
|
+
INDICES = {
|
53
|
+
"sp500": {"name": "S&P 500 Index", "ticker": "^GSPC"},
|
54
|
+
"spx": {"name": "S&P 500 Index", "ticker": "^SPX"},
|
55
|
+
"sp400": {"name": "S&P 400 Mid Cap Index", "ticker": "^SP400"},
|
56
|
+
"sp600": {"name": "S&P 600 Small Cap Index", "ticker": "^SP600"},
|
57
|
+
"sp500tr": {"name": "S&P 500 TR Index", "ticker": "^SP500TR"},
|
58
|
+
"sp_xsp": {"name": "S&P 500 Mini SPX Options Index", "ticker": "^XSP"},
|
59
|
+
"nyse_ny": {"name": "NYSE US 100 Index", "ticker": "^NY"},
|
60
|
+
"dow_djus": {"name": "Dow Jones US Index", "ticker": "^DJUS"},
|
61
|
+
"nyse": {"name": "NYSE Composite Index", "ticker": "^NYA"},
|
62
|
+
"amex": {"name": "NYSE-AMEX Composite Index", "ticker": "^XAX"},
|
63
|
+
"nasdaq": {"name": "Nasdaq Composite Index", "ticker": "^IXIC"},
|
64
|
+
"nasdaq100": {"name": "NASDAQ 100", "ticker": "^NDX"},
|
65
|
+
"nasdaq100_ew": {"name": "NASDAQ 100 Equal Weighted Index", "ticker": "^NDXE"},
|
66
|
+
"nasdaq50": {"name": "NASDAQ Q50 Index", "ticker": "^NXTQ"},
|
67
|
+
"russell1000": {"name": "Russell 1000 Index", "ticker": "^RUI"},
|
68
|
+
"russell2000": {"name": "Russell 2000 Index", "ticker": "^RUT"},
|
69
|
+
"cboe_bxr": {"name": "CBOE Russell 2000 Buy-Write Index", "ticker": "^BXR"},
|
70
|
+
"cboe_bxrt": {
|
71
|
+
"name": "CBOE Russell 2000 30-Delta Buy-Write Index",
|
72
|
+
"ticker": "^BXRT",
|
73
|
+
},
|
74
|
+
"russell3000": {"name": "Russell 3000 Index", "ticker": "^RUA"},
|
75
|
+
"russellvalue": {"name": "Russell 2000 Value Index", "ticker": "^RUJ"},
|
76
|
+
"russellgrowth": {"name": "Russell 2000 Growth Index", "ticker": "^RUO"},
|
77
|
+
"w5000": {"name": "Wilshire 5000", "ticker": "^W5000"},
|
78
|
+
"w5000flt": {"name": "Wilshire 5000 Float Adjusted Index", "ticker": "^W5000FLT"},
|
79
|
+
"dow_dja": {"name": "Dow Jones Composite Average Index", "ticker": "^DJA"},
|
80
|
+
"dow_dji": {"name": "Dow Jones Industrial Average Index", "ticker": "^DJI"},
|
81
|
+
"ca_tsx": {"name": "TSX Composite Index (CAD)", "ticker": "^GSPTSE"},
|
82
|
+
"ca_banks": {"name": "S&P/TSX Composite Banks Index (CAD)", "ticker": "TXBA.TS"},
|
83
|
+
"mx_ipc": {"name": "IPC Mexico Index (MXN)", "ticker": "^MXX"},
|
84
|
+
"arca_mxy": {"name": "NYSE ARCA Mexico Index (USD)", "ticker": "^MXY"},
|
85
|
+
"br_bvsp": {"name": "IBOVESPA Sao Paulo Brazil Index (BRL)", "ticker": "^BVSP"},
|
86
|
+
"br_ivbx": {"name": "IVBX2 Indice Valour (BRL)", "ticker": "^IVBX"},
|
87
|
+
"ar_mervel": {"name": "S&P MERVAL TR Index (USD)", "ticker": "M.BA"},
|
88
|
+
"eu_fteu1": {"name": "FTSE Eurotop 100 Index (EUR)", "ticker": "^FTEU1"},
|
89
|
+
"eu_speup": {"name": "S&P Europe 350 Index (EUR)", "ticker": "^SPEUP"},
|
90
|
+
"eu_n100": {"name": "Euronext 100 Index (EUR)", "ticker": "^N100"},
|
91
|
+
"ftse100": {"name": "FTSE Global 100 Index (GBP)", "ticker": "^FTSE"},
|
92
|
+
"ftse250": {"name": "FTSE Global 250 Index (GBP)", "ticker": "^FTMC"},
|
93
|
+
"ftse350": {"name": "FTSE Global 350 Index (GBP)", "ticker": "^FTLC"},
|
94
|
+
"ftai": {"name": "FTSE AIM All-Share Global Index (GBP)", "ticker": "^FTAI"},
|
95
|
+
"uk_ftas": {"name": "UK FTSE All-Share Index (GBP)", "ticker": "^FTAS"},
|
96
|
+
"uk_spuk": {"name": "S&P United Kingdom Index (PDS)", "ticker": "^SPUK"},
|
97
|
+
"uk_100": {"name": "CBOE UK 100 Index (GBP)", "ticker": "^BUK100P"},
|
98
|
+
"ie_iseq": {"name": "ISEQ Irish All Shares Index (EUR)", "ticker": "^ISEQ"},
|
99
|
+
"nl_aex": {"name": "Euronext Dutch 25 Index (EUR)", "ticker": "^AEX"},
|
100
|
+
"nl_amx": {"name": "Euronext Dutch Mid Cap Index (EUR)", "ticker": "^AMX"},
|
101
|
+
"at_atx": {"name": "Wiener Börse Austrian 20 Index (EUR)", "ticker": "^ATX"},
|
102
|
+
"at_atx5": {"name": "Vienna ATX Five Index (EUR)", "ticker": "^ATX5"},
|
103
|
+
"at_prime": {"name": "Vienna ATX Prime Index (EUR)", "ticker": "^ATXPRIME"},
|
104
|
+
"ch_stoxx": {"name": "Zurich STXE 600 PR Index (EUR)", "ticker": "^STOXX"},
|
105
|
+
"ch_stoxx50e": {"name": "Zurich ESTX 50 PR Index (EUR)", "ticker": "^STOXX50E"},
|
106
|
+
"se_omx30": {"name": "OMX Stockholm 30 Index (SEK)", "ticker": "^OMX"},
|
107
|
+
"se_omxspi": {"name": "OMX Stockholm All Share PI (SEK)", "ticker": "^OMXSPI"},
|
108
|
+
"se_benchmark": {"name": "OMX Stockholm Benchmark GI (SEK)", "ticker": "^OMXSBGI"},
|
109
|
+
"dk_benchmark": {"name": "OMX Copenhagen Benchmark GI (DKK)", "ticker": "^OMXCBGI"},
|
110
|
+
"dk_omxc25": {"name": "OMX Copenhagen 25 Index (DKK)", "ticker": "^OMXC25"},
|
111
|
+
"fi_omxh25": {"name": "OMX Helsinki 25 (EUR)", "ticker": "^OMXH25"},
|
112
|
+
"de_dax40": {"name": "DAX Performance Index (EUR)", "ticker": "^GDAXI"},
|
113
|
+
"de_mdax60": {"name": "DAX Mid Cap Performance Index (EUR)", "ticker": "^MDAXI"},
|
114
|
+
"de_sdax70": {"name": "DAX Small Cap Performance Index (EUR)", "ticker": "^SDAXI"},
|
115
|
+
"de_tecdax30": {"name": "DAX Tech Sector TR Index (EUR)", "ticker": "^TECDAX"},
|
116
|
+
"fr_cac40": {"name": "CAC 40 PR Index (EUR)", "ticker": "^FCHI"},
|
117
|
+
"fr_next20": {"name": "CAC Next 20 Index (EUR)", "ticker": "^CN20"},
|
118
|
+
"it_mib40": {"name": "FTSE MIB 40 Index (EUR)", "ticker": "FTSEMIB.MI"},
|
119
|
+
"be_bel20": {"name": "BEL 20 Brussels Index (EUR)", "ticker": "^BFX"},
|
120
|
+
"pt_bvlg": {
|
121
|
+
"name": "Lisbon PSI All-Share Index GR (EUR)",
|
122
|
+
"ticker": "^BVLG",
|
123
|
+
},
|
124
|
+
"es_ibex35": {"name": "IBEX 35 - Madrid CATS (EUR)", "ticker": "^IBEX"},
|
125
|
+
"in_bse": {"name": "S&P Bombay SENSEX (INR)", "ticker": "^BSESN"},
|
126
|
+
"in_bse500": {
|
127
|
+
"name": "S&P BSE 500 Index (INR)",
|
128
|
+
"ticker": "BSE-500.BO",
|
129
|
+
},
|
130
|
+
"in_bse200": {
|
131
|
+
"name": "S&P BSE 200 Index (INR)",
|
132
|
+
"ticker": "BSE-200.BO",
|
133
|
+
},
|
134
|
+
"in_bse100": {
|
135
|
+
"name": "S&P BSE 100 Index (INR)",
|
136
|
+
"ticker": "BSE-100.BO",
|
137
|
+
},
|
138
|
+
"in_bse_mcap": {
|
139
|
+
"name": "S&P Bombay Mid Cap Index (INR)",
|
140
|
+
"ticker": "BSE-MIDCAP.BO",
|
141
|
+
},
|
142
|
+
"in_bse_scap": {
|
143
|
+
"name": "S&P Bombay Small Cap Index (INR)",
|
144
|
+
"ticker": "BSE-SMLCAP.BO",
|
145
|
+
},
|
146
|
+
"in_nse50": {"name": "NSE Nifty 50 Index (INR)", "ticker": "^NSEI"},
|
147
|
+
"in_nse_mcap": {"name": "NSE Nifty 50 Mid Cap Index (INR)", "ticker": "^NSEMDCP50"},
|
148
|
+
"in_nse_bank": {
|
149
|
+
"name": "NSE Nifty Bank Industry Index (INR)",
|
150
|
+
"ticker": "^NSEBANK",
|
151
|
+
},
|
152
|
+
"in_nse500": {"name": "NSE Nifty 500 Index (INR)", "ticker": "^CRSLDX"},
|
153
|
+
"il_ta125": {"name": "Tel-Aviv 125 Index (ILS)", "ticker": "^TA125.TA"},
|
154
|
+
"za_shariah": {
|
155
|
+
"name": "Johannesburg Shariah All Share Index (ZAR)",
|
156
|
+
"ticker": "^J143.JO",
|
157
|
+
},
|
158
|
+
"za_jo": {"name": "Johannesburg All Share Index (ZAR)", "ticker": "^J203.JO"},
|
159
|
+
"za_jo_mcap": {
|
160
|
+
"name": "Johannesburg Large and Mid Cap Index (ZAR)",
|
161
|
+
"ticker": "^J206.JO",
|
162
|
+
},
|
163
|
+
"za_jo_altex": {
|
164
|
+
"name": "Johannesburg Alt Exchange Index (ZAR)",
|
165
|
+
"ticker": "^J232.JO",
|
166
|
+
},
|
167
|
+
"ru_moex": {"name": "MOEX Russia Index (RUB)", "ticker": "IMOEX.ME"},
|
168
|
+
"au_aord": {"name": "Australia All Ordinary Share Index (AUD)", "ticker": "^AORD"},
|
169
|
+
"au_small": {"name": "S&P/ASX Small Ordinaries Index (AUD)", "ticker": "^AXSO"},
|
170
|
+
"au_asx20": {
|
171
|
+
"name": "S&P/ASX 20 Index (AUD)",
|
172
|
+
"ticker": "^ATLI",
|
173
|
+
},
|
174
|
+
"au_asx50": {
|
175
|
+
"name": "S&P/ASX 50 Index (AUD)",
|
176
|
+
"ticker": "^AFLI",
|
177
|
+
},
|
178
|
+
"au_asx50_mid": {
|
179
|
+
"name": "S&P/ASX Mid Cap 50 Index (AUD)",
|
180
|
+
"ticker": "^AXMD",
|
181
|
+
},
|
182
|
+
"au_asx100": {
|
183
|
+
"name": "S&P/ASX 100 Index (AUD)",
|
184
|
+
"ticker": "^ATOI",
|
185
|
+
},
|
186
|
+
"au_asx200": {"name": "S&P/ASX 200 Index (AUD)", "ticker": "^AXJO"},
|
187
|
+
"au_asx300": {
|
188
|
+
"name": "S&P/ASX 300 Index (AUD)",
|
189
|
+
"ticker": "^AXKO",
|
190
|
+
},
|
191
|
+
"au_energy": {
|
192
|
+
"name": "S&P/ASX 200 Energy Sector Index (AUD)",
|
193
|
+
"ticker": "^AXEJ",
|
194
|
+
},
|
195
|
+
"au_resources": {
|
196
|
+
"name": "S&P/ASX 200 Resources Sector Index (AUD)",
|
197
|
+
"ticker": "^AXJR",
|
198
|
+
},
|
199
|
+
"au_materials": {
|
200
|
+
"name": "S&P/ASX 200 Materials Sector Index (AUD)",
|
201
|
+
"ticker": "^AXMJ",
|
202
|
+
},
|
203
|
+
"au_mining": {
|
204
|
+
"name": "S&P/ASX 300 Metals and Mining Sector Index (AUD)",
|
205
|
+
"ticker": "^AXMM",
|
206
|
+
},
|
207
|
+
"au_industrials": {
|
208
|
+
"name": "S&P/ASX 200 Industrials Sector Index (AUD)",
|
209
|
+
"ticker": "^AXNJ",
|
210
|
+
},
|
211
|
+
"au_discretionary": {
|
212
|
+
"name": "S&P/ASX 200 Consumer Discretionary Sector Index (AUD)",
|
213
|
+
"ticker": "^AXDJ",
|
214
|
+
},
|
215
|
+
"au_staples": {
|
216
|
+
"name": "S&P/ASX 200 Consumer Staples Sector Index (AUD)",
|
217
|
+
"ticker": "^AXSJ",
|
218
|
+
},
|
219
|
+
"au_health": {
|
220
|
+
"name": "S&P/ASX 200 Health Care Sector Index (AUD)",
|
221
|
+
"ticker": "^AXHJ",
|
222
|
+
},
|
223
|
+
"au_financials": {
|
224
|
+
"name": "S&P/ASX 200 Financials Sector Index (AUD)",
|
225
|
+
"ticker": "^AXFJ",
|
226
|
+
},
|
227
|
+
"au_reit": {"name": "S&P/ASX 200 A-REIT Industry Index (AUD)", "ticker": "^AXPJ"},
|
228
|
+
"au_tech": {"name": "S&P/ASX 200 Info Tech Sector Index (AUD)", "ticker": "^AXIJ"},
|
229
|
+
"au_communications": {
|
230
|
+
"name": "S&P/ASX 200 Communications Sector Index (AUD)",
|
231
|
+
"ticker": "^AXTJ",
|
232
|
+
},
|
233
|
+
"au_utilities": {
|
234
|
+
"name": "S&P/ASX 200 Utilities Sector Index (AUD)",
|
235
|
+
"ticker": "^AXUJ",
|
236
|
+
},
|
237
|
+
"nz50": {"name": "S&P New Zealand 50 Index (NZD)", "ticker": "^nz50"},
|
238
|
+
"nz_small": {"name": "S&P/NZX Small Cap Index (NZD)", "ticker": "^NZSC"},
|
239
|
+
"kr_kospi": {"name": "KOSPI Composite Index (KRW)", "ticker": "^KS11"},
|
240
|
+
"jp_arca": {"name": "NYSE ARCA Japan Index (JPY)", "ticker": "^JPN"},
|
241
|
+
"jp_n225": {"name": "Nikkei 255 Index (JPY)", "ticker": "^N225"},
|
242
|
+
"jp_n300": {"name": "Nikkei 300 Index (JPY)", "ticker": "^N300"},
|
243
|
+
"jp_nknr": {"name": "Nikkei Avg Net TR Index (JPY)", "ticker": "^NKVI.OS"},
|
244
|
+
"jp_nkrc": {"name": "Nikkei Avg Risk Control Index (JPY)", "ticker": "^NKRC.OS"},
|
245
|
+
"jp_nklv": {"name": "Nikkei Avg Leverage Index (JPY)", "ticker": "^NKLV.OS"},
|
246
|
+
"jp_nkcc": {"name": "Nikkei Avg Covered Call Index (JPY)", "ticker": "^NKCC.OS"},
|
247
|
+
"jp_nkhd": {
|
248
|
+
"name": "Nikkei Avg High Dividend Yield Index (JPY)",
|
249
|
+
"ticker": "^NKHD.OS",
|
250
|
+
},
|
251
|
+
"jp_auto": {
|
252
|
+
"name": "Nikkei 500 Auto & Auto Parts Index (JPY)",
|
253
|
+
"ticker": "^NG17.OS",
|
254
|
+
},
|
255
|
+
"jp_fintech": {
|
256
|
+
"name": "Global Fintech Japan Hedged Index (JPY)",
|
257
|
+
"ticker": "^FDSFTPRJPY",
|
258
|
+
},
|
259
|
+
"jp_nkdh": {"name": "Nikkei Average USD Hedge Index (JPY)", "ticker": "^NKDH.OS"},
|
260
|
+
"jp_nkeh": {"name": "Nikkei Average EUR Hedge Index (JPY)", "ticker": "^NKEH.OS"},
|
261
|
+
"jp_ndiv": {
|
262
|
+
"name": "Nikkei Average Double Inverse Index (JPY)",
|
263
|
+
"ticker": "^NDIV.OS",
|
264
|
+
},
|
265
|
+
"cn_csi300": {"name": "China CSI 300 Index (CNY)", "ticker": "000300.SS"},
|
266
|
+
"cn_sse_comp": {"name": "SSE Composite Index (CNY)", "ticker": "000001.SS"},
|
267
|
+
"cn_sse_a": {"name": "SSE A Share Index (CNY)", "ticker": "000002.SS"},
|
268
|
+
"cn_szse_comp": {"name": "SZSE Component Index (CNY)", "ticker": "399001.SZ"},
|
269
|
+
"cn_szse_a": {"name": "SZSE A-Shares Index (CNY)", "ticker": "399107.SZ"},
|
270
|
+
"tw_twii": {"name": "TSEC Weighted Index (TWD)", "ticker": "^TWII"},
|
271
|
+
"tw_tcii": {"name": "TSEC Cement and Ceramics Subindex (TWD)", "ticker": "^TCII"},
|
272
|
+
"tw_tfii": {"name": "TSEC Foods Subindex (TWD)", "ticker": "^TFII"},
|
273
|
+
"tw_tfni": {"name": "TSEC Finance Subindex (TWD)", "ticker": "^TFNI"},
|
274
|
+
"tw_tpai": {"name": "TSEC Paper and Pulp Subindex (TWD)", "ticker": "^TPAI"},
|
275
|
+
"hk_hsi": {"name": "Hang Seng Index (HKD)", "ticker": "^HSI"},
|
276
|
+
"hk_utilities": {
|
277
|
+
"name": "Hang Seng Utilities Sector Index (HKD)",
|
278
|
+
"ticker": "^HSNU",
|
279
|
+
},
|
280
|
+
"hk_china": {
|
281
|
+
"name": "Hang Seng China-Affiliated Corporations Index (HKD)",
|
282
|
+
"ticker": "^HSCC",
|
283
|
+
},
|
284
|
+
"hk_finance": {"name": "Hang Seng Finance Sector Index (HKD)", "ticker": "^HSNF"},
|
285
|
+
"hk_properties": {
|
286
|
+
"name": "Hang Seng Properties Sector Index (HKD)",
|
287
|
+
"ticker": "^HSNP",
|
288
|
+
},
|
289
|
+
"hk_hko": {"name": "NYSE ARCA Hong Kong Options Index (USD)", "ticker": "^HKO"},
|
290
|
+
"hk_titans30": {
|
291
|
+
"name": "Dow Jones Hong Kong Titans 30 Index (HKD)",
|
292
|
+
"ticker": "^XLHK",
|
293
|
+
},
|
294
|
+
"id_jkse": {"name": "Jakarta Composite Index (IDR)", "ticker": "^JKSE"},
|
295
|
+
"id_lq45": {
|
296
|
+
"name": "Indonesia Stock Exchange LQ45 Index (IDR)",
|
297
|
+
"ticker": "^JKLQ45",
|
298
|
+
},
|
299
|
+
"my_klci": {"name": "FTSE Kuala Lumpur Composite Index (MYR)", "ticker": "^KLSE"},
|
300
|
+
"ph_psei": {"name": "Philippine Stock Exchange Index (PHP)", "ticker": "PSEI.PS"},
|
301
|
+
"sg_sti": {"name": "STI Singapore Index (SGD)", "ticker": "^STI"},
|
302
|
+
"th_set": {"name": "Thailand SET Index (THB)", "ticker": "^SET.BK"},
|
303
|
+
"sp_energy_ig": {
|
304
|
+
"name": "S&P 500 Energy (Industry Group) Index",
|
305
|
+
"ticker": "^SP500-1010",
|
306
|
+
},
|
307
|
+
"sp_energy_equipment": {
|
308
|
+
"name": "S&P 500 Energy Equipment & Services Industry Index",
|
309
|
+
"ticker": "^SP500-101010",
|
310
|
+
},
|
311
|
+
"sp_energy_oil": {
|
312
|
+
"name": "S&P 500 Oil, Gas & Consumable Fuels Industry Index",
|
313
|
+
"ticker": "^SP500-101020",
|
314
|
+
},
|
315
|
+
"sp_materials_sector": {
|
316
|
+
"name": "S&P 500 Materials Sector Index",
|
317
|
+
"ticker": "^SP500-15",
|
318
|
+
},
|
319
|
+
"sp_materials_ig": {
|
320
|
+
"name": "S&P 500 Materials (Industry Group) Index",
|
321
|
+
"ticker": "^SP500-1510",
|
322
|
+
},
|
323
|
+
"sp_materials_construction": {
|
324
|
+
"name": "S&P 500 Construction Materials Industry Index",
|
325
|
+
"ticker": "^SP500-151020",
|
326
|
+
},
|
327
|
+
"sp_materials_metals": {
|
328
|
+
"name": "S&P 500 Mining & Metals Industry Index",
|
329
|
+
"ticker": "^SP500-151040",
|
330
|
+
},
|
331
|
+
"sp_industrials_sector": {
|
332
|
+
"name": "S&P 500 Industrials Sector Index",
|
333
|
+
"ticker": "^SP500-20",
|
334
|
+
},
|
335
|
+
"sp_industrials_goods_ig": {
|
336
|
+
"name": "S&P 500 Capital Goods (Industry Group) Index",
|
337
|
+
"ticker": "^SP500-2010",
|
338
|
+
},
|
339
|
+
"sp_industrials_aerospace": {
|
340
|
+
"name": "S&P 500 Aerospace & Defense Industry Index",
|
341
|
+
"ticker": "^SP500-201010",
|
342
|
+
},
|
343
|
+
"sp_industrials_building": {
|
344
|
+
"name": "S&P 500 Building Products Industry Index",
|
345
|
+
"ticker": "^SP500-201020",
|
346
|
+
},
|
347
|
+
"sp_industrials_construction": {
|
348
|
+
"name": "S&P 500 Construction & Engineering Industry Index",
|
349
|
+
"ticker": "^SP500-201030",
|
350
|
+
},
|
351
|
+
"sp_industrials_electrical": {
|
352
|
+
"name": "S&P 500 Electrical Equipment Industry Index",
|
353
|
+
"ticker": "^SP500-201040",
|
354
|
+
},
|
355
|
+
"sp_industrials_conglomerates": {
|
356
|
+
"name": "S&P 500 Industrial Conglomerates Industry Index",
|
357
|
+
"ticker": "^SP500-201050",
|
358
|
+
},
|
359
|
+
"sp_industrials_machinery": {
|
360
|
+
"name": "S&P 500 Machinery Industry Index",
|
361
|
+
"ticker": "^SP500-201060",
|
362
|
+
},
|
363
|
+
"sp_industrials_distributors": {
|
364
|
+
"name": "S&P 500 Trading Companies & Distributors Industry Index",
|
365
|
+
"ticker": "^SP500-201070",
|
366
|
+
},
|
367
|
+
"sp_industrials_services_ig": {
|
368
|
+
"name": "S&P 500 Commercial & Professional Services (Industry Group) Index",
|
369
|
+
"ticker": "^SP500-2020",
|
370
|
+
},
|
371
|
+
"sp_industrials_services_supplies": {
|
372
|
+
"name": "S&P 500 Commercial Services & Supplies Industry Index",
|
373
|
+
"ticker": "^SP500-202010",
|
374
|
+
},
|
375
|
+
"sp_industrials_transport_ig": {
|
376
|
+
"name": "S&P 500 Transportation (Industry Group) Index",
|
377
|
+
"ticker": "^SP500-2030",
|
378
|
+
},
|
379
|
+
"sp_industrials_transport_air": {
|
380
|
+
"name": "S&P 500 Air Freight & Logistics Industry",
|
381
|
+
"ticker": "^SP500-203010",
|
382
|
+
},
|
383
|
+
"sp_industrials_transport_airlines": {
|
384
|
+
"name": "S&P 500 Airlines Industry Index",
|
385
|
+
"ticker": "^SP500-203020",
|
386
|
+
},
|
387
|
+
"sp_industrials_transport_ground": {
|
388
|
+
"name": "S&P 500 Road & Rail Industry Index",
|
389
|
+
"ticker": "^SP500-203040",
|
390
|
+
},
|
391
|
+
"sp_discretionary_sector": {
|
392
|
+
"name": "S&P 500 Consumer Discretionary Index",
|
393
|
+
"ticker": "^SP500-25",
|
394
|
+
},
|
395
|
+
"sp_discretionary_autos-ig": {
|
396
|
+
"name": "S&P 500 Automobiles and Components (Industry Group) Index",
|
397
|
+
"ticker": "^SP500-2510",
|
398
|
+
},
|
399
|
+
"sp_discretionary_auto_components": {
|
400
|
+
"name": "S&P 500 Auto Components Industry Index",
|
401
|
+
"ticker": "^SP500-251010",
|
402
|
+
},
|
403
|
+
"sp_discretionary_autos": {
|
404
|
+
"name": "S&P 500 Automobiles Industry Index",
|
405
|
+
"ticker": "^SP500-251020",
|
406
|
+
},
|
407
|
+
"sp_discretionary_durables_ig": {
|
408
|
+
"name": "S&P 500 Consumer Durables & Apparel (Industry Group) Index",
|
409
|
+
"ticker": "^SP500-2520",
|
410
|
+
},
|
411
|
+
"sp_discretionary_durables_household": {
|
412
|
+
"name": "S&P 500 Household Durables Industry Index",
|
413
|
+
"ticker": "^SP500-252010",
|
414
|
+
},
|
415
|
+
"sp_discretionary_leisure": {
|
416
|
+
"name": "S&P 500 Leisure Products Industry Index",
|
417
|
+
"ticker": "^SP500-252020",
|
418
|
+
},
|
419
|
+
"sp_discretionary_textiles": {
|
420
|
+
"name": "S&P 500 Textiles, Apparel & Luxury Goods Industry Index",
|
421
|
+
"ticker": "^SP500-252030",
|
422
|
+
},
|
423
|
+
"sp_discretionary_services_consumer": {
|
424
|
+
"name": "S&P 500 Consumer Services (Industry Group) Index",
|
425
|
+
"ticker": "^SP500-2530",
|
426
|
+
},
|
427
|
+
"sp_staples_sector": {
|
428
|
+
"name": "S&P 500 Consumer Staples Sector Index",
|
429
|
+
"ticker": "^SP500-30",
|
430
|
+
},
|
431
|
+
"sp_staples_retail_ig": {
|
432
|
+
"name": "S&P 500 Food & Staples Retailing (Industry Group) Index",
|
433
|
+
"ticker": "^SP500-3010",
|
434
|
+
},
|
435
|
+
"sp_staples_food_ig": {
|
436
|
+
"name": "S&P 500 Food Beverage & Tobacco (Industry Group) Index",
|
437
|
+
"ticker": "^SP500-3020",
|
438
|
+
},
|
439
|
+
"sp_staples_beverages": {
|
440
|
+
"name": "S&P 500 Beverages Industry Index",
|
441
|
+
"ticker": "^SP500-302010",
|
442
|
+
},
|
443
|
+
"sp_staples_products_food": {
|
444
|
+
"name": "S&P 500 Food Products Industry Index",
|
445
|
+
"ticker": "^SP500-302020",
|
446
|
+
},
|
447
|
+
"sp_staples_tobacco": {
|
448
|
+
"name": "S&P 500 Tobacco Industry Index",
|
449
|
+
"ticker": "^SP500-302030",
|
450
|
+
},
|
451
|
+
"sp_staples_household_ig": {
|
452
|
+
"name": "S&P 500 Household & Personal Products (Industry Group) Index",
|
453
|
+
"ticker": "^SP500-3030",
|
454
|
+
},
|
455
|
+
"sp_staples_products_household": {
|
456
|
+
"name": "S&P 500 Household Products Industry Index",
|
457
|
+
"ticker": "^SP500-303010",
|
458
|
+
},
|
459
|
+
"sp_staples_products_personal": {
|
460
|
+
"name": "S&P 500 Personal Products Industry Index",
|
461
|
+
"ticker": "^SP500-303020",
|
462
|
+
},
|
463
|
+
"sp_health_sector": {
|
464
|
+
"name": "S&P 500 Health Care Sector Index",
|
465
|
+
"ticker": "^SP500-35",
|
466
|
+
},
|
467
|
+
"sp_health_equipment": {
|
468
|
+
"name": "S&P 500 Health Care Equipment & Services (Industry Group) Index",
|
469
|
+
"ticker": "^SP500-3510",
|
470
|
+
},
|
471
|
+
"sp_health_supplies": {
|
472
|
+
"name": "S&P 500 Health Care Equipment & Supplies Industry Index",
|
473
|
+
"ticker": "^SP500-351010",
|
474
|
+
},
|
475
|
+
"sp_health_providers": {
|
476
|
+
"name": "S&P 500 Health Care Providers & Services Industry Index",
|
477
|
+
"ticker": "^SP500-351020",
|
478
|
+
},
|
479
|
+
"sp_health_sciences": {
|
480
|
+
"name": "S&P 500 Pharmaceuticals, Biotechnology & Life Sciences (Industry Group) Index",
|
481
|
+
"ticker": "^SP500-3520",
|
482
|
+
},
|
483
|
+
"sp_health_biotech": {
|
484
|
+
"name": "S&P 500 Biotechnology Industry Index",
|
485
|
+
"ticker": "^SP500-352010",
|
486
|
+
},
|
487
|
+
"sp_health_pharma": {
|
488
|
+
"name": "S&P 500 Pharmaceuticals Industry Index",
|
489
|
+
"ticker": "^SP500-352020",
|
490
|
+
},
|
491
|
+
"sp_financials_sector": {
|
492
|
+
"name": "S&P 500 Financials Sector Index",
|
493
|
+
"ticker": "^SP500-40",
|
494
|
+
},
|
495
|
+
"sp_financials_diversified_ig": {
|
496
|
+
"name": "S&P 500 Diversified Financials (Industry Group) Index",
|
497
|
+
"ticker": "^SP500-4020",
|
498
|
+
},
|
499
|
+
"sp_financials_services": {
|
500
|
+
"name": "S&P 500 Diversified Financial Services Industry Index",
|
501
|
+
"ticker": "^SP500-402010",
|
502
|
+
},
|
503
|
+
"sp_financials_consumer": {
|
504
|
+
"name": "S&P 500 Consumer Finance Industry Index",
|
505
|
+
"ticker": "^SP500-402020",
|
506
|
+
},
|
507
|
+
"sp_financials_capital": {
|
508
|
+
"name": "S&P 500 Capital Markets Industry Index",
|
509
|
+
"ticker": "^SP500-402030",
|
510
|
+
},
|
511
|
+
"sp_it_sector": {
|
512
|
+
"name": "S&P 500 IT Sector Index",
|
513
|
+
"ticker": "^SP500-45",
|
514
|
+
},
|
515
|
+
"sp_it_saas_ig": {
|
516
|
+
"name": "S&P 500 Software and Services (Industry Group) Index",
|
517
|
+
"ticker": "^SP500-4510",
|
518
|
+
},
|
519
|
+
"sp_it_software": {
|
520
|
+
"name": "S&P 500 Software Industry Index",
|
521
|
+
"ticker": "^SP500-451030",
|
522
|
+
},
|
523
|
+
"sp_it_hardware": {
|
524
|
+
"name": "S&P 500 Technology Hardware Equipment (Industry Group) Index",
|
525
|
+
"ticker": "^SP500-4520",
|
526
|
+
},
|
527
|
+
"sp_it_semi": {
|
528
|
+
"name": "S&P 500 Semiconductor & Semiconductor Equipment Industry",
|
529
|
+
"ticker": "^SP500-453010",
|
530
|
+
},
|
531
|
+
"sp_communications_sector": {
|
532
|
+
"name": "S&P 500 Communications Sector Index",
|
533
|
+
"ticker": "^SP500-50",
|
534
|
+
},
|
535
|
+
"sp_communications_telecom": {
|
536
|
+
"name": "S&P 500 Diversified Telecommunications Services Industry Index",
|
537
|
+
"ticker": "^SP500-501010",
|
538
|
+
},
|
539
|
+
"sp_utilities_sector": {
|
540
|
+
"name": "S&P 500 Utilities Sector Index",
|
541
|
+
"ticker": "^SP500-55",
|
542
|
+
},
|
543
|
+
"sp_utilities_electricity": {
|
544
|
+
"name": "S&P 500 Electric Utilities Index",
|
545
|
+
"ticker": "^SP500-551010",
|
546
|
+
},
|
547
|
+
"sp_utilities_multis": {
|
548
|
+
"name": "S&P 500 Multi-Utilities Industry Index",
|
549
|
+
"ticker": "^SP500-551030",
|
550
|
+
},
|
551
|
+
"sp_re_sector": {
|
552
|
+
"name": "S&P 500 Real Estate Sector Index",
|
553
|
+
"ticker": "^SP500-60",
|
554
|
+
},
|
555
|
+
"sp_re_ig": {
|
556
|
+
"name": "S&P 500 Real Estate (Industry Group) Index",
|
557
|
+
"ticker": "^SP500-6010",
|
558
|
+
},
|
559
|
+
"sphyda": {"name": "S&P High Yield Aristocrats Index", "ticker": "^SPHYDA"},
|
560
|
+
"dow_djt": {"name": "Dow Jones Transportation Average Index", "ticker": "^DJT"},
|
561
|
+
"dow_dju": {"name": "Dow Jones Utility Average Index", "ticker": "^DJU"},
|
562
|
+
"dow_rci": {"name": "Dow Jones Composite All REIT Index", "ticker": "^RCI"},
|
563
|
+
"reit_fnar": {"name": "FTSE Nareit All Equity REITs Index", "ticker": "^FNAR"},
|
564
|
+
"nq_ixch": {"name": "NASDAQ Health Care Index", "ticker": "^IXCH"},
|
565
|
+
"nq_nbi": {"name": "NASDAQ Biotech Index", "ticker": "^NBI"},
|
566
|
+
"nq_tech": {"name": "NASDAQ 100 Technology Sector Index", "ticker": "^NDXT"},
|
567
|
+
"nq_ex_tech": {"name": "NASDAQ 100 Ex-Tech Sector Index", "ticker": "^NDXX"},
|
568
|
+
"nq_ixtc": {"name": "NASDAQ Telecommunications Index", "ticker": "^IXTC"},
|
569
|
+
"nq_inds": {"name": "NASDAQ Industrial Index", "ticker": "^INDS"},
|
570
|
+
"nq_ixco": {"name": "NASDAQ Computer Index", "ticker": "^INCO"},
|
571
|
+
"nq_bank": {"name": "NASDAQ Bank Index", "ticker": "^BANK"},
|
572
|
+
"nq_bkx": {"name": "KBW NASDAQ Bank Index", "ticker": "^BKX"},
|
573
|
+
"nq_krx": {"name": "KBW NASDAQ Regional Bank Index", "ticker": "^KRX"},
|
574
|
+
"nq_kix": {"name": "KBW NASDAQ Insurance Index", "ticker": "^KIX"},
|
575
|
+
"nq_ksx": {"name": "KBW NASDAQ Capital Markets Index", "ticker": "^KSX"},
|
576
|
+
"nq_tran": {"name": "NASDAQ Transportation Index", "ticker": "^TRAN"},
|
577
|
+
"ice_auto": {"name": "ICE FactSet Global NextGen Auto Index", "ticker": "^ICEFSNA"},
|
578
|
+
"ice_comm": {
|
579
|
+
"name": "ICE FactSet Global NextGen Communications Index",
|
580
|
+
"ticker": "^ICEFSNC",
|
581
|
+
},
|
582
|
+
"nyse_nyl": {"name": "NYSE World Leaders Index", "ticker": "^NYL"},
|
583
|
+
"nyse_nyi": {"name": "NYSE International 100 Index", "ticker": "^NYI"},
|
584
|
+
"nyse_nyy": {"name": "NYSE TMT Index", "ticker": "^NYY"},
|
585
|
+
"nyse_fang": {"name": "NYSE FANG+TM index", "ticker": "^NYFANG"},
|
586
|
+
"arca_xmi": {"name": "NYSE ARCA Major Market Index", "ticker": "^XMI"},
|
587
|
+
"arca_xbd": {"name": "NYSE ARCA Securities Broker/Dealer Index", "ticker": "^XBD"},
|
588
|
+
"arca_xii": {"name": "NYSE ARCA Institutional Index", "ticker": "^XII"},
|
589
|
+
"arca_xoi": {"name": "NYSE ARCA Oil and Gas Index", "ticker": "^XOI"},
|
590
|
+
"arca_xng": {"name": "NYSE ARCA Natural Gas Index", "ticker": "^XNG"},
|
591
|
+
"arca_hui": {"name": "NYSE ARCA Gold Bugs Index", "ticker": "^HUI"},
|
592
|
+
"arca_ixb": {"name": "NYSE Materials Select Sector Index", "ticker": "^IXB"},
|
593
|
+
"arca_drg": {"name": "NYSE ARCA Phramaceutical Index", "ticker": "^DRG"},
|
594
|
+
"arca_btk": {"name": "NYSE ARCA Biotech Index", "ticker": "^BKT"},
|
595
|
+
"arca_pse": {"name": "NYSE ARCA Tech 100 Index", "ticker": "^PSE"},
|
596
|
+
"arca_nwx": {"name": "NYSE ARCA Networking Index", "ticker": "^NWX"},
|
597
|
+
"arca_xci": {"name": "NYSE ARCA Computer Tech Index", "ticker": "^XCI"},
|
598
|
+
"arca_xal": {"name": "NYSE ARCA Airline Index", "ticker": "^XAL"},
|
599
|
+
"arca_xtc": {"name": "NYSE ARCA N.A. Telecom Industry Index", "ticker": "^XTC"},
|
600
|
+
"phlx_sox": {"name": "PHLX Semiconductor Index", "ticker": "^SOX"},
|
601
|
+
"phlx_xau": {"name": "PHLX Gold/Silver Index", "ticker": "^XAU"},
|
602
|
+
"phlx_hgx": {"name": "PHLX Housing Sector Index", "ticker": "^HGX"},
|
603
|
+
"phlx_osx": {"name": "PHLX Oil Services Sector Index", "ticker": "^OSX"},
|
604
|
+
"phlx_uty": {"name": "PHLX Utility Sector Index", "ticker": "^UTY"},
|
605
|
+
"w5klcg": {"name": "Wilshire US Large Cap Growth Index", "ticker": "^W5KLCG"},
|
606
|
+
"w5klcv": {"name": "Wilshire US Large Cap Value Index", "ticker": "^W5KLCV"},
|
607
|
+
"reit_wgreit": {"name": "Wilshire Global REIT Index", "ticker": "^WGREIT"},
|
608
|
+
"reit_wgresi": {
|
609
|
+
"name": "Wilshire Global Real Estate Sector Index",
|
610
|
+
"ticker": "^WGRESI",
|
611
|
+
},
|
612
|
+
"reit_wilreit": {"name": "Wilshire US REIT Index", "ticker": "^WILREIT"},
|
613
|
+
"reit_wilresi": {
|
614
|
+
"name": "Wilshire US Real Estate Security Index",
|
615
|
+
"ticker": "^WILRESI",
|
616
|
+
},
|
617
|
+
"cboe_bxm": {"name": "CBOE Buy-Write Monthly Index", "ticker": "^BXM"},
|
618
|
+
"cboe_vix": {"name": "CBOE S&P 500 Volatility Index", "ticker": "^VIX"},
|
619
|
+
"cboe_vix9d": {"name": "CBOE S&P 500 9-Day Volatility Index", "ticker": "^VIX9D"},
|
620
|
+
"cboe_vix3m": {"name": "CBOE S&P 500 3-Month Volatility Index", "ticker": "^VIX3M"},
|
621
|
+
"cboe_vin": {"name": "CBOE Near-Term VIX Index", "ticker": "^VIN"},
|
622
|
+
"cboe_vvix": {"name": "CBOE VIX Volatility Index", "ticker": "^VVIX"},
|
623
|
+
"cboe_shortvol": {"name": "CBOE Short VIX Futures Index", "ticker": "^SHORTVOL"},
|
624
|
+
"cboe_skew": {"name": "CBOE Skew Index", "ticker": "^SKEW"},
|
625
|
+
"cboe_vxn": {"name": "CBOE NASDAQ 100 Volatility Index", "ticker": "^VXN"},
|
626
|
+
"cboe_gvz": {"name": "CBOE Gold Volatility Index", "ticker": "^GVZ"},
|
627
|
+
"cboe_ovx": {"name": "CBOE Crude Oil Volatility Index", "ticker": "^OVX"},
|
628
|
+
"cboe_tnx": {"name": "CBOE Interest Rate 10 Year T-Note", "ticker": "^TNX"},
|
629
|
+
"cboe_tyx": {"name": "CBOE 30 year Treasury Yields", "ticker": "^TYX"},
|
630
|
+
"cboe_irx": {"name": "CBOE 13 Week Treasury Bill", "ticker": "^IRX"},
|
631
|
+
"cboe_evz": {"name": "CBOE Euro Currency Volatility Index", "ticker": "^EVZ"},
|
632
|
+
"cboe_rvx": {"name": "CBOE Russell 2000 Volatility Index", "ticker": "^RVX"},
|
633
|
+
"move": {"name": "ICE BofAML Move Index", "ticker": "^MOVE"},
|
634
|
+
"dxy": {"name": "US Dollar Index", "ticker": "DX-Y.NYB"},
|
635
|
+
"crypto200": {"name": "CMC Crypto 200 Index by Solacti", "ticker": "^CMC200"},
|
636
|
+
}
|
637
|
+
|
638
|
+
COUNTRIES = [
|
639
|
+
"all",
|
640
|
+
"ar",
|
641
|
+
"at",
|
642
|
+
"au",
|
643
|
+
"be",
|
644
|
+
"br",
|
645
|
+
"ca",
|
646
|
+
"ch",
|
647
|
+
"cl",
|
648
|
+
"cn",
|
649
|
+
"cz",
|
650
|
+
"de",
|
651
|
+
"dk",
|
652
|
+
"ee",
|
653
|
+
"eg",
|
654
|
+
"es",
|
655
|
+
"fi",
|
656
|
+
"fr",
|
657
|
+
"gb",
|
658
|
+
"gr",
|
659
|
+
"hk",
|
660
|
+
"hu",
|
661
|
+
"id",
|
662
|
+
"ie",
|
663
|
+
"il",
|
664
|
+
"in",
|
665
|
+
"is",
|
666
|
+
"it",
|
667
|
+
"jp",
|
668
|
+
"kr",
|
669
|
+
"kw",
|
670
|
+
"lk",
|
671
|
+
"lt",
|
672
|
+
"lv",
|
673
|
+
"mx",
|
674
|
+
"my",
|
675
|
+
"nl",
|
676
|
+
"no",
|
677
|
+
"nz",
|
678
|
+
"pe",
|
679
|
+
"ph",
|
680
|
+
"pk",
|
681
|
+
"pl",
|
682
|
+
"pt",
|
683
|
+
"qa",
|
684
|
+
"ro",
|
685
|
+
"ru",
|
686
|
+
"sa",
|
687
|
+
"se",
|
688
|
+
"sg",
|
689
|
+
"sr",
|
690
|
+
"th",
|
691
|
+
"tr",
|
692
|
+
"tw",
|
693
|
+
"us",
|
694
|
+
"ve",
|
695
|
+
"vn",
|
696
|
+
"za",
|
697
|
+
]
|
698
|
+
|
699
|
+
EXCHANGES = [
|
700
|
+
"ams",
|
701
|
+
"aqs",
|
702
|
+
"ase",
|
703
|
+
"asx",
|
704
|
+
"ath",
|
705
|
+
"ber",
|
706
|
+
"bru",
|
707
|
+
"bse",
|
708
|
+
"bts",
|
709
|
+
"bud",
|
710
|
+
"bue",
|
711
|
+
"bvb",
|
712
|
+
"bvc",
|
713
|
+
"ccs",
|
714
|
+
"cnq",
|
715
|
+
"cph",
|
716
|
+
"cxe",
|
717
|
+
"dfm",
|
718
|
+
"doh",
|
719
|
+
"dus",
|
720
|
+
"ebs",
|
721
|
+
"fka",
|
722
|
+
"fra",
|
723
|
+
"ger",
|
724
|
+
"ham",
|
725
|
+
"han",
|
726
|
+
"hel",
|
727
|
+
"hkg",
|
728
|
+
"ice",
|
729
|
+
"iob",
|
730
|
+
"ise",
|
731
|
+
"ist",
|
732
|
+
"jkt",
|
733
|
+
"jnb",
|
734
|
+
"jpx",
|
735
|
+
"kls",
|
736
|
+
"kuw",
|
737
|
+
"lis",
|
738
|
+
"lit",
|
739
|
+
"lse",
|
740
|
+
"mce",
|
741
|
+
"mex",
|
742
|
+
"mil",
|
743
|
+
"mun",
|
744
|
+
"ncm",
|
745
|
+
"neo",
|
746
|
+
"ngm",
|
747
|
+
"nms",
|
748
|
+
"nsi",
|
749
|
+
"nyq",
|
750
|
+
"nze",
|
751
|
+
"oem",
|
752
|
+
"oqb",
|
753
|
+
"oqx",
|
754
|
+
"osl",
|
755
|
+
"par",
|
756
|
+
"pnk",
|
757
|
+
"pra",
|
758
|
+
"ris",
|
759
|
+
"sau",
|
760
|
+
"ses",
|
761
|
+
"set",
|
762
|
+
"sgo",
|
763
|
+
"shh",
|
764
|
+
"shz",
|
765
|
+
"sto",
|
766
|
+
"stu",
|
767
|
+
"tai",
|
768
|
+
"tal",
|
769
|
+
"tlv",
|
770
|
+
"tor",
|
771
|
+
"two",
|
772
|
+
"van",
|
773
|
+
"vie",
|
774
|
+
"vse",
|
775
|
+
"wse",
|
776
|
+
]
|
777
|
+
|
778
|
+
|
779
|
+
SECTOR_MAP = {
|
780
|
+
"basic_materials": "Basic Materials",
|
781
|
+
"communication_services": "Communication Services",
|
782
|
+
"consumer_cyclical": "Consumer Cyclical",
|
783
|
+
"consumer_defensive": "Consumer Defensive",
|
784
|
+
"energy": "Energy",
|
785
|
+
"financial_services": "Financial Services",
|
786
|
+
"healthcare": "Healthcare",
|
787
|
+
"industrials": "Industrials",
|
788
|
+
"real_estate": "Real Estate",
|
789
|
+
"technology": "Technology",
|
790
|
+
"utilities": "Utilities",
|
791
|
+
}
|
792
|
+
|
793
|
+
SECTORS = Literal[
|
794
|
+
"basic_materials",
|
795
|
+
"communication_services",
|
796
|
+
"consumer_cyclical",
|
797
|
+
"consumer_defensive",
|
798
|
+
"energy",
|
799
|
+
"financial_services",
|
800
|
+
"healthcare",
|
801
|
+
"industrials",
|
802
|
+
"real_estate",
|
803
|
+
"technology",
|
804
|
+
"utilities",
|
805
|
+
]
|
806
|
+
|
807
|
+
Exchanges = Literal[
|
808
|
+
"ams",
|
809
|
+
"aqs",
|
810
|
+
"ase",
|
811
|
+
"asx",
|
812
|
+
"ath",
|
813
|
+
"ber",
|
814
|
+
"bru",
|
815
|
+
"bse",
|
816
|
+
"bts",
|
817
|
+
"bud",
|
818
|
+
"bue",
|
819
|
+
"bvb",
|
820
|
+
"bvc",
|
821
|
+
"ccs",
|
822
|
+
"cnq",
|
823
|
+
"cph",
|
824
|
+
"cxe",
|
825
|
+
"dfm",
|
826
|
+
"doh",
|
827
|
+
"dus",
|
828
|
+
"ebs",
|
829
|
+
"fka",
|
830
|
+
"fra",
|
831
|
+
"ger",
|
832
|
+
"ham",
|
833
|
+
"han",
|
834
|
+
"hel",
|
835
|
+
"hkg",
|
836
|
+
"ice",
|
837
|
+
"iob",
|
838
|
+
"ise",
|
839
|
+
"ist",
|
840
|
+
"jkt",
|
841
|
+
"jnb",
|
842
|
+
"jpx",
|
843
|
+
"kls",
|
844
|
+
"kuw",
|
845
|
+
"lis",
|
846
|
+
"lit",
|
847
|
+
"lse",
|
848
|
+
"mce",
|
849
|
+
"mex",
|
850
|
+
"mil",
|
851
|
+
"mun",
|
852
|
+
"ncm",
|
853
|
+
"neo",
|
854
|
+
"ngm",
|
855
|
+
"nms",
|
856
|
+
"nsi",
|
857
|
+
"nyq",
|
858
|
+
"nze",
|
859
|
+
"oem",
|
860
|
+
"oqb",
|
861
|
+
"oqx",
|
862
|
+
"osl",
|
863
|
+
"par",
|
864
|
+
"pnk",
|
865
|
+
"pra",
|
866
|
+
"ris",
|
867
|
+
"sau",
|
868
|
+
"ses",
|
869
|
+
"set",
|
870
|
+
"sgo",
|
871
|
+
"shh",
|
872
|
+
"shz",
|
873
|
+
"sto",
|
874
|
+
"stu",
|
875
|
+
"tai",
|
876
|
+
"tal",
|
877
|
+
"tlv",
|
878
|
+
"tor",
|
879
|
+
"two",
|
880
|
+
"van",
|
881
|
+
"vie",
|
882
|
+
"vse",
|
883
|
+
"wse",
|
884
|
+
]
|
885
|
+
|
886
|
+
PEER_GROUPS = [
|
887
|
+
"Automobiles",
|
888
|
+
"Auto Components",
|
889
|
+
"Energy Services",
|
890
|
+
"Food Products",
|
891
|
+
"Food Retailers",
|
892
|
+
"Containers & Packaging",
|
893
|
+
"Pharmaceuticals",
|
894
|
+
"Utilities",
|
895
|
+
"Real Estate",
|
896
|
+
"Chemicals",
|
897
|
+
"Construction & Engineering",
|
898
|
+
"Building Products",
|
899
|
+
"Homebuilders",
|
900
|
+
"Banks",
|
901
|
+
"Insurance",
|
902
|
+
"Software & Services",
|
903
|
+
"Diversified Metals",
|
904
|
+
"Precious Metals",
|
905
|
+
"Industrial Conglomerates",
|
906
|
+
"Machinery",
|
907
|
+
"Media",
|
908
|
+
"Transportation",
|
909
|
+
"Transportation Infrastructure",
|
910
|
+
"Telecommunication Services",
|
911
|
+
"Consumer Durables",
|
912
|
+
"Consumer Services",
|
913
|
+
"Diversified Financials",
|
914
|
+
"Technology Hardware",
|
915
|
+
"Retailing",
|
916
|
+
"Electrical Equipment",
|
917
|
+
"Semiconductors",
|
918
|
+
"Commercial Services",
|
919
|
+
"Building Products",
|
920
|
+
"Aerospace & Defense",
|
921
|
+
"Construction & Engineering",
|
922
|
+
"Construction Materials",
|
923
|
+
"Paper & Forestry",
|
924
|
+
"Refiners & Pipelines",
|
925
|
+
"Household Products",
|
926
|
+
"Steel",
|
927
|
+
"Textiles & Apparel",
|
928
|
+
"Traders & Distributors",
|
929
|
+
]
|
930
|
+
|
931
|
+
|
932
|
+
INDUSTRIES = [
|
933
|
+
"advertising_agencies",
|
934
|
+
"aerospace_defense",
|
935
|
+
"agricultural_inputs",
|
936
|
+
"airlines",
|
937
|
+
"airports_air_services",
|
938
|
+
"aluminum",
|
939
|
+
"apparel_manufacturing",
|
940
|
+
"apparel_retail",
|
941
|
+
"asset_management",
|
942
|
+
"auto_components",
|
943
|
+
"auto_manufacturers",
|
944
|
+
"auto_parts",
|
945
|
+
"auto_truck_dealerships",
|
946
|
+
"automobiles",
|
947
|
+
"banks",
|
948
|
+
"biotechnology",
|
949
|
+
"broadcasting",
|
950
|
+
"building_materials",
|
951
|
+
"building_products",
|
952
|
+
"building_products_equipment",
|
953
|
+
"business_equipment_supplies",
|
954
|
+
"capital_markets",
|
955
|
+
"chemicals",
|
956
|
+
"coking_coal",
|
957
|
+
"commercial_services",
|
958
|
+
"communication_equipment",
|
959
|
+
"computer_hardware",
|
960
|
+
"confectioners",
|
961
|
+
"construction_engineering",
|
962
|
+
"construction_materials",
|
963
|
+
"consulting_services",
|
964
|
+
"consumer_durables",
|
965
|
+
"consumer_electronics",
|
966
|
+
"consumer_services",
|
967
|
+
"copper",
|
968
|
+
"credit_services",
|
969
|
+
"department_stores",
|
970
|
+
"diagnostics_research",
|
971
|
+
"discount_stores",
|
972
|
+
"diversified_financials",
|
973
|
+
"education_training_services",
|
974
|
+
"electrical_equipment",
|
975
|
+
"electrical_equipment_parts",
|
976
|
+
"electronic_components",
|
977
|
+
"electronic_gaming_multimedia",
|
978
|
+
"electronics_computer_distribution",
|
979
|
+
"energy_services",
|
980
|
+
"engineering_construction",
|
981
|
+
"entertainment",
|
982
|
+
"farm_heavy_construction_machinery",
|
983
|
+
"farm_products",
|
984
|
+
"financial_conglomerates",
|
985
|
+
"financial_data_stock_exchanges",
|
986
|
+
"food_distribution",
|
987
|
+
"footwear_accessories",
|
988
|
+
"furnishings_fixtures_appliances",
|
989
|
+
"gambling",
|
990
|
+
"gold",
|
991
|
+
"grocery_stores",
|
992
|
+
"health_information_services",
|
993
|
+
"healthcare_plans",
|
994
|
+
"home_builders",
|
995
|
+
"home_improvement_retail",
|
996
|
+
"household_products",
|
997
|
+
"household_personal_products",
|
998
|
+
"industrial_conglomerates",
|
999
|
+
"industrial_distribution",
|
1000
|
+
"information_technology_services",
|
1001
|
+
"infrastructure_operations",
|
1002
|
+
"insurance",
|
1003
|
+
"integrated_freight_logistics",
|
1004
|
+
"internet_content_information",
|
1005
|
+
"internet_retail",
|
1006
|
+
"leisure",
|
1007
|
+
"lodging",
|
1008
|
+
"lumber_wood_production",
|
1009
|
+
"luxury_goods",
|
1010
|
+
"machinery",
|
1011
|
+
"marine_shipping",
|
1012
|
+
"media",
|
1013
|
+
"medical_care_facilities",
|
1014
|
+
"medical_devices",
|
1015
|
+
"medical_distribution",
|
1016
|
+
"medical_instruments_supplies",
|
1017
|
+
"metal_fabrication",
|
1018
|
+
"mortgage_finance",
|
1019
|
+
"oil_gas_drilling",
|
1020
|
+
"oil_gas_e_p",
|
1021
|
+
"oil_gas_equipment_services",
|
1022
|
+
"oil_gas_integrated",
|
1023
|
+
"oil_gas_midstream",
|
1024
|
+
"oil_gas_producers",
|
1025
|
+
"oil_gas_refining_marketing",
|
1026
|
+
"other_industrial_metals_mining",
|
1027
|
+
"other_precious_metals_mining",
|
1028
|
+
"packaged_foods",
|
1029
|
+
"packaging_containers",
|
1030
|
+
"paper_forestry",
|
1031
|
+
"paper_paper_products",
|
1032
|
+
"personal_services",
|
1033
|
+
"pharmaceuticals",
|
1034
|
+
"pharmaceutical_retailers",
|
1035
|
+
"pollution_treatment_controls",
|
1036
|
+
"precious_metals",
|
1037
|
+
"publishing",
|
1038
|
+
"railroads",
|
1039
|
+
"real_estate",
|
1040
|
+
"recreational_vehicles",
|
1041
|
+
"refiners_pipelines",
|
1042
|
+
"rental_leasing_services",
|
1043
|
+
"residential_construction",
|
1044
|
+
"resorts_casinos",
|
1045
|
+
"restaurants",
|
1046
|
+
"retailing",
|
1047
|
+
"scientific_technical_instruments",
|
1048
|
+
"security_protection_services",
|
1049
|
+
"semiconductor_equipment_materials",
|
1050
|
+
"semiconductors",
|
1051
|
+
"shell_companies",
|
1052
|
+
"silver",
|
1053
|
+
"software_and_services",
|
1054
|
+
"solar",
|
1055
|
+
"specialty_business_services",
|
1056
|
+
"specialty_chemicals",
|
1057
|
+
"specialty_industrial_machinery",
|
1058
|
+
"specialty_retail",
|
1059
|
+
"staffing_employment_services",
|
1060
|
+
"steel",
|
1061
|
+
"technology_hardware",
|
1062
|
+
"telecom_services",
|
1063
|
+
"textiles_apparel",
|
1064
|
+
"textile_manufacturing",
|
1065
|
+
"thermal_coal",
|
1066
|
+
"tobacco",
|
1067
|
+
"tools_accessories",
|
1068
|
+
"traders_distributors",
|
1069
|
+
"transportation",
|
1070
|
+
"transportation_infrastructure",
|
1071
|
+
"travel_services",
|
1072
|
+
"trucking",
|
1073
|
+
"uranium",
|
1074
|
+
"utilities",
|
1075
|
+
"waste_management",
|
1076
|
+
]
|
1077
|
+
|
1078
|
+
INDUSTRY_MAP = {
|
1079
|
+
"energy": {
|
1080
|
+
"oil_gas_producers": "Oil & Gas Producers",
|
1081
|
+
"oil_gas_integrated": "Oil & Gas Integrated",
|
1082
|
+
"oil_gas_midstream": "Oil & Gas Midstream",
|
1083
|
+
"oil_gas_e_p": "Oil & Gas E&P",
|
1084
|
+
"oil_gas_equipment_services": "Oil & Gas Equipment & Services",
|
1085
|
+
"oil_gas_refining_marketing": "Oil & Gas Refining & Marketing",
|
1086
|
+
"uranium": "Uranium",
|
1087
|
+
"oil_gas_drilling": "Oil & Gas Drilling",
|
1088
|
+
"thermal_coal": "Thermal Coal",
|
1089
|
+
"energy_services": "Energy Services",
|
1090
|
+
},
|
1091
|
+
"basic_materials": {
|
1092
|
+
"specialty_chemicals": "Specialty Chemicals",
|
1093
|
+
"precious_metals": "Precious Metals",
|
1094
|
+
"diversified_metals": "Diversified Metals",
|
1095
|
+
"gold": "Gold",
|
1096
|
+
"building_materials": "Building Materials",
|
1097
|
+
"copper": "Copper",
|
1098
|
+
"steel": "Steel",
|
1099
|
+
"agricultural_inputs": "Agricultural Inputs",
|
1100
|
+
"chemicals": "Chemicals",
|
1101
|
+
"other_industrial_metals_mining": "Other Industrial Metals & Mining",
|
1102
|
+
"lumber_wood_production": "Lumber & Wood Production",
|
1103
|
+
"aluminum": "Aluminum",
|
1104
|
+
"other_precious_metals_mining": "Other Precious Metals & Mining",
|
1105
|
+
"coking_coal": "Coking Coal",
|
1106
|
+
"paper_forestry": "Paper & Forestry",
|
1107
|
+
"refiners_pipelines": "Refiners & Pipelines",
|
1108
|
+
"paper_paper_products": "Paper & Paper Products",
|
1109
|
+
"silver": "Silver",
|
1110
|
+
},
|
1111
|
+
"industrials": {
|
1112
|
+
"aerospace_defense": "Aerospace & Defense",
|
1113
|
+
"specialty_industrial_machinery": "Specialty Industrial Machinery",
|
1114
|
+
"railroads": "Railroads",
|
1115
|
+
"farm_heavy_construction_machinery": "Farm & Heavy Construction Machinery",
|
1116
|
+
"building_products": "Building Products",
|
1117
|
+
"building_products_equipment": "Building Products & Equipment",
|
1118
|
+
"specialty_business_services": "Specialty Business Services",
|
1119
|
+
"integrated_freight_logistics": "Integrated Freight & Logistics",
|
1120
|
+
"industrial_conglomerates": "Industrial Conglomerates",
|
1121
|
+
"waste_management": "Waste Management",
|
1122
|
+
"engineering_construction": "Engineering & Construction",
|
1123
|
+
"industrial_distribution": "Industrial Distribution",
|
1124
|
+
"rental_leasing_services": "Rental & Leasing Services",
|
1125
|
+
"electrical_equipment": "Electrical Equipment",
|
1126
|
+
"electrical_equipment_parts": "Electrical Equipment & Parts",
|
1127
|
+
"transportation": "Transportation",
|
1128
|
+
"transportation_infrastructure": "Transportation Infrastructure",
|
1129
|
+
"airlines": "Airlines",
|
1130
|
+
"trucking": "Trucking",
|
1131
|
+
"machinery": "Machinery",
|
1132
|
+
"consulting_services": "Consulting Services",
|
1133
|
+
"tools_accessories": "Tools & Accessories",
|
1134
|
+
"pollution_treatment_controls": "Pollution & Treatment Controls",
|
1135
|
+
"security_protection_services": "Security & Protection Services",
|
1136
|
+
"metal_fabrication": "Metal Fabrication",
|
1137
|
+
"marine_shipping": "Marine Shipping",
|
1138
|
+
"infrastructure_operations": "Infrastructure Operations",
|
1139
|
+
"staffing_employment_services": "Staffing & Employment Services",
|
1140
|
+
"airports_air_services": "Airports & Air Services",
|
1141
|
+
"business_equipment_supplies": "Business Equipment & Supplies",
|
1142
|
+
"commercial_services": "Commercial Services",
|
1143
|
+
"containers_packaging": "Containers & Packaging",
|
1144
|
+
},
|
1145
|
+
"consumer_defensive": {
|
1146
|
+
"discount_stores": "Discount Stores",
|
1147
|
+
"household_products": "Household Products",
|
1148
|
+
"household_personal_products": "Household & Personal Products",
|
1149
|
+
"food_products": "Food Products",
|
1150
|
+
"food_retailers": "Food Retailers",
|
1151
|
+
"tobacco": "Tobacco",
|
1152
|
+
"packaged_foods": "Packaged Foods",
|
1153
|
+
"confectioners": "Confectioners",
|
1154
|
+
"grocery_stores": "Grocery Stores",
|
1155
|
+
"farm_products": "Farm Products",
|
1156
|
+
"food_distribution": "Food Distribution",
|
1157
|
+
"education_training_services": "Education & Training Services",
|
1158
|
+
},
|
1159
|
+
"consumer_cyclical": {
|
1160
|
+
"automobiles": "Automobiles",
|
1161
|
+
"internet_retail": "Internet Retail",
|
1162
|
+
"auto_manufacturers": "Auto Manufacturers",
|
1163
|
+
"restaurants": "Restaurants",
|
1164
|
+
"home_improvement_retail": "Home Improvement Retail",
|
1165
|
+
"travel_services": "Travel Services",
|
1166
|
+
"retailing": "Retailing",
|
1167
|
+
"specialty_retail": "Specialty Retail",
|
1168
|
+
"apparel_retail": "Apparel Retail",
|
1169
|
+
"residential_construction": "Residential Construction",
|
1170
|
+
"footwear_accessories": "Footwear & Accessories",
|
1171
|
+
"packaging_containers": "Packaging & Containers",
|
1172
|
+
"lodging": "Lodging",
|
1173
|
+
"auto_truck_dealerships": "Auto & Truck Dealerships",
|
1174
|
+
"auto_parts": "Auto Parts",
|
1175
|
+
"auto_components": "Auto Components",
|
1176
|
+
"gambling": "Gambling",
|
1177
|
+
"resorts_casinos": "Resorts & Casinos",
|
1178
|
+
"leisure": "Leisure",
|
1179
|
+
"apparel_manufacturing": "Apparel Manufacturing",
|
1180
|
+
"personal_services": "Personal Services",
|
1181
|
+
"furnishings_fixtures_appliances": "Furnishings, Fixtures & Appliances",
|
1182
|
+
"recreational_vehicles": "Recreational Vehicles",
|
1183
|
+
"luxury_goods": "Luxury Goods",
|
1184
|
+
"department_stores": "Department Stores",
|
1185
|
+
"textiles_apparel": "Textiles & Apparel",
|
1186
|
+
"textile_manufacturing": "Textile Manufacturing",
|
1187
|
+
"traders_distributors": "Traders & Distributors",
|
1188
|
+
"consumer_durables": "Consumer Durables",
|
1189
|
+
"consumer_services": "Consumer Services",
|
1190
|
+
},
|
1191
|
+
"healthcare": {
|
1192
|
+
"drugs": "Pharmaceuticals",
|
1193
|
+
"healthcare_plans": "Healthcare Plans",
|
1194
|
+
"medical_devices": "Medical Devices",
|
1195
|
+
"biotechnology": "Biotechnology",
|
1196
|
+
"diagnostics_research": "Diagnostics & Research",
|
1197
|
+
"medical_instruments_supplies": "Medical Instruments & Supplies",
|
1198
|
+
"medical_care_facilities": "Medical Care Facilities",
|
1199
|
+
"medical_distribution": "Medical Distribution",
|
1200
|
+
"health_information_services": "Health Information Services",
|
1201
|
+
"pharmaceutical_retailers": "Pharmaceutical Retailers",
|
1202
|
+
},
|
1203
|
+
"financial_services": {
|
1204
|
+
"banks": "Banks",
|
1205
|
+
"insurance": "Insurance",
|
1206
|
+
"diversified_financials": "Diversified Financials",
|
1207
|
+
"credit_services": "Credit Services",
|
1208
|
+
"asset_management": "Asset Management",
|
1209
|
+
"capital_markets": "Capital Markets",
|
1210
|
+
"financial_data_stock_exchanges": "Financial Data & Stock Exchanges",
|
1211
|
+
"insurance_brokers": "Insurance Brokers",
|
1212
|
+
"mortgage_finance": "Mortgage Finance",
|
1213
|
+
"shell_companies": "Shell Companies",
|
1214
|
+
"financial_conglomerates": "Financial Conglomerates",
|
1215
|
+
},
|
1216
|
+
"technology": {
|
1217
|
+
"semiconductors": "Semiconductors",
|
1218
|
+
"software_and_services": "Software & Services",
|
1219
|
+
"consumer_electronics": "Consumer Electronics",
|
1220
|
+
"information_technology_services": "Information Technology Services",
|
1221
|
+
"communication_equipment": "Communication Equipment",
|
1222
|
+
"semiconductor_equipment_materials": "Semiconductor Equipment & Materials",
|
1223
|
+
"computer_hardware": "Computer Hardware",
|
1224
|
+
"technology_hardware": "Technology Hardware",
|
1225
|
+
"electronic_components": "Electronic Components",
|
1226
|
+
"scientific_technical_instruments": "Scientific & Technical Instruments",
|
1227
|
+
"solar": "Solar",
|
1228
|
+
"electronics_computer_distribution": "Electronics & Computer Distribution",
|
1229
|
+
},
|
1230
|
+
"communication_services": {
|
1231
|
+
"internet_content_information": "Internet Content & Information",
|
1232
|
+
"telecom_services": "Telecommunication Services",
|
1233
|
+
"entertainment": "Entertainment",
|
1234
|
+
"media": "Media",
|
1235
|
+
"electronic_gaming_multimedia": "Electronic Gaming & Multimedia",
|
1236
|
+
"advertising_agencies": "Advertising Agencies",
|
1237
|
+
"publishing": "Publishing",
|
1238
|
+
"broadcasting": "Broadcasting",
|
1239
|
+
},
|
1240
|
+
"utilities": {
|
1241
|
+
"utilities": "Utilities",
|
1242
|
+
},
|
1243
|
+
"real_estate": {
|
1244
|
+
"real_estate": "Real Estate",
|
1245
|
+
"home_builders": "Homebuilders",
|
1246
|
+
},
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
|
1250
|
+
class AKSharePredefinedScreenerData(EquityPerformanceData):
|
1251
|
+
"""AKShare Predefined Screener Data."""
|
1252
|
+
|
1253
|
+
__alias_dict__ = {
|
1254
|
+
"name": "shortName",
|
1255
|
+
"price": "regularMarketPrice",
|
1256
|
+
"change": "regularMarketChange",
|
1257
|
+
"percent_change": "regularMarketChangePercent",
|
1258
|
+
"volume": "regularMarketVolume",
|
1259
|
+
"open": "regularMarketOpen",
|
1260
|
+
"high": "regularMarketDayHigh",
|
1261
|
+
"low": "regularMarketDayLow",
|
1262
|
+
"previous_close": "regularMarketPreviousClose",
|
1263
|
+
"ma50": "fiftyDayAverage",
|
1264
|
+
"ma200": "twoHundredDayAverage",
|
1265
|
+
"year_high": "fiftyTwoWeekHigh",
|
1266
|
+
"year_low": "fiftyTwoWeekLow",
|
1267
|
+
"market_cap": "marketCap",
|
1268
|
+
"shares_outstanding": "sharesOutstanding",
|
1269
|
+
"book_value": "bookValue",
|
1270
|
+
"price_to_book": "priceToBook",
|
1271
|
+
"eps_ttm": "epsTrailingTwelveMonths",
|
1272
|
+
"pe_forward": "forwardPE",
|
1273
|
+
"dividend_yield": "trailingAnnualDividendYield",
|
1274
|
+
"earnings_date": "earnings_date",
|
1275
|
+
"currency": "currency",
|
1276
|
+
"exchange_timezone": "exchangeTimezoneName",
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
open: Optional[float] = Field(
|
1280
|
+
default=None,
|
1281
|
+
description="Open price for the day.",
|
1282
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1283
|
+
)
|
1284
|
+
high: Optional[float] = Field(
|
1285
|
+
default=None,
|
1286
|
+
description="High price for the day.",
|
1287
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1288
|
+
)
|
1289
|
+
low: Optional[float] = Field(
|
1290
|
+
default=None,
|
1291
|
+
description="Low price for the day.",
|
1292
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1293
|
+
)
|
1294
|
+
previous_close: Optional[float] = Field(
|
1295
|
+
default=None,
|
1296
|
+
description="Previous close price.",
|
1297
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1298
|
+
)
|
1299
|
+
ma50: Optional[float] = Field(
|
1300
|
+
default=None,
|
1301
|
+
description="50-day moving average.",
|
1302
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1303
|
+
)
|
1304
|
+
ma200: Optional[float] = Field(
|
1305
|
+
default=None,
|
1306
|
+
description="200-day moving average.",
|
1307
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1308
|
+
)
|
1309
|
+
year_high: Optional[float] = Field(
|
1310
|
+
default=None,
|
1311
|
+
description="52-week high.",
|
1312
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1313
|
+
)
|
1314
|
+
year_low: Optional[float] = Field(
|
1315
|
+
default=None,
|
1316
|
+
description="52-week low.",
|
1317
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1318
|
+
)
|
1319
|
+
market_cap: Optional[float] = Field(
|
1320
|
+
default=None,
|
1321
|
+
description="Market Cap.",
|
1322
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1323
|
+
)
|
1324
|
+
shares_outstanding: Optional[float] = Field(
|
1325
|
+
default=None,
|
1326
|
+
description="Shares outstanding.",
|
1327
|
+
)
|
1328
|
+
book_value: Optional[float] = Field(
|
1329
|
+
default=None,
|
1330
|
+
description="Book value per share.",
|
1331
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1332
|
+
)
|
1333
|
+
price_to_book: Optional[float] = Field(
|
1334
|
+
default=None,
|
1335
|
+
description="Price to book ratio.",
|
1336
|
+
)
|
1337
|
+
eps_ttm: Optional[float] = Field(
|
1338
|
+
default=None,
|
1339
|
+
description="Earnings per share over the trailing twelve months.",
|
1340
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1341
|
+
)
|
1342
|
+
eps_forward: Optional[float] = Field(
|
1343
|
+
default=None,
|
1344
|
+
description="Forward earnings per share.",
|
1345
|
+
json_schema_extra={"x-unit_measurement": "currency"},
|
1346
|
+
)
|
1347
|
+
pe_forward: Optional[float] = Field(
|
1348
|
+
default=None,
|
1349
|
+
description="Forward price-to-earnings ratio.",
|
1350
|
+
)
|
1351
|
+
dividend_yield: Optional[float] = Field(
|
1352
|
+
default=None,
|
1353
|
+
description="Trailing twelve month dividend yield.",
|
1354
|
+
json_schema_extra={"x-unit_measurement": "percent", "frontend_multiply": 100},
|
1355
|
+
)
|
1356
|
+
exchange: Optional[str] = Field(
|
1357
|
+
default=None,
|
1358
|
+
description="Exchange where the stock is listed.",
|
1359
|
+
)
|
1360
|
+
exchange_timezone: Optional[str] = Field(
|
1361
|
+
default=None,
|
1362
|
+
description="Timezone of the exchange.",
|
1363
|
+
)
|
1364
|
+
earnings_date: Optional[datetime] = Field(
|
1365
|
+
default=None,
|
1366
|
+
description="Most recent earnings date.",
|
1367
|
+
)
|
1368
|
+
currency: Optional[str] = Field(
|
1369
|
+
default=None,
|
1370
|
+
description="Currency of the price data.",
|
1371
|
+
)
|
1372
|
+
|
1373
|
+
@field_validator("percent_change", mode="before", check_fields=False)
|
1374
|
+
@classmethod
|
1375
|
+
def _validate_percent_change(cls, v):
|
1376
|
+
"""Normalize percent change."""
|
1377
|
+
if v is not None:
|
1378
|
+
return v / 100
|
1379
|
+
return v
|
1380
|
+
|
1381
|
+
|
1382
|
+
def get_industry_sector(industry: str):
|
1383
|
+
"""Get the sector from the industry."""
|
1384
|
+
for sector, industries in INDUSTRY_MAP.items():
|
1385
|
+
if industry in industries:
|
1386
|
+
return sector
|
1387
|
+
return None
|