sovai 0.2.8__tar.gz → 0.2.10__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.
- {sovai-0.2.8 → sovai-0.2.10}/PKG-INFO +3 -3
- {sovai-0.2.8 → sovai-0.2.10}/pyproject.toml +3 -5
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/client_side.py +77 -4
- {sovai-0.2.8 → sovai-0.2.10}/LICENSE +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/README.md +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/api_config.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/assets/dropdown.css +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/assets/features_mapping.parq +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/basic_auth.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/computations/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/computations/functions.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/errors/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/errors/sovai_errors.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/anomalies.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/change_point_generator.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/clustering.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/core_kshape.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/cum_sum_torch.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/cusum.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/dimensionality_reduction.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/feature_extraction.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/feature_importance.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/feature_neutralizer.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/fractional_differencing.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/nowcasting.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/pairwise.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/pandas_extensions.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/parallel_functions.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/pfa_feature_selector.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/regime_change.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/regime_change_pca.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/shapley_global_importance.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/shapley_importance.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/signal_evaluation.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/technical_indicators.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/time_decomposition.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/extensions/weight_optimization.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/get_compute.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/get_data.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/get_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/get_reports.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/get_tools.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/accounting/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/accounting/accounting_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/allocation/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/allocation/allocation_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/bankruptcy/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/bankruptcy/bankruptcy_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/breakout/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/breakout/breakout_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/corp_risk/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/corp_risk/corp_risk_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/earnings_surprise/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/earnings_surprise/earnings_surprise_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/insider/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/insider/insider_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/institutional/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/institutional/institutional_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/news/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/news/news_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/ratios/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/plots/ratios/ratios_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/accounting/__inti__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/accounting/accounting_balance_sheet.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/bankruptcy/__inti__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/bankruptcy/bankruptcy_monthly_top.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/general/__inti__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/general/general_plots.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/news/__inti__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/reports/news/news_econometric_analysis.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/studies/nowcasting.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/token_auth.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/tools/sec/__inti__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/tools/sec/sec_10_k_8_k_filings.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/tools/sec/sec_edgar_search.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/__init__.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/converter.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/datetime_formats.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/file_management.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/get_tickers.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/helpers.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/pandas_extensions copy.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/plot.py +0 -0
- {sovai-0.2.8 → sovai-0.2.10}/sovai/utils/stream.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sovai
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: python for asset management
|
|
5
5
|
License: Proprietary License
|
|
6
6
|
Author: Derek Snow
|
|
@@ -12,12 +12,12 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Provides-Extra: full
|
|
15
|
-
Requires-Dist: boto3 (>=1.20)
|
|
15
|
+
Requires-Dist: boto3 (>=1.20)
|
|
16
16
|
Requires-Dist: dash (>=2.0) ; extra == "full"
|
|
17
17
|
Requires-Dist: dash-bootstrap-components (>=1.6.0) ; extra == "full"
|
|
18
18
|
Requires-Dist: great-tables (>=0.9) ; extra == "full"
|
|
19
19
|
Requires-Dist: ipywidgets (>=8.1.3) ; extra == "full"
|
|
20
|
-
Requires-Dist: joblib (>=1.0)
|
|
20
|
+
Requires-Dist: joblib (>=1.0)
|
|
21
21
|
Requires-Dist: lightgbm (>=4.5.0) ; extra == "full"
|
|
22
22
|
Requires-Dist: matplotlib (>=3.0) ; extra == "full"
|
|
23
23
|
Requires-Dist: mfles (>=0.2) ; extra == "full"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "sovai"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.10"
|
|
4
4
|
description = "python for asset management"
|
|
5
5
|
authors = ["Derek Snow <d.snow@outlook.com>"]
|
|
6
6
|
license = "Proprietary License"
|
|
@@ -38,13 +38,13 @@ requests = ">=2.20"
|
|
|
38
38
|
python-dateutil = ">=2.8"
|
|
39
39
|
python-dotenv = ">=0.10"
|
|
40
40
|
polars = ">=0.20.30"
|
|
41
|
+
boto3 = ">=1.20"
|
|
42
|
+
joblib = ">=1.0"
|
|
41
43
|
scipy = {version = ">=1.0", optional = true}
|
|
42
|
-
joblib = {version = ">=1.0", optional = true}
|
|
43
44
|
matplotlib = {version = ">=3.0", optional = true}
|
|
44
45
|
plotly = {version = ">=5.0", optional = true}
|
|
45
46
|
scikit-learn = {version = ">=1.0", optional = true}
|
|
46
47
|
numba = {version = ">=0.50", optional = true}
|
|
47
|
-
boto3 = {version = ">=1.20", optional = true}
|
|
48
48
|
dash = {version = ">=2.0", optional = true}
|
|
49
49
|
great-tables = {version = ">=0.9", optional = true}
|
|
50
50
|
ruptures = {version = ">=1.0", optional = true}
|
|
@@ -63,12 +63,10 @@ dash-bootstrap-components = {version = ">=1.6.0", optional = true}
|
|
|
63
63
|
[tool.poetry.extras]
|
|
64
64
|
full = [
|
|
65
65
|
"scipy",
|
|
66
|
-
"joblib",
|
|
67
66
|
"matplotlib",
|
|
68
67
|
"plotly",
|
|
69
68
|
"scikit-learn",
|
|
70
69
|
"numba",
|
|
71
|
-
"boto3",
|
|
72
70
|
"dash",
|
|
73
71
|
"great-tables",
|
|
74
72
|
"ruptures",
|
|
@@ -2,12 +2,20 @@ import pandas as pd
|
|
|
2
2
|
from concurrent.futures import ThreadPoolExecutor
|
|
3
3
|
from urllib.parse import quote
|
|
4
4
|
import datetime
|
|
5
|
-
from sovai.extensions.pandas_extensions import CustomDataFrame
|
|
6
5
|
from sovai.errors.sovai_errors import InvalidCredentialsError
|
|
7
6
|
|
|
8
7
|
import requests
|
|
9
8
|
from sovai.api_config import ApiConfig
|
|
10
9
|
|
|
10
|
+
# Try to import CustomDataFrame, use regular DataFrame if not available
|
|
11
|
+
try:
|
|
12
|
+
from sovai.extensions.pandas_extensions import CustomDataFrame
|
|
13
|
+
HAS_CUSTOM_DATAFRAME = True
|
|
14
|
+
except ImportError:
|
|
15
|
+
HAS_CUSTOM_DATAFRAME = False
|
|
16
|
+
CustomDataFrame = pd.DataFrame # Fallback to regular DataFrame
|
|
17
|
+
|
|
18
|
+
|
|
11
19
|
def verify_token(verbose=False):
|
|
12
20
|
url = f"{ApiConfig.base_url}/verify/token/{ApiConfig.token}" # Updated endpoint
|
|
13
21
|
try:
|
|
@@ -122,12 +130,12 @@ def load_data_for_tickers(
|
|
|
122
130
|
return combined_df.sort_index()
|
|
123
131
|
|
|
124
132
|
|
|
125
|
-
def client_side_frame(endpoint, tickers, columns, start_date, end_date):
|
|
126
133
|
|
|
134
|
+
|
|
135
|
+
def client_side_frame(endpoint, tickers, columns, start_date, end_date):
|
|
127
136
|
is_valid, user_id = verify_token(verbose=False)
|
|
128
137
|
|
|
129
138
|
if not is_valid:
|
|
130
|
-
# print('invalid')
|
|
131
139
|
raise InvalidCredentialsError("Invalid or expired token. Please authenticate.")
|
|
132
140
|
|
|
133
141
|
endpoint_config = {
|
|
@@ -180,4 +188,69 @@ def client_side_frame(endpoint, tickers, columns, start_date, end_date):
|
|
|
180
188
|
df_percentiles = load_data_for_tickers(
|
|
181
189
|
base_url, tickers, columns, start_date, end_date, name_file, partitioned
|
|
182
190
|
)
|
|
183
|
-
|
|
191
|
+
|
|
192
|
+
if HAS_CUSTOM_DATAFRAME:
|
|
193
|
+
return CustomDataFrame(df_percentiles)
|
|
194
|
+
else:
|
|
195
|
+
return df_percentiles # Returns a regular pandas DataFrame if CustomDataFrame is not available
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
# def client_side_frame(endpoint, tickers, columns, start_date, end_date):
|
|
199
|
+
|
|
200
|
+
# is_valid, user_id = verify_token(verbose=False)
|
|
201
|
+
|
|
202
|
+
# if not is_valid:
|
|
203
|
+
# # print('invalid')
|
|
204
|
+
# raise InvalidCredentialsError("Invalid or expired token. Please authenticate.")
|
|
205
|
+
|
|
206
|
+
# endpoint_config = {
|
|
207
|
+
# "ratios/relative": {
|
|
208
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-accounting/processed/ratios_percentile_weekly.parq",
|
|
209
|
+
# "name": "ratios_percentile_weekly_0.parquet",
|
|
210
|
+
# "partitioned": False,
|
|
211
|
+
# },
|
|
212
|
+
# "market/prices": {
|
|
213
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-accounting/prices.parq",
|
|
214
|
+
# "name": "prices_0.parquet",
|
|
215
|
+
# "partitioned": False,
|
|
216
|
+
# },
|
|
217
|
+
# "market/closeadj": {
|
|
218
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-accounting/prices_closeadj.parq",
|
|
219
|
+
# "name": "prices_closeadj_0.parquet",
|
|
220
|
+
# "partitioned": False,
|
|
221
|
+
# },
|
|
222
|
+
# "complaints/public": {
|
|
223
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-complaints/processed/consumer_complaint_public.parq",
|
|
224
|
+
# "name": "consumer_complaint_0.parquet",
|
|
225
|
+
# "partitioned": False,
|
|
226
|
+
# },
|
|
227
|
+
# "complaints/private": {
|
|
228
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-complaints/processed/consumer_complaint_private.parq",
|
|
229
|
+
# "name": "consumer_complaint_0.parquet",
|
|
230
|
+
# "partitioned": False,
|
|
231
|
+
# },
|
|
232
|
+
# "lobbying/public": {
|
|
233
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-lobbying/processed/lobbying_public.parq",
|
|
234
|
+
# "name": "lobbying_public_0.parquet",
|
|
235
|
+
# "partitioned": True,
|
|
236
|
+
# },
|
|
237
|
+
# "short/volume": {
|
|
238
|
+
# "url": "https://storage.googleapis.com/sovai-partitioned/sovai-short/processed/short_volume_weekly.parq",
|
|
239
|
+
# "name": "short_volume_weekly_0.parquet",
|
|
240
|
+
# "partitioned": True,
|
|
241
|
+
# },
|
|
242
|
+
# }
|
|
243
|
+
|
|
244
|
+
# if endpoint not in endpoint_config:
|
|
245
|
+
# raise ValueError(f"Invalid endpoint: {endpoint}")
|
|
246
|
+
|
|
247
|
+
# config = endpoint_config[endpoint]
|
|
248
|
+
# base_url = config["url"]
|
|
249
|
+
# name_file = config["name"]
|
|
250
|
+
# partitioned = config["partitioned"]
|
|
251
|
+
|
|
252
|
+
# # Load data
|
|
253
|
+
# df_percentiles = load_data_for_tickers(
|
|
254
|
+
# base_url, tickers, columns, start_date, end_date, name_file, partitioned
|
|
255
|
+
# )
|
|
256
|
+
# return CustomDataFrame(df_percentiles)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|