earningspy 0.1.3__tar.gz

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.
Files changed (42) hide show
  1. earningspy-0.1.3/LICENSE +21 -0
  2. earningspy-0.1.3/MANIFEST.in +23 -0
  3. earningspy-0.1.3/PKG-INFO +79 -0
  4. earningspy-0.1.3/README.md +23 -0
  5. earningspy-0.1.3/earningspy/__init__.py +0 -0
  6. earningspy-0.1.3/earningspy/calendars/__init__.py +1 -0
  7. earningspy-0.1.3/earningspy/calendars/earnings.py +127 -0
  8. earningspy-0.1.3/earningspy/calendars/utils.py +32 -0
  9. earningspy-0.1.3/earningspy/common/__init__.py +0 -0
  10. earningspy-0.1.3/earningspy/common/constants.py +130 -0
  11. earningspy-0.1.3/earningspy/generators/__init__.py +0 -0
  12. earningspy-0.1.3/earningspy/generators/finviz/__init__.py +4 -0
  13. earningspy-0.1.3/earningspy/generators/finviz/config.py +4 -0
  14. earningspy-0.1.3/earningspy/generators/finviz/constants.py +225 -0
  15. earningspy-0.1.3/earningspy/generators/finviz/data.py +128 -0
  16. earningspy-0.1.3/earningspy/generators/finviz/helper_functions/__init__.py +0 -0
  17. earningspy-0.1.3/earningspy/generators/finviz/helper_functions/display_functions.py +12 -0
  18. earningspy-0.1.3/earningspy/generators/finviz/helper_functions/error_handling.py +68 -0
  19. earningspy-0.1.3/earningspy/generators/finviz/helper_functions/request_functions.py +143 -0
  20. earningspy-0.1.3/earningspy/generators/finviz/helper_functions/save_data.py +78 -0
  21. earningspy-0.1.3/earningspy/generators/finviz/helper_functions/scraper_functions.py +163 -0
  22. earningspy-0.1.3/earningspy/generators/finviz/main_func.py +206 -0
  23. earningspy-0.1.3/earningspy/generators/finviz/portfolio.py +160 -0
  24. earningspy-0.1.3/earningspy/generators/finviz/screener.py +488 -0
  25. earningspy-0.1.3/earningspy/generators/finviz/tests/test_screener.py +105 -0
  26. earningspy-0.1.3/earningspy/generators/finviz/utils.py +278 -0
  27. earningspy-0.1.3/earningspy/generators/yahoo/__init__.py +0 -0
  28. earningspy-0.1.3/earningspy/generators/yahoo/async_timeseries.py +118 -0
  29. earningspy-0.1.3/earningspy/generators/yahoo/old_time_series.py +81 -0
  30. earningspy-0.1.3/earningspy/generators/yahoo/time_series.py +104 -0
  31. earningspy-0.1.3/earningspy/inspectors/__init__.py +0 -0
  32. earningspy-0.1.3/earningspy/inspectors/mixins.py +184 -0
  33. earningspy-0.1.3/earningspy/inspectors/pead.py +231 -0
  34. earningspy-0.1.3/earningspy/inspectors/plotter.py +63 -0
  35. earningspy-0.1.3/earningspy.egg-info/PKG-INFO +79 -0
  36. earningspy-0.1.3/earningspy.egg-info/SOURCES.txt +40 -0
  37. earningspy-0.1.3/earningspy.egg-info/dependency_links.txt +1 -0
  38. earningspy-0.1.3/earningspy.egg-info/requires.txt +36 -0
  39. earningspy-0.1.3/earningspy.egg-info/top_level.txt +2 -0
  40. earningspy-0.1.3/pyproject.toml +38 -0
  41. earningspy-0.1.3/requirements.txt +95 -0
  42. earningspy-0.1.3/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 c4road
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ exclude Makefile
2
+ exclude tests/*
3
+ exclude docs/*
4
+ exclude build/*
5
+ exclude dist/*
6
+ exclude .eggs/*
7
+ exclude *.egg-info
8
+ exclude *.egg
9
+ exclude __pycache__/*
10
+ exclude *.pyc
11
+ exclude *.pyo
12
+ exclude .tox/*
13
+ exclude .pytest_cache/*
14
+ exclude .coverage
15
+ exclude NOTES.md
16
+ exclude NOTES-AWS.md
17
+ exclude BACKLOG.md
18
+ exclude old_local_data/*
19
+ exclude legacy_data/*
20
+ exclude .env
21
+ exclude .DS_Store
22
+ exclude .vscode/*
23
+ exclude .idea/*
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: earningspy
3
+ Version: 0.1.3
4
+ Summary: Python toolkit for PEAD research and earnings calendar analysis.
5
+ Author-email: Alberto Rincones <alberto.rincones@code4road.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/c4road/earningspy
8
+ Keywords: earnings,finance,AI,scraper,PEAD,quant
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Information Technology
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Requires-Python: ==3.10.*
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: aiohappyeyeballs==2.4.4
20
+ Requires-Dist: aiohttp==3.11.10
21
+ Requires-Dist: aiosignal==1.3.1
22
+ Requires-Dist: async-timeout==5.0.1
23
+ Requires-Dist: attrs==24.2.0
24
+ Requires-Dist: beautifulsoup4==4.12.3
25
+ Requires-Dist: certifi==2024.8.30
26
+ Requires-Dist: charset-normalizer==3.4.0
27
+ Requires-Dist: contourpy==1.3.2
28
+ Requires-Dist: cssselect==1.2.0
29
+ Requires-Dist: cycler==0.12.1
30
+ Requires-Dist: fonttools==4.59.0
31
+ Requires-Dist: frozenlist==1.5.0
32
+ Requires-Dist: idna==3.10
33
+ Requires-Dist: kiwisolver==1.4.8
34
+ Requires-Dist: lxml==5.3.0
35
+ Requires-Dist: matplotlib==3.10.3
36
+ Requires-Dist: multidict==6.1.0
37
+ Requires-Dist: numpy==2.2.0
38
+ Requires-Dist: packaging==25.0
39
+ Requires-Dist: pandas==2.2.3
40
+ Requires-Dist: pillow==11.3.0
41
+ Requires-Dist: propcache==0.2.1
42
+ Requires-Dist: pyparsing==3.2.3
43
+ Requires-Dist: python-dateutil==2.9.0.post0
44
+ Requires-Dist: pytz==2024.2
45
+ Requires-Dist: requests==2.32.3
46
+ Requires-Dist: six==1.17.0
47
+ Requires-Dist: soupsieve==2.6
48
+ Requires-Dist: tenacity==9.0.0
49
+ Requires-Dist: tqdm==4.67.1
50
+ Requires-Dist: typing-extensions==4.12.2
51
+ Requires-Dist: tzdata==2024.2
52
+ Requires-Dist: urllib3==2.2.3
53
+ Requires-Dist: user-agent==0.1.10
54
+ Requires-Dist: yarl==1.18.3
55
+ Dynamic: license-file
56
+
57
+ # EarningsPy 📈
58
+
59
+ EarningsPy is the elegant Python alternative for studying Post Earnings Announcement Drift (PEAD) in financial markets. Designed for quant researchers, data scientists, and finance professionals, this package provides robust tools to analyze earnings calendars, automate data collection, and perform advanced event studies with ease.
60
+
61
+ ## Features
62
+
63
+ - 🗓️ **Earnings Calendar Access**: Effortlessly retrieve earnings dates by sector, industry, index, or market capitalization.
64
+ - 🚀 **PEAD Analysis**: Built-in utilities to compute post-earnings drift and related statistics.
65
+ - 🏦 **Data Integration**: Seamless integration with Finviz for comprehensive earnings and 20 min delayed market data.
66
+ - 🔍 **Flexible Filtering**: Filter earnings events by week, month, or custom criteria.
67
+ - 🛠️ **Quant-Friendly API**: Pandas-based workflows for easy integration into quant research pipelines.
68
+ - 📊 **Excel-Ready Data**: Generate profiled, ready-to-use datasets for calculations and modeling directly in Excel.
69
+
70
+ ## Requirements
71
+
72
+ - Tested in Python 3.10 only
73
+
74
+
75
+ ## Installation
76
+
77
+ ```bash
78
+ pip install earningspy
79
+ ```
@@ -0,0 +1,23 @@
1
+ # EarningsPy 📈
2
+
3
+ EarningsPy is the elegant Python alternative for studying Post Earnings Announcement Drift (PEAD) in financial markets. Designed for quant researchers, data scientists, and finance professionals, this package provides robust tools to analyze earnings calendars, automate data collection, and perform advanced event studies with ease.
4
+
5
+ ## Features
6
+
7
+ - 🗓️ **Earnings Calendar Access**: Effortlessly retrieve earnings dates by sector, industry, index, or market capitalization.
8
+ - 🚀 **PEAD Analysis**: Built-in utilities to compute post-earnings drift and related statistics.
9
+ - 🏦 **Data Integration**: Seamless integration with Finviz for comprehensive earnings and 20 min delayed market data.
10
+ - 🔍 **Flexible Filtering**: Filter earnings events by week, month, or custom criteria.
11
+ - 🛠️ **Quant-Friendly API**: Pandas-based workflows for easy integration into quant research pipelines.
12
+ - 📊 **Excel-Ready Data**: Generate profiled, ready-to-use datasets for calculations and modeling directly in Excel.
13
+
14
+ ## Requirements
15
+
16
+ - Tested in Python 3.10 only
17
+
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install earningspy
23
+ ```
File without changes
@@ -0,0 +1 @@
1
+ from .earnings import *
@@ -0,0 +1,127 @@
1
+ import pandas as pd
2
+ from earningspy.generators.finviz.data import (
3
+ get_filters,
4
+ get_by_industry,
5
+ get_by_sector,
6
+ get_by_index,
7
+ get_by_industry,
8
+ get_micro_caps,
9
+ get_small_caps,
10
+ get_medium_caps,
11
+ get_by_earnings_date,
12
+ )
13
+
14
+ from earningspy.calendars.utils import calendar_pre_formatter, days_left
15
+ from earningspy.common.constants import (
16
+ FINVIZ_EARNINGS_DATE_KEY,
17
+ DAYS_LEFT_KEY,
18
+ ALLOWED_CAPITALIZATIONS,
19
+ )
20
+
21
+ class EarningSpy:
22
+
23
+ @classmethod
24
+ def filters(cls, *args, **kwargs):
25
+ return get_filters(*args, **kwargs)
26
+
27
+ @classmethod
28
+ def get_calendar(cls, sector=None, industry=None, index=None, future_only=True):
29
+
30
+ finviz_data = cls.get_finviz(sector=sector,
31
+ industry=industry,
32
+ index=index)
33
+
34
+ finviz_data = cls._arrange(finviz_data)
35
+ if future_only:
36
+ finviz_data = finviz_data[finviz_data[DAYS_LEFT_KEY] >= 0]
37
+ return finviz_data
38
+
39
+ @classmethod
40
+ def get_finviz(cls,
41
+ sector=None,
42
+ industry=None,
43
+ index=None):
44
+
45
+ if industry and not index and not sector:
46
+ finviz_data = get_by_industry(industry)
47
+ elif sector and not index and not industry:
48
+ finviz_data = get_by_sector(sector)
49
+ elif index and not sector and not industry:
50
+ finviz_data = get_by_index(index)
51
+ else:
52
+ raise Exception('You can only pass sector, industry, or index not several of them')
53
+
54
+ return finviz_data
55
+
56
+ @classmethod
57
+ def get_finviz_get_by_industry(cls, tickers):
58
+ data = get_by_industry(tickers)
59
+ return cls._arrange(data)
60
+
61
+ @classmethod
62
+ def get_this_week_earnings(cls):
63
+ data = get_by_earnings_date(scope="this_week")
64
+ return cls._arrange(data)
65
+
66
+ @classmethod
67
+ def get_previous_week_earnings(cls):
68
+ data = get_by_earnings_date(scope="last_week")
69
+ return cls._arrange(data)
70
+
71
+ @classmethod
72
+ def get_next_week_earnings(cls):
73
+ data = get_by_earnings_date(scope="next_week")
74
+ return cls._arrange(data)
75
+
76
+ @classmethod
77
+ def get_this_month_earnings(cls):
78
+ data = get_by_earnings_date(scope="this_month")
79
+ return cls._arrange(data)
80
+
81
+ @classmethod
82
+ def get_today_bmo(cls):
83
+ data = get_by_earnings_date(scope="today_bmo")
84
+ return cls._arrange(data)
85
+
86
+ @classmethod
87
+ def get_yesterday_amc(cls):
88
+ data = get_by_earnings_date(scope="yesterday_amc")
89
+ return cls._arrange(data)
90
+
91
+ @classmethod
92
+ def get_by_capitalization(cls, cap='micro'):
93
+
94
+ if cap not in ALLOWED_CAPITALIZATIONS:
95
+ raise Exception(f"Invalid scope valid scopes {ALLOWED_CAPITALIZATIONS}")
96
+
97
+ factory = {
98
+ 'micro': get_micro_caps,
99
+ 'small': get_small_caps,
100
+ 'medium': get_medium_caps,
101
+ }
102
+
103
+ finviz_data = factory[cap]()
104
+
105
+ return cls._arrange(finviz_data)
106
+
107
+ @classmethod
108
+ def _check_missing_dates(cls, finviz_data):
109
+ missing_count = finviz_data.index.to_series().apply(
110
+ lambda row: isinstance(row, pd._libs.tslibs.nattype.NaTType) or pd.isna(row) or row is None
111
+ ).sum()
112
+ if missing_count > 0:
113
+ print(f"[WARNING] Found {missing_count} missing earnings dates in the data.")
114
+
115
+ @classmethod
116
+ def _compute_days_left(cls, finviz_data):
117
+
118
+ cls._check_missing_dates(finviz_data)
119
+ finviz_data[DAYS_LEFT_KEY] = finviz_data.apply(lambda row: days_left(row), axis=1)
120
+ return finviz_data
121
+
122
+ @classmethod
123
+ def _arrange(cls, data):
124
+ data = data.set_index(FINVIZ_EARNINGS_DATE_KEY, drop=True)
125
+ data = data.sort_index(ascending=True)
126
+ data = cls._compute_days_left(data)
127
+ return calendar_pre_formatter(data)
@@ -0,0 +1,32 @@
1
+ from datetime import datetime
2
+ import pandas as pd
3
+ from earningspy.common.constants import (
4
+ FIELDS_ORDER
5
+ )
6
+
7
+
8
+ def calendar_pre_formatter(data):
9
+
10
+ data.columns = data.columns.str.replace(' ', '_')
11
+ data.columns = data.columns.str.upper()
12
+ data.columns = data.columns.str.strip()
13
+
14
+ data = data.convert_dtypes().infer_objects()
15
+
16
+ data = data.round(4)
17
+ data = data[FIELDS_ORDER]
18
+ return data
19
+
20
+
21
+ def days_left(row):
22
+ if isinstance(row.name, pd._libs.tslibs.nattype.NaTType) or pd.isna(row.name) or row.name is None:
23
+ return None
24
+
25
+ earnings_date = row.name
26
+
27
+ if hasattr(earnings_date, "date"):
28
+ earnings_date = earnings_date.date()
29
+
30
+ today = datetime.today().date()
31
+ diff = (earnings_date - today).days
32
+ return diff
File without changes
@@ -0,0 +1,130 @@
1
+ TICKER_KEY = 'Ticker'
2
+ TICKER_KEY_CAPITAL = 'TICKER'
3
+ COMPANY_KEY_CAPITAL = 'COMPANY'
4
+ DAYS_TO_EARNINGS_KEY_CAPITAL='DAYS_LEFT'
5
+ DAYS_TO_EARNINGS_KEY_BEFORE_FORMAT='days_left'
6
+
7
+ MARKET_DATA_TICKERS = ['^GSPC', '^TNX', '^RUT', '^VIX']
8
+ TBILL_10_YEAR = '^TNX'
9
+
10
+ FINVIZ_EARNINGS_DATE_KEY = 'EARNINGS_DATE'
11
+ DAYS_LEFT_KEY = 'DAYS_LEFT'
12
+ ALLOWED_CAPITALIZATIONS = ['micro', 'small', 'medium']
13
+
14
+ # Post processing fields
15
+ ABS_RET_KEY='1+{}_RET'
16
+ EXP_RET_KEY='EXP.RET_{}'
17
+ BETA_KEY='BETA'
18
+ RF_KEY='1+{}_RF'
19
+ SP_500_TICKER='^GSPC'
20
+ MARK_EXP_KEY='MARK_EXP_{}'
21
+ CAPM_KEY='CAPM_{}'
22
+ TBILL_10_YEAR='^TNX'
23
+ VIX_TICKER='^VIX'
24
+ VIX_KEY='1+{}_VIX'
25
+ EARNING_VIX_KEY='EARNING_VIX'
26
+ CAR_KEY='CAR_{}'
27
+ BHAR_KEY='BHAR_{}'
28
+ DATADATE_KEY='DATADATE'
29
+ ALLOWED_WINDOWS = [3, 30, 60]
30
+
31
+ AVAILABLE_CHECK_COLUMNS = [
32
+ EXP_RET_KEY,
33
+ ABS_RET_KEY,
34
+ MARK_EXP_KEY,
35
+ CAPM_KEY,
36
+ CAR_KEY,
37
+ BHAR_KEY,
38
+ ]
39
+
40
+ FIELDS_ORDER = [
41
+ 'DAYS_LEFT',
42
+ 'TICKER',
43
+ 'COMPANY',
44
+ 'PRICE',
45
+ '52W_NORM',
46
+ 'AVG_VOLUME',
47
+ 'DIVIDEND_EX_DATE',
48
+ 'DIVIDEND',
49
+ 'PAYOUT_RATIO',
50
+ 'SECTOR',
51
+ 'INDUSTRY',
52
+ 'COUNTRY',
53
+ 'MARKET_CAP',
54
+ 'P/E',
55
+ 'FWD_P/E',
56
+ 'PEG',
57
+ 'P/S',
58
+ 'P/B',
59
+ 'P/C',
60
+ 'P/FCF',
61
+ 'EPS',
62
+ 'EPS_NEXT_Q',
63
+ 'EPS_THIS_Y',
64
+ 'EPS_NEXT_Y',
65
+ 'EPS_PAST_5Y',
66
+ 'EPS_NEXT_5Y',
67
+ 'SALES_PAST_5Y',
68
+ 'SALES_Q/Q',
69
+ 'SALES_YOY_TTM',
70
+ 'EPS_Q/Q',
71
+ 'SALES',
72
+ 'INCOME',
73
+ 'EPS_SURPRISE',
74
+ 'REVENUE_SURPRISE',
75
+ 'OUTSTANDING',
76
+ 'VOLUME',
77
+ 'REL_VOLUME',
78
+ 'FLOAT',
79
+ 'FLOAT_%',
80
+ 'INSIDER_OWN',
81
+ 'INSIDER_TRANS',
82
+ 'INST_OWN',
83
+ 'INST_TRANS',
84
+ 'SHORT_FLOAT',
85
+ 'SHORT_RATIO',
86
+ 'SHORT_INTEREST',
87
+ 'ROA',
88
+ 'ROE',
89
+ 'ROIC',
90
+ 'CURR_R',
91
+ 'QUICK_R',
92
+ 'LTDEBT/EQ',
93
+ 'DEBT/EQ',
94
+ 'GROSS_M',
95
+ 'OPER_M',
96
+ 'PROFIT_M',
97
+ 'PERF_WEEK',
98
+ 'PERF_MONTH',
99
+ 'PERF_QUART',
100
+ 'PERF_HALF',
101
+ 'PERF_YEAR',
102
+ 'PERF_YTD',
103
+ 'BETA',
104
+ 'ATR',
105
+ 'VOLATILITY_W',
106
+ 'VOLATILITY_M',
107
+ 'SMA20',
108
+ 'SMA50',
109
+ 'SMA200',
110
+ 'RSI',
111
+ 'TARGET_PRICE',
112
+ 'BOOK/SH',
113
+ 'CASH/SH',
114
+ 'EMPLOYEES',
115
+ 'OPTIONABLE',
116
+ 'PREV_CLOSE',
117
+ 'SHORTABLE',
118
+ 'RECOM',
119
+ 'CHANGE',
120
+ 'DIVIDEND_TTM',
121
+ 'EPS_YOY_TTM',
122
+ 'IS_S&P500',
123
+ 'IS_RUSSELL',
124
+ 'IS_NASDAQ',
125
+ 'IS_DOW_JONES',
126
+ 'IS_AMC',
127
+ 'IS_BMO',
128
+ 'IS_USA',
129
+ 'DATADATE'
130
+ ]
File without changes
@@ -0,0 +1,4 @@
1
+ from earningspy.generators.finviz.main_func import (get_all_news, get_analyst_price_targets,
2
+ get_insider, get_news, get_stock)
3
+ from earningspy.generators.finviz.portfolio import Portfolio
4
+ from earningspy.generators.finviz.screener import Screener
@@ -0,0 +1,4 @@
1
+ connection_settings = dict(
2
+ CONCURRENT_CONNECTIONS=30,
3
+ CONNECTION_TIMEOUT=30000,
4
+ )
@@ -0,0 +1,225 @@
1
+ CUSTOM_TABLE_FIELDS_ON_URL = """&c=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,22,78,127,128,24,25,85,26,27,28,29,30,31,32,33,34,35,36,37,
2
+ 38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,57,58,59,62,63,64,65,66,67,68,69,73,74,76,77,79,80,81,82,83,84,120,130,131,132,133,134"""
3
+
4
+ FINVIZ_DROP_COLUMNS = ["Earnings", "52W Range", "Return% 1Y", "Index", "52W High", "52W Low"]
5
+
6
+
7
+ CUSTOM_TABLE_ALL_FIELDS_NEW = [
8
+ 'Ticker',
9
+ 'Company',
10
+ 'Sector',
11
+ 'Industry',
12
+ 'Country',
13
+ 'Market Cap',
14
+ 'P/E',
15
+ 'Fwd P/E',
16
+ 'PEG',
17
+ 'P/S',
18
+ 'P/B',
19
+ 'P/C',
20
+ 'P/FCF',
21
+ 'Dividend',
22
+ 'Payout Ratio',
23
+ 'EPS',
24
+ 'EPS next Q',
25
+ 'EPS This Y',
26
+ 'EPS Next Y',
27
+ 'EPS Past 5Y',
28
+ 'EPS Next 5Y',
29
+ 'Sales Past 5Y',
30
+ 'Sales Q/Q',
31
+ 'Sales YoY TTM',
32
+ 'EPS Q/Q',
33
+ 'Sales',
34
+ 'Income',
35
+ 'EPS Surprise',
36
+ 'Revenue Surprise',
37
+ 'Outstanding',
38
+ 'Float',
39
+ 'Float %',
40
+ 'Insider Own',
41
+ 'Insider Trans',
42
+ 'Inst Own',
43
+ 'Inst Trans',
44
+ 'Short Float',
45
+ 'Short Ratio',
46
+ 'Short Interest',
47
+ 'ROA',
48
+ 'ROE',
49
+ 'ROIC',
50
+ 'Curr R',
51
+ 'Quick R',
52
+ 'LTDebt/Eq',
53
+ 'Debt/Eq',
54
+ 'Gross M',
55
+ 'Oper M',
56
+ 'Profit M',
57
+ 'Perf Week',
58
+ 'Perf Month',
59
+ 'Perf Quart',
60
+ 'Perf Half',
61
+ 'Perf Year',
62
+ 'Perf YTD',
63
+ 'Beta',
64
+ 'ATR',
65
+ 'Volatility W',
66
+ 'Volatility M',
67
+ 'SMA20',
68
+ 'SMA50',
69
+ 'SMA200',
70
+ '52W High',
71
+ '52W Low',
72
+ 'RSI',
73
+ 'Earnings',
74
+ 'Target Price',
75
+ 'Book/sh',
76
+ 'Cash/sh',
77
+ 'Employees',
78
+ 'Index',
79
+ 'Optionable',
80
+ 'Prev Close',
81
+ 'Shortable',
82
+ 'Recom',
83
+ 'Avg Volume',
84
+ 'Rel Volume',
85
+ 'Volume',
86
+ 'Price',
87
+ 'Change',
88
+ 'Return% 1Y',
89
+ 'Dividend TTM',
90
+ 'Dividend Ex Date',
91
+ 'EPS YoY TTM',
92
+ '52W Range'
93
+ ]
94
+
95
+ POST_GENERATED_FIELDS = [
96
+ '52W_NORM',
97
+ 'LTDEBT/EQ',
98
+ 'DIVIDEND_YIELD_EST',
99
+ 'DIVIDEND_YIELD_TTM',
100
+ 'IS_S&P500',
101
+ 'IS_RUSSELL',
102
+ 'IS_NASDAQ',
103
+ 'IS_AMC',
104
+ 'IS_BMO',
105
+ 'DIVIDEND_EX-DATE',
106
+ 'IS_OPTIONABLE',
107
+ 'IS_SHORTABLE',
108
+ 'VOLATILITY_RANGE',
109
+ 'IS_USA',
110
+ 'DATADATE',
111
+ ]
112
+
113
+
114
+ MONEY_COLUMNS = [
115
+ 'Avg Volume',
116
+ 'Outstanding',
117
+ 'Market Cap',
118
+ 'Float',
119
+ 'Income',
120
+ 'Sales',
121
+ 'Short Interest',
122
+ 'Outstanding',
123
+ 'Float'
124
+ ]
125
+
126
+ PERCENTAJE_COLUMNS = [
127
+ 'Perf Week',
128
+ 'Perf Month',
129
+ 'Perf Quart',
130
+ 'Perf Year',
131
+ 'Perf YTD',
132
+ 'Volatility W',
133
+ 'Volatility M',
134
+ 'Change',
135
+ 'Insider Own',
136
+ 'EPS Next Y',
137
+ 'EPS This Y',
138
+ 'EPS Past 5Y',
139
+ 'EPS Next 5Y',
140
+ 'Sales Past 5Y',
141
+ 'Insider Trans',
142
+ 'Inst Own',
143
+ 'Perf Quart',
144
+ 'Inst Trans',
145
+ 'Perf Half',
146
+ 'ROA',
147
+ 'ROE',
148
+ 'ROIC',
149
+ '52W High',
150
+ 'Gross M',
151
+ '52W Low',
152
+ 'Sales Q/Q',
153
+ 'Oper M',
154
+ 'EPS Q/Q',
155
+ 'Profit M',
156
+ 'Payout Ratio',
157
+ 'SMA20',
158
+ 'SMA50',
159
+ 'SMA200',
160
+ 'Dividend',
161
+ 'Payout Ratio',
162
+ 'EPS Surprise',
163
+ 'Revenue Surprise',
164
+ 'Float %',
165
+ 'Oper M',
166
+ 'Profit M',
167
+ 'Short Float',
168
+ 'EPS YoY TTM',
169
+ 'Sales YoY TTM',
170
+ ]
171
+
172
+ NUMERIC_COLUMNS = [
173
+ 'Dividend TTM',
174
+ 'P/FCF',
175
+ 'Beta',
176
+ 'EPS YoY TTM',
177
+ 'ATR',
178
+ 'Employees',
179
+ 'Curr R',
180
+ 'Quick R',
181
+ 'RSI',
182
+ 'Debt/Eq',
183
+ 'LTDebt/Eq',
184
+ 'Recom',
185
+ 'Rel Volume',
186
+ 'Price',
187
+ 'Volume',
188
+ 'P/E',
189
+ 'Fwd P/E',
190
+ 'PEG',
191
+ 'P/S',
192
+ 'Book/sh',
193
+ 'P/B',
194
+ 'Target Price',
195
+ 'Cash/sh',
196
+ 'P/C',
197
+ 'EPS next Q',
198
+ 'Fwd P/E',
199
+ 'EPS',
200
+ 'Short Ratio',
201
+ 'Short Interest',
202
+ 'RSI',
203
+ 'Avg Volume',
204
+ 'Return% 1Y',
205
+ 'Outstanding',
206
+ 'Float',
207
+ 'ATR',
208
+ 'Prev Close',
209
+ ]
210
+
211
+ BOOLEAN_COLUMNS = [
212
+ 'Optionable',
213
+ 'Shortable'
214
+ ]
215
+
216
+ TICKER_KEY = 'Ticker'
217
+ VALID_SCOPES_EARNING_SCOPES = [
218
+ 'last_week',
219
+ 'this_week',
220
+ 'next_week',
221
+ 'today_bmo',
222
+ 'yesterday_amc',
223
+ 'today',
224
+ 'this_month'
225
+ ]