sovai 0.2.12__tar.gz → 0.2.13__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.12 → sovai-0.2.13}/PKG-INFO +1 -1
- {sovai-0.2.12 → sovai-0.2.13}/pyproject.toml +1 -1
- {sovai-0.2.12 → sovai-0.2.13}/sovai/get_data.py +3 -2
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/breakout/breakout_plots.py +70 -14
- {sovai-0.2.12 → sovai-0.2.13}/sovai/tools/sec/sec_edgar_search.py +1 -1
- {sovai-0.2.12 → sovai-0.2.13}/LICENSE +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/README.md +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/api_config.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/assets/dropdown.css +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/assets/features_mapping.parq +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/basic_auth.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/computations/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/computations/functions.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/errors/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/errors/sovai_errors.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/anomalies.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/change_point_generator.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/clustering.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/core_kshape.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/cum_sum_torch.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/cusum.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/dimensionality_reduction.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/feature_extraction.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/feature_importance.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/feature_neutralizer.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/fractional_differencing.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/nowcasting.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/pairwise.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/pandas_extensions.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/parallel_functions.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/pfa_feature_selector.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/regime_change.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/regime_change_pca.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/shapley_global_importance.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/shapley_importance.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/signal_evaluation.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/technical_indicators.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/time_decomposition.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/extensions/weight_optimization.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/get_compute.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/get_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/get_reports.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/get_tools.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/accounting/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/accounting/accounting_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/allocation/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/allocation/allocation_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/bankruptcy/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/bankruptcy/bankruptcy_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/breakout/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/corp_risk/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/corp_risk/corp_risk_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/earnings_surprise/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/earnings_surprise/earnings_surprise_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/insider/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/insider/insider_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/institutional/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/institutional/institutional_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/news/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/news/news_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/ratios/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/plots/ratios/ratios_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/accounting/__inti__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/accounting/accounting_balance_sheet.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/bankruptcy/__inti__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/bankruptcy/bankruptcy_monthly_top.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/general/__inti__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/general/general_plots.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/news/__inti__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/reports/news/news_econometric_analysis.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/studies/nowcasting.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/token_auth.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/tools/sec/__inti__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/tools/sec/sec_10_k_8_k_filings.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/__init__.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/client_side.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/converter.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/datetime_formats.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/file_management.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/get_tickers.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/helpers.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/pandas_extensions copy.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/plot.py +0 -0
- {sovai-0.2.12 → sovai-0.2.13}/sovai/utils/stream.py +0 -0
|
@@ -450,6 +450,7 @@ def data(
|
|
|
450
450
|
|
|
451
451
|
data_format = res.headers.get("X-Data-Format")
|
|
452
452
|
content_type = res.headers["content-type"]
|
|
453
|
+
# print(content_type)
|
|
453
454
|
|
|
454
455
|
if content_type == "application/octet-stream":
|
|
455
456
|
if data_format == "pyarrow":
|
|
@@ -480,9 +481,9 @@ def data(
|
|
|
480
481
|
verbose_mode.vprint("It reached the DF")
|
|
481
482
|
try:
|
|
482
483
|
from sovai.extensions.pandas_extensions import CustomDataFrame
|
|
483
|
-
data = CustomDataFrame(
|
|
484
|
+
data = CustomDataFrame(convert_data2df(res.json()))
|
|
484
485
|
except ImportError:
|
|
485
|
-
data = pd.DataFrame(
|
|
486
|
+
data = pd.DataFrame(convert_data2df(res.json()))
|
|
486
487
|
|
|
487
488
|
_query_cache[cache_key] = data
|
|
488
489
|
|
|
@@ -159,7 +159,7 @@ def get_predict_breakout_plot_for_ticker(msft_df=None):
|
|
|
159
159
|
)
|
|
160
160
|
|
|
161
161
|
fig.update_layout(
|
|
162
|
-
title_text="Predictions with Confidence Interval",
|
|
162
|
+
# title_text="Predictions with Confidence Interval",
|
|
163
163
|
xaxis_title="Date",
|
|
164
164
|
yaxis_title="Prediction",
|
|
165
165
|
)
|
|
@@ -248,7 +248,7 @@ def get_predict_breakout_plot_for_ticker(msft_df=None):
|
|
|
248
248
|
margin=dict(
|
|
249
249
|
l=20, r=20, t=60, b=20
|
|
250
250
|
), # Adjust the margins (left, right, top, bottom)
|
|
251
|
-
title_text="Predictions with Confidence Interval and 15% Return Indicators",
|
|
251
|
+
# title_text="Predictions with Confidence Interval and 15% Return Indicators",
|
|
252
252
|
xaxis_title="Date",
|
|
253
253
|
yaxis_title="Prediction",
|
|
254
254
|
legend=dict(
|
|
@@ -256,7 +256,7 @@ def get_predict_breakout_plot_for_ticker(msft_df=None):
|
|
|
256
256
|
yanchor="bottom", # Anchor the legend to the bottom
|
|
257
257
|
y=1.12, # Adjust the y position
|
|
258
258
|
xanchor="center", # Anchor the legend to the center
|
|
259
|
-
x=0.
|
|
259
|
+
x=0.5, # Adjust the x position
|
|
260
260
|
),
|
|
261
261
|
)
|
|
262
262
|
|
|
@@ -543,22 +543,78 @@ def preprocess_data_for_plots(df, window=60):
|
|
|
543
543
|
return df
|
|
544
544
|
|
|
545
545
|
|
|
546
|
-
|
|
546
|
+
import dash
|
|
547
|
+
from dash import dcc, html
|
|
548
|
+
from dash.dependencies import Input, Output
|
|
549
|
+
import plotly.graph_objs as go
|
|
550
|
+
import pandas as pd
|
|
551
|
+
import numpy as np
|
|
552
|
+
|
|
553
|
+
def create_dash_app(df):
|
|
554
|
+
app = dash.Dash(__name__)
|
|
555
|
+
|
|
547
556
|
df = df.reset_index(drop=False)
|
|
548
557
|
df = preprocess_data_for_plots(df)
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
558
|
+
|
|
559
|
+
# Define dark theme colors
|
|
560
|
+
dark_theme = {
|
|
561
|
+
'background': '#111111',
|
|
562
|
+
'text': '#7FDBFF'
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
app.layout = html.Div(style={'backgroundColor': dark_theme['background'], 'color': dark_theme['text']}, children=[
|
|
566
|
+
dcc.Dropdown(
|
|
567
|
+
id='plot-type-dropdown',
|
|
568
|
+
options=[
|
|
569
|
+
{'label': 'Rolling Accuracy', 'value': 'Rolling Accuracy'},
|
|
570
|
+
{'label': 'Rolling Correlation', 'value': 'Rolling Correlation'}
|
|
571
|
+
],
|
|
572
|
+
value='Rolling Accuracy',
|
|
573
|
+
style={
|
|
574
|
+
'backgroundColor': 'white',
|
|
575
|
+
'color': 'black',
|
|
576
|
+
'margin-bottom': '10px' # Add some space between dropdown and graph
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
dcc.Graph(id='interactive-plot')
|
|
580
|
+
])
|
|
581
|
+
|
|
582
|
+
@app.callback(
|
|
583
|
+
Output('interactive-plot', 'figure'),
|
|
584
|
+
Input('plot-type-dropdown', 'value')
|
|
554
585
|
)
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
if plot_type == "Rolling Accuracy":
|
|
586
|
+
def update_plot(plot_type):
|
|
587
|
+
if plot_type == 'Rolling Accuracy':
|
|
558
588
|
return get_rolling_accuracy_plot(df)
|
|
559
589
|
else:
|
|
560
590
|
return get_rolling_correlation_plot(df)
|
|
591
|
+
|
|
592
|
+
return app
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
def interactive_plot_display_breakout_accuracy(df=None):
|
|
596
|
+
# Assuming you have your DataFrame 'df' ready
|
|
597
|
+
app = create_dash_app(df)
|
|
598
|
+
|
|
599
|
+
return app.run_server(debug=False)
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
# def interactive_plot_display_breakout_accuracy(df=None):
|
|
603
|
+
# df = df.reset_index(drop=False)
|
|
604
|
+
# df = preprocess_data_for_plots(df)
|
|
605
|
+
|
|
606
|
+
# dropdown = widgets.Dropdown(
|
|
607
|
+
# options=["Rolling Accuracy", "Rolling Correlation"],
|
|
608
|
+
# value="Rolling Accuracy",
|
|
609
|
+
# description="Plot Type:",
|
|
610
|
+
# )
|
|
611
|
+
|
|
612
|
+
# def display_plot(plot_type):
|
|
613
|
+
# if plot_type == "Rolling Accuracy":
|
|
614
|
+
# return get_rolling_accuracy_plot(df)
|
|
615
|
+
# else:
|
|
616
|
+
# return get_rolling_correlation_plot(df)
|
|
561
617
|
|
|
562
|
-
|
|
618
|
+
# interactive_plot = widgets.interactive_output(display_plot, {'plot_type': dropdown})
|
|
563
619
|
|
|
564
|
-
|
|
620
|
+
# display(widgets.VBox([dropdown, interactive_plot]))
|
|
@@ -38,7 +38,7 @@ def edgar_search_report(search_query="CFO Resignation"):
|
|
|
38
38
|
</style>
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
|
-
display(HTML(custom_css))
|
|
41
|
+
# display(HTML(custom_css))
|
|
42
42
|
|
|
43
43
|
# Create widgets
|
|
44
44
|
search_keywords = widgets.Text(description='Search Keywords:', value=search_query, style={'description_width': 'initial'})
|
|
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
|