from openbb_terminal.core.session.current_system import set_system_variable # Suppressing sdk logs set_system_variable("LOGGING_SUPPRESS", True) # Import the OpenBB SDK # pylint: disable=wrong-import-position from openbb_terminal.sdk import openbb # noqa: E402 INTERVAL_OPTS = [ "5m", "15m", "30m", "1d", "5d", "1wk", "1mo", "3mo", ] STOCKS_ROWS = [ "sector", "market_cap", "beta", "year_high", "year_low", "floatShares", "sharesShort", "exDividendDate", ] STOCKS_VIEWS = { "Raw Data": lambda x, y: x, "Percent Change": lambda x, y: x.pct_change(), "Rolling Average": lambda x, y: x.rolling(y).mean(), "Rolling Variance": lambda x, y: x.rolling(y).var(), "Rolling Standard Deviation": lambda x, y: x.rolling(y).var() ** 0.5, "Rolling Coefficient of Variation": lambda x, y: (x.rolling(y).var() ** 0.5) / (x.rolling(y).mean()), } STOCKS_CLEAN_ROW = { "sector": "Sector", "market_cap": "M Cap", "beta": "Beta", "year_high": "52W High", "year_low": "52W Low", "floatShares": "Floats", "sharesShort": "Shorts", "exDividendDate": "Ex-Div", } # pylint: disable=E1101 FORECAST_MODEL_OPTS = { "expo": openbb.forecast.expo, # type: ignore "theta": openbb.forecast.theta, # type: ignore "linregr": openbb.forecast.linregr, # type: ignore "regr": openbb.forecast.regr, # type: ignore "rnn": openbb.forecast.rnn, # type: ignore "brnn": openbb.forecast.brnn, # type: ignore "nbeats": openbb.forecast.nbeats, # type: ignore "tcn": openbb.forecast.tcn, # type: ignore "trans": openbb.forecast.trans, # type: ignore "tft": openbb.forecast.tft, # type: ignore } FORECAST_FEAT_ENGS = { "ema": openbb.forecast.ema, # type: ignore "sto": openbb.forecast.sto, # type: ignore "rsi": openbb.forecast.rsi, # type: ignore "roc": openbb.forecast.roc, # type: ignore "mom": openbb.forecast.mom, # type: ignore "atr": openbb.forecast.atr, # type: ignore "delta": openbb.forecast.delta, # type: ignore "signal": openbb.forecast.signal, # type: ignore } # pylint: enable=E1101 PLOTLY_MODEBAR = """ """ PLOTLY_CONFIG = { "modeBarButtonsToRemove": ["lasso2d", "select2d"], "modeBarButtons": [ ["toImage"], [ "drawline", "drawopenpath", "drawcircle", "drawrect", "eraseshape", ], ["zoomIn2d", "zoomOut2d", "autoScale2d", "zoom2d", "pan2d"], ], }