mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 04:52:07 +00:00
standardize and update api defaults + report (#3271)
Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@ def get_autoets_data(
|
||||
data: Union[pd.Series, pd.DataFrame],
|
||||
target_column: str = "close",
|
||||
seasonal_periods: int = 7,
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
start_window: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
) -> Tuple[list[np.ndarray], List[np.ndarray], List[np.ndarray], Optional[float], Any]:
|
||||
|
||||
@@ -22,7 +22,7 @@ def display_autoets_forecast(
|
||||
target_column: str = "close",
|
||||
dataset_name: str = "",
|
||||
seasonal_periods: int = 7,
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
start_window: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
export: str = "",
|
||||
|
||||
@@ -37,7 +37,7 @@ def get_expo_data(
|
||||
seasonal: str = "A",
|
||||
seasonal_periods: int = 7,
|
||||
dampen: str = "F",
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
start_window: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], Optional[float], Any]:
|
||||
|
||||
@@ -25,7 +25,7 @@ def display_expo_forecast(
|
||||
seasonal: str = "A",
|
||||
seasonal_periods: int = 7,
|
||||
dampen: str = "F",
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
start_window: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
export: str = "",
|
||||
|
||||
@@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
|
||||
def get_tft_data(
|
||||
data: Union[pd.Series, pd.DataFrame],
|
||||
target_column: str = "close",
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
past_covariates: str = None,
|
||||
train_split: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
|
||||
@@ -21,7 +21,7 @@ def display_tft_forecast(
|
||||
data: Union[pd.Series, pd.DataFrame],
|
||||
target_column: str = "close",
|
||||
dataset_name: str = "",
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
past_covariates: str = None,
|
||||
train_split: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
|
||||
@@ -31,7 +31,7 @@ def get_theta_data(
|
||||
target_column: str = "close",
|
||||
seasonal: str = "M",
|
||||
seasonal_periods: int = 7,
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
start_window: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
) -> Tuple[List[TimeSeries], List[TimeSeries], List[TimeSeries], float, float, Any]:
|
||||
|
||||
@@ -24,7 +24,7 @@ def display_theta_forecast(
|
||||
dataset_name: str = "",
|
||||
seasonal: str = "M",
|
||||
seasonal_periods: int = 7,
|
||||
n_predict: int = 30,
|
||||
n_predict: int = 5,
|
||||
start_window: float = 0.85,
|
||||
forecast_horizon: int = 5,
|
||||
export: str = "",
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"tft_chart = get_image(openbb.forecast.tft, None, ticker_data, train_split=0.5)"
|
||||
"rnn_chart = get_image(openbb.forecast.rnn, None, ticker_data, chart=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -251,7 +251,7 @@
|
||||
"htmlcode += widgets.row([widgets.h(3, \"Analyzing the data\")])\n",
|
||||
"htmlcode += widgets.row([corr_chart, season_chart])\n",
|
||||
"htmlcode += widgets.row([widgets.h(3, \"Creating predictions\")])\n",
|
||||
"htmlcode += widgets.row([expo_chart, tft_chart])\n",
|
||||
"htmlcode += widgets.row([expo_chart, rnn_chart])\n",
|
||||
"\n",
|
||||
"body += widgets.add_tab(\"SUMMARY\", htmlcode)\n",
|
||||
"body += widgets.tab_clickable_and_save_evt()\n",
|
||||
|
||||
8
website/content/SDK/forecast/expo/_index.md
vendored
8
website/content/SDK/forecast/expo/_index.md
vendored
@@ -1,7 +1,7 @@
|
||||
To obtain charts, make sure to add `chart=True` as the last parameter
|
||||
|
||||
## Get underlying data
|
||||
### forecast.expo(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', trend: str = 'A', seasonal: str = 'A', seasonal_periods: int = 7, dampen: str = 'F', n_predict: int = 30, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[list[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any]
|
||||
## Get underlying data
|
||||
### forecast.expo(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', trend: str = 'A', seasonal: str = 'A', seasonal_periods: int = 7, dampen: str = 'F', n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[list[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any]
|
||||
|
||||
Performs Probabilistic Exponential Smoothing forecasting
|
||||
This is a wrapper around statsmodels Holt-Winters' Exponential Smoothing;
|
||||
@@ -46,8 +46,8 @@ Performs Probabilistic Exponential Smoothing forecasting
|
||||
Any
|
||||
Fit Prob. Expo model object.
|
||||
|
||||
## Getting charts
|
||||
### forecast.expo(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', trend: str = 'A', seasonal: str = 'A', seasonal_periods: int = 7, dampen: str = 'F', n_predict: int = 30, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True)
|
||||
## Getting charts
|
||||
### forecast.expo(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', trend: str = 'A', seasonal: str = 'A', seasonal_periods: int = 7, dampen: str = 'F', n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True)
|
||||
|
||||
Display Probabilistic Exponential Smoothing forecast
|
||||
|
||||
|
||||
8
website/content/SDK/forecast/tft/_index.md
vendored
8
website/content/SDK/forecast/tft/_index.md
vendored
@@ -1,7 +1,7 @@
|
||||
To obtain charts, make sure to add `chart=True` as the last parameter
|
||||
|
||||
## Get underlying data
|
||||
### forecast.tft(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 30, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, hidden_size: int = 16, lstm_layers: int = 1, num_attention_heads: int = 4, full_attention: bool = False, dropout: float = 0.1, hidden_continuous_size: int = 8, n_epochs: int = 200, batch_size: int = 32, model_save_name: str = 'tft_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any]
|
||||
## Get underlying data
|
||||
### forecast.tft(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, hidden_size: int = 16, lstm_layers: int = 1, num_attention_heads: int = 4, full_attention: bool = False, dropout: float = 0.1, hidden_continuous_size: int = 8, n_epochs: int = 200, batch_size: int = 32, model_save_name: str = 'tft_model', force_reset: bool = True, save_checkpoints: bool = True) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], Optional[float], Any]
|
||||
|
||||
Performs Temporal Fusion Transformer forecasting
|
||||
The TFT applies multi-head attention queries on future inputs from mandatory future_covariates.
|
||||
@@ -70,8 +70,8 @@ Performs Temporal Fusion Transformer forecasting
|
||||
Any
|
||||
Fit Prob. TFT model object.
|
||||
|
||||
## Getting charts
|
||||
### forecast.tft(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 30, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, hidden_size: int = 16, lstm_layers: int = 1, num_attention_heads: int = 4, full_attention: bool = False, dropout: float = 0.1, hidden_continuous_size: int = 8, n_epochs: int = 200, batch_size: int = 32, model_save_name: str = 'tft_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True)
|
||||
## Getting charts
|
||||
### forecast.tft(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', dataset_name: str = '', n_predict: int = 5, past_covariates: str = None, train_split: float = 0.85, forecast_horizon: int = 5, input_chunk_length: int = 14, output_chunk_length: int = 5, hidden_size: int = 16, lstm_layers: int = 1, num_attention_heads: int = 4, full_attention: bool = False, dropout: float = 0.1, hidden_continuous_size: int = 8, n_epochs: int = 200, batch_size: int = 32, model_save_name: str = 'tft_model', force_reset: bool = True, save_checkpoints: bool = True, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True)
|
||||
|
||||
Display Temporal Fusion Transformer forecast
|
||||
|
||||
|
||||
8
website/content/SDK/forecast/theta/_index.md
vendored
8
website/content/SDK/forecast/theta/_index.md
vendored
@@ -1,7 +1,7 @@
|
||||
To obtain charts, make sure to add `chart=True` as the last parameter
|
||||
|
||||
## Get underlying data
|
||||
### forecast.theta(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', seasonal: str = 'M', seasonal_periods: int = 7, n_predict: int = 30, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, float, Any]
|
||||
## Get underlying data
|
||||
### forecast.theta(data: Union[pandas.core.series.Series, pandas.core.frame.DataFrame], target_column: str = 'close', seasonal: str = 'M', seasonal_periods: int = 7, n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5) -> Tuple[List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], List[darts.timeseries.TimeSeries], float, float, Any]
|
||||
|
||||
Performs Theta forecasting
|
||||
An implementation of the 4Theta method with configurable theta parameter.
|
||||
@@ -42,8 +42,8 @@ Performs Theta forecasting
|
||||
Any
|
||||
Theta Model
|
||||
|
||||
## Getting charts
|
||||
### forecast.theta(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', seasonal: str = 'M', seasonal_periods: int = 7, n_predict: int = 30, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True)
|
||||
## Getting charts
|
||||
### forecast.theta(data: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], target_column: str = 'close', dataset_name: str = '', seasonal: str = 'M', seasonal_periods: int = 7, n_predict: int = 5, start_window: float = 0.85, forecast_horizon: int = 5, export: str = '', residuals: bool = False, forecast_only: bool = False, start_date: Optional[datetime.datetime] = None, end_date: Optional[datetime.datetime] = None, naive: bool = False, export_pred_raw: bool = False, external_axes: Optional[List[axes]] = None, chart=True)
|
||||
|
||||
Display Theta forecast
|
||||
|
||||
|
||||
Reference in New Issue
Block a user