mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-24 02:02:32 +00:00
OBBject properly
This commit is contained in:
2
openbb_sdk/extensions/charting/README.md
vendored
2
openbb_sdk/extensions/charting/README.md
vendored
@@ -43,7 +43,7 @@ from openbb import obb
|
||||
stock_data = obb.stocks.load(symbol="TSLA", chart=True)
|
||||
```
|
||||
|
||||
This results in a `Obbject` object containing a `chart` attribute, which contains Plotly JSON data.
|
||||
This results in a `OBBject` object containing a `chart` attribute, which contains Plotly JSON data.
|
||||
|
||||
In order to display the chart, you need to call the `show()` method:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
@@ -19,6 +19,6 @@ def load(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Crypto Intraday Price."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
@@ -21,9 +21,9 @@ router = Router(prefix="")
|
||||
@router.command
|
||||
def corecpi(
|
||||
cc: CommandContext, provider_choices: ProviderChoices
|
||||
) -> Obbject[Empty]: # type: ignore
|
||||
) -> OBBject[Empty]: # type: ignore
|
||||
"""CORECPI."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="MajorIndicesConstituents")
|
||||
@@ -32,9 +32,9 @@ def const(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Get the constituents of an index."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="CPI")
|
||||
@@ -43,17 +43,17 @@ def cpi(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""CPI."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def cpi_options(
|
||||
cc: CommandContext, provider_choices: ProviderChoices
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""Get the options for v3 cpi(options=True)"""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="MajorIndicesEOD")
|
||||
@@ -62,9 +62,9 @@ def index(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Get OHLCV data for an index."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="AvailableIndices")
|
||||
@@ -73,9 +73,9 @@ def available_indices(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""AVAILABLE_INDICES."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="RiskPremium")
|
||||
@@ -84,249 +84,249 @@ def risk(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Market Risk Premium."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def macro(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]: # type: ignore
|
||||
) -> OBBject[Empty]: # type: ignore
|
||||
"""Query EconDB for macro data."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def macro_countries(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""MACRO_COUNTRIES."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def macro_parameters(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""MACRO_PARAMETERS."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def balance(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""BALANCE."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def bigmac(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""BIGMAC."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def country_codes(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""COUNTRY_CODES."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def currencies(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""CURRENCIES."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def debt(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""DEBT."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def events(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""EVENTS."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def fgdp(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""FGDP."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def fred(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""FRED."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def fred_search(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""FRED Search (was fred_notes)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def futures(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""FUTURES. 2 sources"""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def gdp(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""GDP."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def glbonds(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""GLBONDS."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def indices(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""INDICES."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def overview(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""OVERVIEW."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def perfmap(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""PERFMAP."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def performance(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""PERFORMANCE."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def revenue(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""REVENUE."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def rgdp(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""RGDP."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def rtps(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""RTPS."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def search_index(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""SEARCH_INDEX."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def spending(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""SPENDING."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def trust(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""TRUST."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def usbonds(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""USBONDS."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def valuation(
|
||||
cc: CommandContext,
|
||||
provider_choices: ProviderChoices,
|
||||
) -> Obbject[Empty]:
|
||||
) -> OBBject[Empty]:
|
||||
"""VALUATION."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# pylint: disable=W0613:unused-argument
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
@@ -21,12 +21,12 @@ def treasury(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Get treasury rates."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def ycrv() -> Obbject[Empty]: # type: ignore
|
||||
def ycrv() -> OBBject[Empty]: # type: ignore
|
||||
"""Yield curve."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
@@ -19,9 +19,9 @@ def pairs(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Forex Available Pairs."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@@ -31,6 +31,6 @@ def load(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Forex Intraday Price."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"""News Router."""
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
@@ -22,12 +22,12 @@ def globalnews(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Global News."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def sectornews() -> Obbject[Empty]: # type: ignore
|
||||
def sectornews() -> OBBject[Empty]: # type: ignore
|
||||
"""Sector news."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -4,7 +4,7 @@ import numpy as np
|
||||
import pandas as pd
|
||||
import pandas_ta as ta
|
||||
import statsmodels.api as sm
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
from openbb_core.app.utils import (
|
||||
@@ -34,7 +34,7 @@ router = Router(prefix="")
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def normality(data: List[Data], target: str) -> Obbject[NormalityModel]:
|
||||
def normality(data: List[Data], target: str) -> OBBject[NormalityModel]:
|
||||
"""
|
||||
Normality Statistics.
|
||||
|
||||
@@ -53,7 +53,7 @@ def normality(data: List[Data], target: str) -> Obbject[NormalityModel]:
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[NormalityModel]
|
||||
OBBject[NormalityModel]
|
||||
Normality tests summary. See qa_models.NormalityModel for details.
|
||||
"""
|
||||
|
||||
@@ -74,11 +74,11 @@ def normality(data: List[Data], target: str) -> Obbject[NormalityModel]:
|
||||
kolmogorov_smirnov=TestModel(statistic=ks_statistic, p_value=ks_pvalue),
|
||||
)
|
||||
|
||||
return Obbject(results=norm_summary)
|
||||
return OBBject(results=norm_summary)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def capm(data: List[Data], target: str) -> Obbject[CAPMModel]:
|
||||
def capm(data: List[Data], target: str) -> OBBject[CAPMModel]:
|
||||
"""Capital Asset Pricing Model."""
|
||||
|
||||
df = basemodel_to_df(data)
|
||||
@@ -106,13 +106,13 @@ def capm(data: List[Data], target: str) -> Obbject[CAPMModel]:
|
||||
idiosyncratic_risk=1 - model.rsquared,
|
||||
)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def qqplot() -> Obbject[Empty]:
|
||||
def qqplot() -> OBBject[Empty]:
|
||||
"""QQ Plot."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -121,7 +121,7 @@ def om(
|
||||
target: str,
|
||||
threshold_start: float = 0.0,
|
||||
threshold_end: float = 1.5,
|
||||
) -> Obbject[List[OmegaModel]]:
|
||||
) -> OBBject[List[OmegaModel]]:
|
||||
"""Omega Ratio.
|
||||
|
||||
Parameters
|
||||
@@ -137,7 +137,7 @@ def om(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[OmegaModel]]
|
||||
OBBject[List[OmegaModel]]
|
||||
Omega ratios.
|
||||
"""
|
||||
|
||||
@@ -156,11 +156,11 @@ def om(
|
||||
for i in threshold:
|
||||
results.append(OmegaModel(threshold=i, omega=get_omega_ratio(series_target, i)))
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def kurtosis(data: List[Data], target: str, window: PositiveInt) -> Obbject[List[Data]]:
|
||||
def kurtosis(data: List[Data], target: str, window: PositiveInt) -> OBBject[List[Data]]:
|
||||
"""Kurtosis.
|
||||
|
||||
Parameters
|
||||
@@ -174,7 +174,7 @@ def kurtosis(data: List[Data], target: str, window: PositiveInt) -> Obbject[List
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Kurtosis.
|
||||
"""
|
||||
df = basemodel_to_df(data)
|
||||
@@ -182,43 +182,43 @@ def kurtosis(data: List[Data], target: str, window: PositiveInt) -> Obbject[List
|
||||
results = ta.kurtosis(close=series_target, length=window).dropna()
|
||||
results = df_to_basemodel(results)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def pick() -> Obbject[Empty]:
|
||||
def pick() -> OBBject[Empty]:
|
||||
"""Pick."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def spread() -> Obbject[Empty]:
|
||||
def spread() -> OBBject[Empty]:
|
||||
"""Spread."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def rolling() -> Obbject[Empty]:
|
||||
def rolling() -> OBBject[Empty]:
|
||||
"""Rolling."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def var() -> Obbject[Empty]:
|
||||
def var() -> OBBject[Empty]:
|
||||
"""Value at Risk."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def line() -> Obbject[Empty]:
|
||||
def line() -> OBBject[Empty]:
|
||||
"""Line."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def hist() -> Obbject[Empty]:
|
||||
def hist() -> OBBject[Empty]:
|
||||
"""Histogram."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -227,7 +227,7 @@ def unitroot(
|
||||
target: str,
|
||||
fuller_reg: Literal["c", "ct", "ctt", "nc", "c"] = "c",
|
||||
kpss_reg: Literal["c", "ct"] = "c",
|
||||
) -> Obbject[UnitRootModel]:
|
||||
) -> OBBject[UnitRootModel]:
|
||||
"""Unit Root Test.
|
||||
|
||||
Augmented Dickey-Fuller test for unit root.
|
||||
@@ -246,7 +246,7 @@ def unitroot(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[UnitRootModel]
|
||||
OBBject[UnitRootModel]
|
||||
Unit root tests summary.
|
||||
"""
|
||||
|
||||
@@ -270,19 +270,19 @@ def unitroot(
|
||||
nlags=kpss[2],
|
||||
),
|
||||
)
|
||||
return Obbject(results=unitroot_summary)
|
||||
return OBBject(results=unitroot_summary)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def beta() -> Obbject[Empty]:
|
||||
def beta() -> OBBject[Empty]:
|
||||
"""Beta."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def sh(
|
||||
data: List[Data], target: str, rfr: float = 0.0, window: PositiveInt = 252
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Sharpe Ratio.
|
||||
|
||||
Parameters
|
||||
@@ -298,7 +298,7 @@ def sh(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Sharpe ratio.
|
||||
"""
|
||||
|
||||
@@ -311,7 +311,7 @@ def sh(
|
||||
|
||||
results = df_to_basemodel(results)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -321,7 +321,7 @@ def so(
|
||||
target_return: float = 0.0,
|
||||
window: PositiveInt = 252,
|
||||
adjusted: bool = False,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Sortino Ratio.
|
||||
|
||||
For method & terminology see: http://www.redrockcapital.com/Sortino__A__Sharper__Ratio_Red_Rock_Capital.pdf
|
||||
@@ -341,7 +341,7 @@ def so(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Sortino ratio.
|
||||
"""
|
||||
|
||||
@@ -359,35 +359,35 @@ def so(
|
||||
|
||||
results = df_to_basemodel(results)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def cusum() -> Obbject[Empty]:
|
||||
def cusum() -> OBBject[Empty]:
|
||||
"""Cumulative Sum."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def raw() -> Obbject[Empty]:
|
||||
def raw() -> OBBject[Empty]:
|
||||
"""Raw."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def cdf() -> Obbject[Empty]:
|
||||
def cdf() -> OBBject[Empty]:
|
||||
"""Cumulative Distribution Function."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def decompose() -> Obbject[Empty]:
|
||||
def decompose() -> OBBject[Empty]:
|
||||
"""Decompose."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def skew(data: List[Data], target: str, window: PositiveInt) -> Obbject[List[Data]]:
|
||||
def skew(data: List[Data], target: str, window: PositiveInt) -> OBBject[List[Data]]:
|
||||
"""Skewness.
|
||||
|
||||
Parameters
|
||||
@@ -401,7 +401,7 @@ def skew(data: List[Data], target: str, window: PositiveInt) -> Obbject[List[Dat
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Skewness.
|
||||
"""
|
||||
df = basemodel_to_df(data)
|
||||
@@ -409,7 +409,7 @@ def skew(data: List[Data], target: str, window: PositiveInt) -> Obbject[List[Dat
|
||||
results = ta.skew(close=series_target, length=window).dropna()
|
||||
results = df_to_basemodel(results)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -418,7 +418,7 @@ def quantile(
|
||||
target: str,
|
||||
window: PositiveInt,
|
||||
quantile_pct: NonNegativeFloat = 0.5,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Quantile."""
|
||||
|
||||
df = basemodel_to_df(data)
|
||||
@@ -430,29 +430,29 @@ def quantile(
|
||||
|
||||
results = df_to_basemodel(results)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def bw() -> Obbject[Empty]:
|
||||
def bw() -> OBBject[Empty]:
|
||||
"""Bandwidth."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def es() -> Obbject[Empty]:
|
||||
def es() -> OBBject[Empty]:
|
||||
"""Expected Shortfall."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def acf() -> Obbject[Empty]:
|
||||
def acf() -> OBBject[Empty]:
|
||||
"""Autocorrelation Function."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def summary(data: List[Data], target: str) -> Obbject[SummaryModel]:
|
||||
def summary(data: List[Data], target: str) -> OBBject[SummaryModel]:
|
||||
"""Summary.
|
||||
|
||||
Parameters
|
||||
@@ -464,7 +464,7 @@ def summary(data: List[Data], target: str) -> Obbject[SummaryModel]:
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[SummaryModel]
|
||||
OBBject[SummaryModel]
|
||||
Summary table.
|
||||
"""
|
||||
|
||||
@@ -485,4 +485,4 @@ def summary(data: List[Data], target: str) -> Obbject[SummaryModel]:
|
||||
max=df_stats.loc["max"],
|
||||
)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"""Comparison Analysis Router."""
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
@@ -22,66 +22,66 @@ def peers(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Company peers."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def balance() -> Obbject[Empty]: # type: ignore
|
||||
def balance() -> OBBject[Empty]: # type: ignore
|
||||
"""Company balance sheet."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def cashflow() -> Obbject[Empty]: # type: ignore
|
||||
def cashflow() -> OBBject[Empty]: # type: ignore
|
||||
"""Company cashflow."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def hcorr() -> Obbject[Empty]: # type: ignore
|
||||
def hcorr() -> OBBject[Empty]: # type: ignore
|
||||
"""Company historical correlation."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def hist() -> Obbject[Empty]: # type: ignore
|
||||
def hist() -> OBBject[Empty]: # type: ignore
|
||||
"""Company historical prices."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def income() -> Obbject[Empty]: # type: ignore
|
||||
def income() -> OBBject[Empty]: # type: ignore
|
||||
"""Company income statement."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def scorr() -> Obbject[Empty]: # type: ignore
|
||||
def scorr() -> OBBject[Empty]: # type: ignore
|
||||
"""Company sector correlation."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def screener() -> Obbject[Empty]: # type: ignore
|
||||
def screener() -> OBBject[Empty]: # type: ignore
|
||||
"""Company screener."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def sentiment() -> Obbject[Empty]: # type: ignore
|
||||
def sentiment() -> OBBject[Empty]: # type: ignore
|
||||
"""Company sentiment."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def similar() -> Obbject[Empty]: # type: ignore
|
||||
def similar() -> OBBject[Empty]: # type: ignore
|
||||
"""Company similar."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def volume() -> Obbject[Empty]: # type: ignore
|
||||
def volume() -> OBBject[Empty]: # type: ignore
|
||||
"""Company volume."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"""Due Diligence Router."""
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
@@ -21,6 +21,6 @@ def sec(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""SEC Filings."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
|
||||
@@ -6,106 +6,106 @@ router = Router(prefix="/disc")
|
||||
|
||||
|
||||
@router.command
|
||||
def active() -> Obbject[Empty]: # type: ignore
|
||||
def active() -> OBBject[Empty]: # type: ignore
|
||||
"""Most active stocks by intraday trade volumes."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def arkord() -> Obbject[Empty]: # type: ignore
|
||||
def arkord() -> OBBject[Empty]: # type: ignore
|
||||
"""Order by ARK INvestment Management LLC."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def asc() -> Obbject[Empty]: # type: ignore
|
||||
def asc() -> OBBject[Empty]: # type: ignore
|
||||
"""Small cap stocks with revenue and earnings growth more than 25%."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def dividends() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def dividends() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def filings() -> Obbject[Empty]: # type: ignore
|
||||
def filings() -> OBBject[Empty]: # type: ignore
|
||||
"""The most-recent form submissions to the SEC."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def fipo() -> Obbject[Empty]: # type: ignore
|
||||
def fipo() -> OBBject[Empty]: # type: ignore
|
||||
"""Future IPOs dates."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def gainers() -> Obbject[Empty]: # type: ignore
|
||||
def gainers() -> OBBject[Empty]: # type: ignore
|
||||
"""Show latest top gainers."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def gtech() -> Obbject[Empty]: # type: ignore
|
||||
def gtech() -> OBBject[Empty]: # type: ignore
|
||||
"""Tech stocks with revenue and earnings growth more than 25%."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def hotpenny() -> Obbject[Empty]: # type: ignore
|
||||
def hotpenny() -> OBBject[Empty]: # type: ignore
|
||||
"""Today's hot penny stocks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def ipo() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def ipo() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def losers() -> Obbject[Empty]: # type: ignore
|
||||
def losers() -> OBBject[Empty]: # type: ignore
|
||||
"""Show latest top losers."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lowfloat() -> Obbject[Empty]: # type: ignore
|
||||
def lowfloat() -> OBBject[Empty]: # type: ignore
|
||||
"""Low float stocks under 10M shares float."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def pipo() -> Obbject[Empty]: # type: ignore
|
||||
def pipo() -> OBBject[Empty]: # type: ignore
|
||||
"""Past IPOs dates."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def rtat() -> Obbject[Empty]: # type: ignore
|
||||
def rtat() -> OBBject[Empty]: # type: ignore
|
||||
"""Top 10 retail traded stocks per day."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def trending() -> Obbject[Empty]: # type: ignore
|
||||
def trending() -> OBBject[Empty]: # type: ignore
|
||||
"""Trending news."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def ugs() -> Obbject[Empty]: # type: ignore
|
||||
def ugs() -> OBBject[Empty]: # type: ignore
|
||||
"""Undervalued stocks with revenue and earnings growth above 25%."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def ulc() -> Obbject[Empty]: # type: ignore
|
||||
def ulc() -> OBBject[Empty]: # type: ignore
|
||||
"""Potentially undervalued large cap stocks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def upcoming() -> Obbject[Empty]: # type: ignore
|
||||
def upcoming() -> OBBject[Empty]: # type: ignore
|
||||
"""Upcoming earnings release dates."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
|
||||
@@ -6,70 +6,70 @@ router = Router(prefix="/dps")
|
||||
|
||||
|
||||
@router.command
|
||||
def psi() -> Obbject[Empty]: # type: ignore
|
||||
def psi() -> OBBject[Empty]: # type: ignore
|
||||
"""Price vs short interest volume"""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def ctb() -> Obbject[Empty]: # type: ignore
|
||||
def ctb() -> OBBject[Empty]: # type: ignore
|
||||
"""Cost to borrow of stocks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def dpotc() -> Obbject[Empty]: # type: ignore
|
||||
def dpotc() -> OBBject[Empty]: # type: ignore
|
||||
"""Dark pools (ATS) vs OTC data."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def ftd() -> Obbject[Empty]: # type: ignore
|
||||
def ftd() -> OBBject[Empty]: # type: ignore
|
||||
"""Fails-to-deliver data."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def hsi() -> Obbject[Empty]: # type: ignore
|
||||
def hsi() -> OBBject[Empty]: # type: ignore
|
||||
"""Show top high short interest stocks of over 20% ratio."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def pos() -> Obbject[Empty]: # type: ignore
|
||||
def pos() -> OBBject[Empty]: # type: ignore
|
||||
"""Dark pool short position."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def prom() -> Obbject[Empty]: # type: ignore
|
||||
def prom() -> OBBject[Empty]: # type: ignore
|
||||
"""Promising tickers based on dark pool shares regression."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def psi_q() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def psi_q() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def psi_sg() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def psi_sg() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def shorted() -> Obbject[Empty]: # type: ignore
|
||||
def shorted() -> OBBject[Empty]: # type: ignore
|
||||
"""Most shorted stocks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def sidtc() -> Obbject[Empty]: # type: ignore
|
||||
def sidtc() -> OBBject[Empty]: # type: ignore
|
||||
"""Short interest and days to cover."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def spos() -> Obbject[Empty]: # type: ignore
|
||||
def spos() -> OBBject[Empty]: # type: ignore
|
||||
"""Net short vs position."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"""Fundamental Analysis Router."""
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
@@ -17,9 +17,9 @@ router = Router(prefix="/fa")
|
||||
|
||||
|
||||
@router.command
|
||||
def analysis() -> Obbject[Empty]: # type: ignore
|
||||
def analysis() -> OBBject[Empty]: # type: ignore
|
||||
"""Analyse SEC filings with the help of machine learning."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="BalanceSheet")
|
||||
@@ -28,9 +28,9 @@ def balance(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Balance Sheet."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="BalanceSheetGrowth")
|
||||
@@ -39,9 +39,9 @@ def balance_growth(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Balance Sheet Statement Growth."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="DividendCalendar")
|
||||
@@ -50,9 +50,9 @@ def cal(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Show Dividend Calendar for a given start and end dates."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="CashFlowStatement")
|
||||
@@ -61,9 +61,9 @@ def cash(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Cash Flow Statement."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="CashFlowStatementGrowth")
|
||||
@@ -72,9 +72,9 @@ def cash_growth(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Cash Flow Statement Growth."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="ExecutiveCompensation")
|
||||
@@ -83,9 +83,9 @@ def comp(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Executive Compensation."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="StockSplitCalendar")
|
||||
@@ -94,21 +94,21 @@ def comsplit(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Stock Split Calendar."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def customer() -> Obbject[Empty]: # type: ignore
|
||||
def customer() -> OBBject[Empty]: # type: ignore
|
||||
"""List of customers of the company."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def dcfc() -> Obbject[Empty]: # type: ignore
|
||||
def dcfc() -> OBBject[Empty]: # type: ignore
|
||||
"""Determine the (historical) discounted cash flow."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="HistoricalDividends")
|
||||
@@ -117,15 +117,15 @@ def divs(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Historical Dividends."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def dupont() -> Obbject[Empty]: # type: ignore
|
||||
def dupont() -> OBBject[Empty]: # type: ignore
|
||||
"""Detailed breakdown for Return on Equity (RoE)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="EarningsCalendar")
|
||||
@@ -134,9 +134,9 @@ def earning(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Earnings Calendar."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="HistoricalEmployees")
|
||||
@@ -145,21 +145,21 @@ def emp(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Number of Employees."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def enterprise() -> Obbject[Empty]: # type: ignore
|
||||
def enterprise() -> OBBject[Empty]: # type: ignore
|
||||
"""Enterprise value."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def epsfc() -> Obbject[Empty]: # type: ignore
|
||||
def epsfc() -> OBBject[Empty]: # type: ignore
|
||||
"""Earnings Estimate by Analysts - EPS."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="AnalystEstimates")
|
||||
@@ -168,38 +168,38 @@ def est(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Analyst Estimates."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def fama_coe() -> Obbject[Empty]: # type: ignore
|
||||
def fama_coe() -> OBBject[Empty]: # type: ignore
|
||||
"""Fama French 3 Factor Model - Coefficient of Earnings."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def fama_raw() -> Obbject[Empty]: # type: ignore
|
||||
def fama_raw() -> OBBject[Empty]: # type: ignore
|
||||
"""Fama French 3 Factor Model - Raw Data."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def fraud() -> Obbject[Empty]: # type: ignore
|
||||
def fraud() -> OBBject[Empty]: # type: ignore
|
||||
"""Key fraud ratios including M-score, Z-score and McKee."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def growth() -> Obbject[Empty]: # type: ignore
|
||||
def growth() -> OBBject[Empty]: # type: ignore
|
||||
"""Growth of financial statement items and ratios."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def historical_5() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def historical_5() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="IncomeStatement")
|
||||
@@ -208,9 +208,9 @@ def income(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Income Statement."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="IncomeStatementGrowth")
|
||||
@@ -219,9 +219,9 @@ def income_growth(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Income Statement Growth."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="StockInsiderTrading")
|
||||
@@ -230,9 +230,9 @@ def ins(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Stock Insider Trading."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="InstitutionalOwnership")
|
||||
@@ -241,14 +241,14 @@ def ins_own(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Institutional Ownership."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def key() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def key() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="KeyMetrics")
|
||||
@@ -257,9 +257,9 @@ def metrics(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Key Metrics."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="KeyExecutives")
|
||||
@@ -268,20 +268,20 @@ def mgmt(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Key Executives."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def mktcap() -> Obbject[Empty]: # type: ignore
|
||||
def mktcap() -> OBBject[Empty]: # type: ignore
|
||||
"""Obtain the market capitalization or enterprise value."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command # CHECK IF NEWS IS NEEDED HERE
|
||||
def news() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def news() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="CompanyOverview")
|
||||
@@ -290,9 +290,9 @@ def overview(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Company Overview."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="StockOwnership")
|
||||
@@ -301,9 +301,9 @@ def own(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Stock Ownership."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="PriceTargetConsensus")
|
||||
@@ -312,9 +312,9 @@ def pt(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Price Target Consensus."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="PriceTarget")
|
||||
@@ -323,27 +323,27 @@ def pta(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Price Target."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def rating() -> Obbject[Empty]: # type: ignore
|
||||
def rating() -> OBBject[Empty]: # type: ignore
|
||||
"""Analyst prices and ratings over time of the company."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def ratios() -> Obbject[Empty]: # type: ignore
|
||||
def ratios() -> OBBject[Empty]: # type: ignore
|
||||
"""Extensive set of ratios over time."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def revfc() -> Obbject[Empty]: # type: ignore
|
||||
def revfc() -> OBBject[Empty]: # type: ignore
|
||||
"""Earning Estimate by Analysts - Revenue."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="RevenueGeographic")
|
||||
@@ -352,9 +352,9 @@ def revgeo(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Revenue Geographic."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="RevenueBusinessLine")
|
||||
@@ -363,31 +363,31 @@ def revseg(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Revenue Business Line."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def rot() -> Obbject[Empty]: # type: ignore
|
||||
def rot() -> OBBject[Empty]: # type: ignore
|
||||
"""Number of analyst ratings over time on a monthly basis."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def score() -> Obbject[Empty]: # type: ignore
|
||||
def score() -> OBBject[Empty]: # type: ignore
|
||||
"""Value investing scores for any time period."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def sec() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def sec() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def shares() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def shares() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="ShareStatistics")
|
||||
@@ -396,9 +396,9 @@ def shrs(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Share Statistics."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="HistoricalStockSplits")
|
||||
@@ -407,15 +407,15 @@ def split(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Historical Stock Splits."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def supplier() -> Obbject[Empty]: # type: ignore
|
||||
def supplier() -> OBBject[Empty]: # type: ignore
|
||||
"""List of suppliers of the company."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(model="EarningsCallTranscript")
|
||||
@@ -424,6 +424,6 @@ def transcript(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Earnings Call Transcript."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Due Diligence Router."""
|
||||
|
||||
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
|
||||
@@ -9,66 +9,66 @@ router = Router(prefix="/gov")
|
||||
|
||||
|
||||
@router.command
|
||||
def contracts() -> Obbject[Empty]: # type: ignore
|
||||
def contracts() -> OBBject[Empty]: # type: ignore
|
||||
"""Return government contracts."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def government_trading() -> Obbject[Empty]: # type: ignore
|
||||
def government_trading() -> OBBject[Empty]: # type: ignore
|
||||
"""Return government trading."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command # Isn't this one the same as the one above?
|
||||
def gtrades() -> Obbject[Empty]: # type: ignore
|
||||
def gtrades() -> OBBject[Empty]: # type: ignore
|
||||
"""Return government trades."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def histcont() -> Obbject[Empty]: # type: ignore
|
||||
def histcont() -> OBBject[Empty]: # type: ignore
|
||||
"""Historical quarterly government contracts."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lastcontracts() -> Obbject[Empty]: # type: ignore
|
||||
def lastcontracts() -> OBBject[Empty]: # type: ignore
|
||||
"""Return last government contracts given out."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lasttrades() -> Obbject[Empty]: # type: ignore
|
||||
def lasttrades() -> OBBject[Empty]: # type: ignore
|
||||
"""Last trades."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lobbying() -> Obbject[Empty]: # type: ignore
|
||||
def lobbying() -> OBBject[Empty]: # type: ignore
|
||||
"""Corporate lobbying details."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def qtrcontracts() -> Obbject[Empty]: # type: ignore
|
||||
def qtrcontracts() -> OBBject[Empty]: # type: ignore
|
||||
"""Quarterly government contracts analysis."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def topbuys() -> Obbject[Empty]: # type: ignore
|
||||
def topbuys() -> OBBject[Empty]: # type: ignore
|
||||
"""Show most purchased stocks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def toplobbying() -> Obbject[Empty]: # type: ignore
|
||||
def toplobbying() -> OBBject[Empty]: # type: ignore
|
||||
"""Top corporate lobbying tickers."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def topsells() -> Obbject[Empty]: # type: ignore
|
||||
def topsells() -> OBBject[Empty]: # type: ignore
|
||||
"""Show most sold stocks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Due Diligence Router."""
|
||||
|
||||
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
|
||||
@@ -9,96 +9,96 @@ router = Router(prefix="/ins")
|
||||
|
||||
|
||||
@router.command
|
||||
def act() -> Obbject[Empty]: # type: ignore
|
||||
def act() -> OBBject[Empty]: # type: ignore
|
||||
"""Insider activity over time."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def blcp() -> Obbject[Empty]: # type: ignore
|
||||
def blcp() -> OBBject[Empty]: # type: ignore
|
||||
"""Big latest CEO/CFO purchaces ($25k+)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def blcs() -> Obbject[Empty]: # type: ignore
|
||||
def blcs() -> OBBject[Empty]: # type: ignore
|
||||
"""Big latest CEO/CFO sales ($100k+)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def blip() -> Obbject[Empty]: # type: ignore
|
||||
def blip() -> OBBject[Empty]: # type: ignore
|
||||
"""Big latest insider purchaces ($25+)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def blis() -> Obbject[Empty]: # type: ignore
|
||||
def blis() -> OBBject[Empty]: # type: ignore
|
||||
"""Big latest insider sales ($100k+)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def blop() -> Obbject[Empty]: # type: ignore
|
||||
def blop() -> OBBject[Empty]: # type: ignore
|
||||
"""Big latest officer purchaces ($25k+)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def blos() -> Obbject[Empty]: # type: ignore
|
||||
def blos() -> OBBject[Empty]: # type: ignore
|
||||
"""Big latest officer sales ($100k+)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command # Can't use filter because it's a python keyword
|
||||
def filt() -> Obbject[Empty]: # type: ignore
|
||||
def filt() -> OBBject[Empty]: # type: ignore
|
||||
"""Filter insiders based on preset."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lcb() -> Obbject[Empty]: # type: ignore
|
||||
def lcb() -> OBBject[Empty]: # type: ignore
|
||||
"""Latest cluster buys."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lins() -> Obbject[Empty]: # type: ignore
|
||||
def lins() -> OBBject[Empty]: # type: ignore
|
||||
"""Last insider trading of the company."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lip() -> Obbject[Empty]: # type: ignore
|
||||
def lip() -> OBBject[Empty]: # type: ignore
|
||||
"""Latest insider purchaces."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lis() -> Obbject[Empty]: # type: ignore
|
||||
def lis() -> OBBject[Empty]: # type: ignore
|
||||
"""Latest insider sales."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lit() -> Obbject[Empty]: # type: ignore
|
||||
def lit() -> OBBject[Empty]: # type: ignore
|
||||
"""Latest insider trading (all filings)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def lpsb() -> Obbject[Empty]: # type: ignore
|
||||
def lpsb() -> OBBject[Empty]: # type: ignore
|
||||
"""Latest penny stock buys."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def print_insider_data() -> Obbject[Empty]: # type: ignore
|
||||
def print_insider_data() -> OBBject[Empty]: # type: ignore
|
||||
"""Print insider data."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def stats() -> Obbject[Empty]: # type: ignore
|
||||
def stats() -> OBBject[Empty]: # type: ignore
|
||||
"""Insider stats of the company."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
|
||||
@@ -6,88 +6,88 @@ router = Router(prefix="/options")
|
||||
|
||||
|
||||
@router.command
|
||||
def chains() -> Obbject[Empty]: # type: ignore
|
||||
def chains() -> OBBject[Empty]: # type: ignore
|
||||
"""Return options chains with greeks."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def dte() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def dte() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def eodchain() -> Obbject[Empty]: # type: ignore
|
||||
def eodchain() -> OBBject[Empty]: # type: ignore
|
||||
"""Gets option chain at a specific date."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def expirations() -> Obbject[Empty]: # type: ignore
|
||||
def expirations() -> OBBject[Empty]: # type: ignore
|
||||
"""Return options expirations."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def grhist() -> Obbject[Empty]: # type: ignore
|
||||
def grhist() -> OBBject[Empty]: # type: ignore
|
||||
"""Plot option greek history."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def hist() -> Obbject[Empty]: # type: ignore
|
||||
def hist() -> OBBject[Empty]: # type: ignore
|
||||
"""Plot option history."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def info() -> Obbject[Empty]: # type: ignore
|
||||
def info() -> OBBject[Empty]: # type: ignore
|
||||
"""Display option information (volatility, IV rank, etc.)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def last_price() -> Obbject[Empty]: # type: ignore
|
||||
def last_price() -> OBBject[Empty]: # type: ignore
|
||||
"""Return last price of an option."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def oi() -> Obbject[Empty]: # type: ignore
|
||||
def oi() -> OBBject[Empty]: # type: ignore
|
||||
"""Plot option open interest."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def pcr() -> Obbject[Empty]: # type: ignore
|
||||
def pcr() -> OBBject[Empty]: # type: ignore
|
||||
"""Display put/call ratio for ticker."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def price() -> Obbject[Empty]: # type: ignore
|
||||
return Obbject(results=Empty())
|
||||
def price() -> OBBject[Empty]: # type: ignore
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def unu() -> Obbject[Empty]: # type: ignore
|
||||
def unu() -> OBBject[Empty]: # type: ignore
|
||||
"""Show unusual options activity."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def voi() -> Obbject[Empty]: # type: ignore
|
||||
def voi() -> OBBject[Empty]: # type: ignore
|
||||
"""Plot volume and open interest."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def vol() -> Obbject[Empty]: # type: ignore
|
||||
def vol() -> OBBject[Empty]: # type: ignore
|
||||
"""Plot volume."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def vsurf() -> Obbject[Empty]: # type: ignore
|
||||
def vsurf() -> OBBject[Empty]: # type: ignore
|
||||
"""Show 3D volatility surface."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"""Stocks Router."""
|
||||
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
@@ -39,9 +39,9 @@ def load(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Load stock data for a specific ticker."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="StockNews")
|
||||
@@ -50,9 +50,9 @@ def news(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Get news for one or more stock tickers."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command(model="StockMultiples")
|
||||
@@ -61,24 +61,24 @@ def multiples(
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Get valuation multiples for a stock ticker."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
|
||||
|
||||
@router.command
|
||||
def tob() -> Obbject[Empty]:
|
||||
def tob() -> OBBject[Empty]:
|
||||
"""View top of book for loaded ticker (US exchanges only)."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def quote() -> Obbject[Empty]:
|
||||
def quote() -> OBBject[Empty]:
|
||||
"""View the current price for a specific stock ticker."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command
|
||||
def search() -> Obbject[Empty]:
|
||||
def search() -> OBBject[Empty]:
|
||||
"""Search a specific stock ticker for analysis."""
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import List, Literal, Optional
|
||||
|
||||
import pandas as pd
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.results.empty import Empty
|
||||
from openbb_core.app.router import Router
|
||||
from openbb_core.app.utils import (
|
||||
@@ -31,7 +31,7 @@ def atr(
|
||||
mamode: Literal["rma", "ema", "sma", "wma"] = "rma",
|
||||
drift: NonNegativeInt = 1,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Average True Range is used to measure volatility, especially volatility caused by
|
||||
gaps or limit moves.
|
||||
@@ -53,7 +53,7 @@ def atr(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -71,7 +71,7 @@ def atr(
|
||||
|
||||
results = df_to_basemodel(df_target.join(df_atr, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -82,7 +82,7 @@ def fib(
|
||||
period: PositiveInt = 120,
|
||||
start_date: Optional[str] = None,
|
||||
end_date: Optional[str] = None,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Fibonacci Retracement Levels.
|
||||
|
||||
@@ -97,7 +97,7 @@ def fib(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -132,7 +132,7 @@ def fib(
|
||||
|
||||
results = df_to_basemodel(df_fib)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -140,7 +140,7 @@ def obv(
|
||||
data: List[Data],
|
||||
index: str = "date",
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The On Balance Volume (OBV) is a cumulative total of the up and
|
||||
down volume. When the close is higher than the previous close, the volume is added
|
||||
@@ -161,7 +161,7 @@ def obv(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -177,7 +177,7 @@ def obv(
|
||||
|
||||
results = df_to_basemodel(df_target.join(df_obv, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -186,7 +186,7 @@ def fisher(
|
||||
index: str = "date",
|
||||
length: PositiveInt = 14,
|
||||
signal: PositiveInt = 1,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Fisher Transform is a technical indicator created by John F. Ehlers
|
||||
that converts prices into a Gaussian normal distribution.1 The indicator
|
||||
@@ -207,7 +207,7 @@ def fisher(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -223,7 +223,7 @@ def fisher(
|
||||
|
||||
results = df_to_basemodel(df_target.join(df_fisher, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -233,7 +233,7 @@ def adosc(
|
||||
fast: PositiveInt = 3,
|
||||
slow: PositiveInt = 10,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Accumulation/Distribution Oscillator, also known as the Chaikin Oscillator
|
||||
is essentially a momentum indicator, but of the Accumulation-Distribution line
|
||||
@@ -256,7 +256,7 @@ def adosc(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
|
||||
Examples
|
||||
--------
|
||||
@@ -271,16 +271,16 @@ def adosc(
|
||||
|
||||
results = df_to_basemodel(df_target.join(df_adosc, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def tv() -> Obbject[Empty]:
|
||||
def tv() -> OBBject[Empty]:
|
||||
"""TradingView."""
|
||||
|
||||
# TODO : probably out of scope for now
|
||||
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -292,7 +292,7 @@ def bbands(
|
||||
std: NonNegativeFloat = 2,
|
||||
mamode: Literal["sma", "ema", "wma", "rma"] = "sma",
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Bollinger Bands consist of three lines. The middle band is a simple
|
||||
moving average (generally 20 periods) of the typical price (TP). The upper and lower
|
||||
@@ -324,7 +324,7 @@ def bbands(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -344,16 +344,16 @@ def bbands(
|
||||
|
||||
results = df_to_basemodel(df_target.join(bbands_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def multi() -> Obbject[Empty]:
|
||||
def multi() -> OBBject[Empty]:
|
||||
"""Plot multiple indicators on the same chart."""
|
||||
|
||||
# TODO : probably out of scope for now
|
||||
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -363,7 +363,7 @@ def zlma(
|
||||
index: str = "date",
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The zero lag exponential moving average (ZLEMA) indicator
|
||||
was created by John Ehlers and Ric Way. The idea is do a
|
||||
@@ -388,7 +388,7 @@ def zlma(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -403,7 +403,7 @@ def zlma(
|
||||
|
||||
results = df_to_basemodel(df_target.join(zlma_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -412,7 +412,7 @@ def aroon(
|
||||
index: str = "date",
|
||||
length: int = 25,
|
||||
scalar: int = 100,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The word aroon is Sanskrit for "dawn's early light." The Aroon
|
||||
indicator attempts to show when a new trend is dawning. The indicator consists
|
||||
@@ -438,7 +438,7 @@ def aroon(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -453,7 +453,7 @@ def aroon(
|
||||
|
||||
results = df_to_basemodel(df_target.join(aroon_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -463,7 +463,7 @@ def sma(
|
||||
index: str = "date",
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Moving Averages are used to smooth the data in an array to
|
||||
help eliminate noise and identify trends. The Simple Moving Average is literally
|
||||
@@ -488,7 +488,7 @@ def sma(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -503,7 +503,7 @@ def sma(
|
||||
|
||||
results = df_to_basemodel(df_target.join(sma_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -514,7 +514,7 @@ def demark(
|
||||
show_all: bool = False,
|
||||
asint: bool = False,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Demark sequential indicator
|
||||
|
||||
@@ -535,7 +535,7 @@ def demark(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -553,7 +553,7 @@ def demark(
|
||||
|
||||
results = df_to_basemodel(df_target.join(demark_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -562,7 +562,7 @@ def vwap(
|
||||
index: str = "date",
|
||||
anchor: str = "D",
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Volume Weighted Average Price that measures the average typical price
|
||||
by volume. It is typically used with intraday charts to identify general direction.
|
||||
@@ -582,7 +582,7 @@ def vwap(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -598,17 +598,17 @@ def vwap(
|
||||
|
||||
results = df_to_basemodel(df_target.join(df_vwap, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def recom() -> Obbject[Empty]:
|
||||
def recom() -> OBBject[Empty]:
|
||||
"""Recommendation."""
|
||||
|
||||
# TODO : this command does only a call to a Tradingview's endpoint
|
||||
# thus, it should probably be implement on a provider level
|
||||
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -619,7 +619,7 @@ def macd(
|
||||
fast: int = 12,
|
||||
slow: int = 26,
|
||||
signal: int = 9,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Moving Average Convergence Divergence (MACD) is the difference
|
||||
between two Exponential Moving Averages. The Signal line is an Exponential Moving
|
||||
@@ -646,7 +646,7 @@ def macd(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -663,7 +663,7 @@ def macd(
|
||||
|
||||
results = df_to_basemodel(df_target.join(macd_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -673,7 +673,7 @@ def hma(
|
||||
index: str = "date",
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Hull Moving Average solves the age old dilemma of making a moving average
|
||||
more responsive to current price activity whilst maintaining curve smoothness.
|
||||
@@ -695,7 +695,7 @@ def hma(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -710,7 +710,7 @@ def hma(
|
||||
|
||||
results = df_to_basemodel(df_target.join(hma_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -720,7 +720,7 @@ def donchian(
|
||||
lower_length: PositiveInt = 20,
|
||||
upper_length: PositiveInt = 20,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Donchian Channels are three lines generated by moving average
|
||||
calculations that comprise an indicator formed by upper and lower
|
||||
@@ -744,7 +744,7 @@ def donchian(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -764,7 +764,7 @@ def donchian(
|
||||
|
||||
results = df_to_basemodel(df_target.join(donchian_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -776,7 +776,7 @@ def ichimoku(
|
||||
lagging: PositiveInt = 52,
|
||||
offset: PositiveInt = 26,
|
||||
lookahead: bool = False,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that
|
||||
defines support and resistance, identifies trend direction, gauges momentum and provides
|
||||
@@ -816,7 +816,7 @@ def ichimoku(
|
||||
|
||||
results = df_to_basemodel(df_result, index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -825,7 +825,7 @@ def clenow(
|
||||
index: str = "date",
|
||||
target: str = "adj_close",
|
||||
period: PositiveInt = 90,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Clenow Volatility Adjusted Momentum.
|
||||
|
||||
@@ -842,7 +842,7 @@ def clenow(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -868,11 +868,11 @@ def clenow(
|
||||
|
||||
results = df_to_basemodel(df_clenow)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def ad(data: List[Data], index: str = "date", offset: int = 0) -> Obbject[List[Data]]:
|
||||
def ad(data: List[Data], index: str = "date", offset: int = 0) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Accumulation/Distribution Line is similar to the On Balance
|
||||
Volume (OBV), which sums the volume times +1/-1 based on whether the close is
|
||||
@@ -896,7 +896,7 @@ def ad(data: List[Data], index: str = "date", offset: int = 0) -> Obbject[List[D
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
|
||||
Examples
|
||||
--------
|
||||
@@ -911,7 +911,7 @@ def ad(data: List[Data], index: str = "date", offset: int = 0) -> Obbject[List[D
|
||||
|
||||
results = df_to_basemodel(df_target.join(ad_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -921,7 +921,7 @@ def adx(
|
||||
length: int = 50,
|
||||
scalar: float = 100.0,
|
||||
drift: int = 1,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The ADX is a Welles Wilder style moving average of the Directional Movement Index (DX).
|
||||
The values range from 0 to 100, but rarely get above 60. To interpret the ADX, consider
|
||||
@@ -942,7 +942,7 @@ def adx(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -959,7 +959,7 @@ def adx(
|
||||
|
||||
results = df_to_basemodel(df_target.join(adx_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -969,7 +969,7 @@ def wma(
|
||||
index: str = "date",
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
A Weighted Moving Average puts more weight on recent data and less on past data.
|
||||
This is done by multiplying each bar’s price by a weighting factor. Because of its
|
||||
@@ -991,7 +991,7 @@ def wma(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The WMA data.
|
||||
|
||||
Examples
|
||||
@@ -1006,7 +1006,7 @@ def wma(
|
||||
|
||||
results = df_to_basemodel(df_target.join(wma_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -1015,7 +1015,7 @@ def cci(
|
||||
index: str = "date",
|
||||
length: PositiveInt = 14,
|
||||
scalar: PositiveFloat = 0.015,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The CCI is designed to detect beginning and ending market trends.
|
||||
The range of 100 to -100 is the normal trading range. CCI values outside of this
|
||||
@@ -1036,7 +1036,7 @@ def cci(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The CCI data.
|
||||
"""
|
||||
|
||||
@@ -1046,7 +1046,7 @@ def cci(
|
||||
|
||||
results = df_to_basemodel(df_target.join(cci_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -1057,7 +1057,7 @@ def rsi(
|
||||
length: int = 14,
|
||||
scalar: float = 100.0,
|
||||
drift: int = 1,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Relative Strength Index (RSI) calculates a ratio of the
|
||||
recent upward price movements to the absolute price movement. The RSI ranges
|
||||
@@ -1082,7 +1082,7 @@ def rsi(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The RSI data.
|
||||
|
||||
Examples
|
||||
@@ -1099,17 +1099,17 @@ def rsi(
|
||||
|
||||
results = df_to_basemodel(df_target.join(rsi_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def summary() -> Obbject[Empty]:
|
||||
def summary() -> OBBject[Empty]:
|
||||
"""Summary."""
|
||||
|
||||
# TODO : this command does only a call to a finbrain's endpoint
|
||||
# thus, it should probably be implement on a provider level
|
||||
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -1119,7 +1119,7 @@ def stoch(
|
||||
fast_k_period: NonNegativeInt = 14,
|
||||
slow_d_period: NonNegativeInt = 3,
|
||||
slow_k_period: NonNegativeInt = 3,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Stochastic Oscillator measures where the close is in relation
|
||||
to the recent trading range. The values range from zero to 100. %D values over 75
|
||||
@@ -1143,7 +1143,7 @@ def stoch(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The Stochastic Oscillator data.
|
||||
|
||||
Examples
|
||||
@@ -1165,16 +1165,16 @@ def stoch(
|
||||
|
||||
results = df_to_basemodel(df_target.join(stoch_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def rsp() -> Obbject[Empty]:
|
||||
def rsp() -> OBBject[Empty]:
|
||||
"""Relative Strength Performance."""
|
||||
|
||||
# TODO : https://github.com/OpenBB-finance/OpenBBTerminal/issues/5167
|
||||
|
||||
return Obbject(results=Empty())
|
||||
return OBBject(results=Empty())
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -1185,7 +1185,7 @@ def kc(
|
||||
scalar: PositiveFloat = 20,
|
||||
mamode: Literal["ema", "sma", "wma", "hma", "zlma"] = "ema",
|
||||
offset: NonNegativeInt = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
Keltner Channels are volatility-based bands that are placed
|
||||
on either side of an asset's price and can aid in determining
|
||||
@@ -1210,7 +1210,7 @@ def kc(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The Keltner Channels data.
|
||||
|
||||
Examples
|
||||
@@ -1233,13 +1233,13 @@ def kc(
|
||||
|
||||
results = df_to_basemodel(df_target.join(kc_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
def cg(
|
||||
data: List[Data], index: str = "date", length: PositiveInt = 14
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Center of Gravity indicator, in short, is used to anticipate future price movements
|
||||
and to trade on price reversals as soon as they happen. However, just like other oscillators,
|
||||
@@ -1258,7 +1258,7 @@ def cg(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The COG data.
|
||||
|
||||
Examples
|
||||
@@ -1274,7 +1274,7 @@ def cg(
|
||||
|
||||
results = df_to_basemodel(df_target.join(cg_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -1292,7 +1292,7 @@ def cones(
|
||||
"Yang-Zhang",
|
||||
] = "STD",
|
||||
is_crypto: bool = False,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""Calculate the realized volatility quantiles over rolling windows of time.
|
||||
|
||||
The model for calculating volatility is selectable.
|
||||
@@ -1334,7 +1334,7 @@ def cones(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The cones data.
|
||||
|
||||
Examples
|
||||
@@ -1354,7 +1354,7 @@ def cones(
|
||||
|
||||
results = df_to_basemodel(df_cones, index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
|
||||
@router.command(methods=["POST"])
|
||||
@@ -1364,7 +1364,7 @@ def ema(
|
||||
index: str = "date",
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
) -> Obbject[List[Data]]:
|
||||
) -> OBBject[List[Data]]:
|
||||
"""
|
||||
The Exponential Moving Average is a staple of technical
|
||||
analysis and is used in countless technical indicators. In a Simple Moving
|
||||
@@ -1390,7 +1390,7 @@ def ema(
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -1406,4 +1406,4 @@ def ema(
|
||||
|
||||
results = df_to_basemodel(df_target.join(ema_df, how="left"), index=True)
|
||||
|
||||
return Obbject(results=results)
|
||||
return OBBject(results=results)
|
||||
|
||||
10
openbb_sdk/sdk/core/README.md
vendored
10
openbb_sdk/sdk/core/README.md
vendored
@@ -70,7 +70,7 @@ router = Router(prefix="/router_name")
|
||||
@router.command
|
||||
def some_command(
|
||||
some_param: some_param_type,
|
||||
) -> Obbject[Item]:
|
||||
) -> OBBject[Item]:
|
||||
pass
|
||||
```
|
||||
|
||||
@@ -85,9 +85,9 @@ def load(
|
||||
provider_choices: ProviderChoices, # available providers
|
||||
standard_params: StandardParams, # symbol, start_date, etc.
|
||||
extra_params: ExtraParams, # provider specific parameters
|
||||
) -> Obbject[BaseModel]:
|
||||
) -> OBBject[BaseModel]:
|
||||
"""Load stock data for a specific ticker."""
|
||||
return Obbject(results=Query(**locals()).execute())
|
||||
return OBBject(results=Query(**locals()).execute())
|
||||
```
|
||||
|
||||
### Entrypoint
|
||||
@@ -165,7 +165,7 @@ output = obb.stocks.load(
|
||||
|
||||
### 4.1.1. Command output
|
||||
|
||||
Each command will always return a `Obbject`. There you will find:
|
||||
Each command will always return a `OBBject`. There you will find:
|
||||
|
||||
- `results`: the data returned by the command `None`
|
||||
- `provider`: the provider name (only available provider names allowed) used to get the data or `None`
|
||||
@@ -341,7 +341,7 @@ timestamp: ... # Execution starting timestamp.
|
||||
alias_list: ... # List of alias to find a JournalEntry easier than with it's `tag`.
|
||||
|
||||
>>> response.output
|
||||
Obbject
|
||||
OBBject
|
||||
|
||||
id: ... # UUID Tag
|
||||
results: ... # Serializable results.
|
||||
|
||||
@@ -8,7 +8,7 @@ from fastapi.routing import APIRoute
|
||||
from openbb_core.api.dependency.user import get_user
|
||||
from openbb_core.app.command_runner import CommandRunner
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.user_settings import UserSettings
|
||||
from openbb_core.app.router import RouterLoader
|
||||
from openbb_core.app.service.system_service import SystemService
|
||||
@@ -76,22 +76,22 @@ def build_new_signature(func):
|
||||
)
|
||||
|
||||
|
||||
def validate_output(c_out: Obbject) -> Obbject:
|
||||
def validate_output(c_out: OBBject) -> OBBject:
|
||||
"""
|
||||
Validate Obbject object.
|
||||
Checks against the Obbject schema and removes fields that contain the
|
||||
Validate OBBject object.
|
||||
Checks against the OBBject schema and removes fields that contain the
|
||||
`exclude_from_api` extra `pydantic.Field` kwarg.
|
||||
Note that the modification to the `Obbject` object is done in-place.
|
||||
Note that the modification to the `OBBject` object is done in-place.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
c_out : Obbject
|
||||
Obbject object to validate.
|
||||
c_out : OBBject
|
||||
OBBject object to validate.
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
Validated Obbject object.
|
||||
OBBject
|
||||
Validated OBBject object.
|
||||
"""
|
||||
|
||||
def is_model(type_):
|
||||
|
||||
@@ -18,7 +18,7 @@ from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.journal import Journal
|
||||
from openbb_core.app.model.journal_entry import JournalEntry
|
||||
from openbb_core.app.model.journal_query import JournalQuery
|
||||
from openbb_core.app.model.obbject import Error, Obbject
|
||||
from openbb_core.app.model.obbject import Error, OBBject
|
||||
from openbb_core.app.model.system_settings import SystemSettings
|
||||
from openbb_core.app.model.user_settings import UserSettings
|
||||
from openbb_core.app.router import CommandMap
|
||||
@@ -232,7 +232,7 @@ class StaticCommandRunner:
|
||||
charting_manager = ChartingManager()
|
||||
|
||||
@staticmethod
|
||||
def __run_in_isolation(func, args=None, kwargs=None) -> Obbject:
|
||||
def __run_in_isolation(func, args=None, kwargs=None) -> OBBject:
|
||||
args = args or ()
|
||||
kwargs = kwargs or {}
|
||||
|
||||
@@ -244,7 +244,7 @@ class StaticCommandRunner:
|
||||
@classmethod
|
||||
def __command(
|
||||
cls, system_settings: SystemSettings, func: Callable, kwargs: Dict[str, Any]
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
"""Run a command and return the output"""
|
||||
try:
|
||||
context_manager: Union[warnings.catch_warnings, ContextManager[None]] = (
|
||||
@@ -267,7 +267,7 @@ class StaticCommandRunner:
|
||||
obbject.warnings = list(map(cast_warning, warning_list))
|
||||
|
||||
except Exception as e:
|
||||
obbject = Obbject(
|
||||
obbject = OBBject(
|
||||
error=Error(message=str(e), error_kind=e.__class__.__name__)
|
||||
)
|
||||
if system_settings.debug_mode:
|
||||
@@ -278,7 +278,7 @@ class StaticCommandRunner:
|
||||
@classmethod
|
||||
def __chart(
|
||||
cls,
|
||||
obbject: Obbject,
|
||||
obbject: OBBject,
|
||||
user_settings: UserSettings,
|
||||
system_settings: SystemSettings,
|
||||
route: str,
|
||||
@@ -306,7 +306,7 @@ class StaticCommandRunner:
|
||||
execution_context: ExecutionContext,
|
||||
func: Callable,
|
||||
kwargs: Dict[str, Any],
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
"""Execute a function and return the output"""
|
||||
user_settings = execution_context.user_settings
|
||||
system_settings = execution_context.system_settings
|
||||
|
||||
@@ -10,7 +10,7 @@ from openbb_core.app.logs.formatters.formatter_with_exceptions import (
|
||||
from openbb_core.app.logs.handlers_manager import HandlersManager
|
||||
from openbb_core.app.logs.models.logging_settings import LoggingSettings
|
||||
from openbb_core.app.model.abstract.singleton import SingletonMeta
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.model.system_settings import SystemSettings
|
||||
from openbb_core.app.model.user_settings import UserSettings
|
||||
|
||||
@@ -182,7 +182,7 @@ class LoggingManager(metaclass=SingletonMeta):
|
||||
self,
|
||||
user_settings: UserSettings,
|
||||
system_settings: SystemSettings,
|
||||
obbject: Obbject,
|
||||
obbject: OBBject,
|
||||
route: str,
|
||||
func: Callable,
|
||||
kwargs: Dict[str, Any],
|
||||
@@ -196,8 +196,8 @@ class LoggingManager(metaclass=SingletonMeta):
|
||||
User Settings object.
|
||||
system_settings : SystemSettings
|
||||
System Settings object.
|
||||
obbject : Obbject
|
||||
Obbject object containing command output and error information.
|
||||
obbject : OBBject
|
||||
OBBject object containing command output and error information.
|
||||
route : str
|
||||
Route for the command.
|
||||
func : Callable
|
||||
|
||||
@@ -4,7 +4,7 @@ from typing import Any, Dict, List
|
||||
from pydantic import Field
|
||||
|
||||
from openbb_core.app.model.abstract.tagged import Tagged
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
|
||||
|
||||
class JournalEntry(Tagged):
|
||||
@@ -16,7 +16,7 @@ class JournalEntry(Tagged):
|
||||
duration: int = Field(
|
||||
description="Execution duration in nano second of the command."
|
||||
)
|
||||
output: Obbject = Field(description="Output of the command.")
|
||||
output: OBBject = Field(description="Output of the command.")
|
||||
route: str = Field(description="Route of the command.")
|
||||
timestamp: datetime = Field(description="Execution starting timestamp.")
|
||||
alias_list: List[str] = Field(
|
||||
|
||||
@@ -8,7 +8,7 @@ class JournalQuery(BaseModel):
|
||||
)
|
||||
ignore_error_output: bool = Field(
|
||||
default=True,
|
||||
description="Whether or not the JournalEntry with an Obbject.Error should be ignored.",
|
||||
description="Whether or not the JournalEntry with an OBBject.Error should be ignored.",
|
||||
)
|
||||
|
||||
class Config:
|
||||
|
||||
@@ -20,7 +20,7 @@ class OpenBBError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class Obbject(GenericModel, Generic[T], Tagged):
|
||||
class OBBject(GenericModel, Generic[T], Tagged):
|
||||
results: Optional[T] = Field(
|
||||
default=None,
|
||||
description="Serializable results.",
|
||||
|
||||
@@ -24,7 +24,7 @@ from typing_extensions import Annotated, _AnnotatedAlias
|
||||
|
||||
from openbb_core.app.model.abstract.warning import OpenBBWarning
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
@@ -125,7 +125,7 @@ class CommandValidator:
|
||||
sig = signature(func)
|
||||
return_type = sig.return_annotation
|
||||
|
||||
if issubclass(return_type, Obbject):
|
||||
if issubclass(return_type, OBBject):
|
||||
results_type = get_type_hints(return_type)["results"]
|
||||
if isinstance(results_type, type(None)):
|
||||
valid_return_type = False
|
||||
@@ -144,7 +144,7 @@ class CommandValidator:
|
||||
"Invalid return type in signature:"
|
||||
f" {func.__name__}(...) -> {sig.return_annotation}:\n"
|
||||
"Allowed return type:"
|
||||
f" {func.__name__}(...) -> Obbject[T] :\n"
|
||||
f" {func.__name__}(...) -> OBBject[T] :\n"
|
||||
"If you need T = None, use an empty model instead.\n"
|
||||
)
|
||||
|
||||
@@ -166,7 +166,7 @@ class Router:
|
||||
self._api_router = APIRouter(prefix=prefix)
|
||||
|
||||
@overload
|
||||
def command(self, func: Optional[Callable[P, Obbject]]) -> Callable[P, Obbject]:
|
||||
def command(self, func: Optional[Callable[P, OBBject]]) -> Callable[P, OBBject]:
|
||||
pass
|
||||
|
||||
@overload
|
||||
@@ -175,7 +175,7 @@ class Router:
|
||||
|
||||
def command(
|
||||
self,
|
||||
func: Optional[Callable[P, Obbject]] = None,
|
||||
func: Optional[Callable[P, OBBject]] = None,
|
||||
**kwargs,
|
||||
) -> Optional[Callable]:
|
||||
if func is None:
|
||||
@@ -215,8 +215,8 @@ class Router:
|
||||
class SignatureInspector:
|
||||
@classmethod
|
||||
def complete_signature(
|
||||
cls, func: Callable[P, Obbject], model: str
|
||||
) -> Optional[Callable[P, Obbject]]:
|
||||
cls, func: Callable[P, OBBject], model: str
|
||||
) -> Optional[Callable[P, OBBject]]:
|
||||
"""Complete function signature."""
|
||||
provider_interface = get_provider_interface()
|
||||
if model:
|
||||
@@ -257,7 +257,7 @@ class SignatureInspector:
|
||||
)
|
||||
|
||||
ReturnModel = provider_interface.return_schema[model]
|
||||
func.__annotations__["return"] = Obbject[ReturnModel] # type: ignore
|
||||
func.__annotations__["return"] = OBBject[ReturnModel] # type: ignore
|
||||
|
||||
elif (
|
||||
"provider_choices" in func.__annotations__
|
||||
@@ -272,7 +272,7 @@ class SignatureInspector:
|
||||
|
||||
@staticmethod
|
||||
def validate_signature(
|
||||
func: Callable[P, Obbject], expected: Dict[str, type]
|
||||
func: Callable[P, OBBject], expected: Dict[str, type]
|
||||
) -> None:
|
||||
"""Validate function signature before binding to model."""
|
||||
for k, v in expected.items():
|
||||
@@ -288,8 +288,8 @@ class SignatureInspector:
|
||||
|
||||
@staticmethod
|
||||
def inject_dependency(
|
||||
func: Callable[P, Obbject], arg: str, callable_: Any
|
||||
) -> Callable[P, Obbject]:
|
||||
func: Callable[P, OBBject], arg: str, callable_: Any
|
||||
) -> Callable[P, OBBject]:
|
||||
"""Annotate function with dependency injection."""
|
||||
func.__annotations__[arg] = Annotated[callable_, Depends()] # type: ignore
|
||||
return func
|
||||
|
||||
@@ -7,7 +7,7 @@ import pandas as pd
|
||||
from pydantic import ValidationError
|
||||
|
||||
from openbb_core.app.model.abstract.warning import OpenBBWarning
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.utils import df_to_basemodel
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def filter_inputs(**kwargs) -> dict:
|
||||
return kwargs
|
||||
|
||||
|
||||
def filter_output(obbject: Obbject) -> Obbject:
|
||||
def filter_output(obbject: OBBject) -> OBBject:
|
||||
"""Filter command output."""
|
||||
if obbject.warnings:
|
||||
for w in obbject.warnings:
|
||||
|
||||
@@ -7,7 +7,7 @@ from typing import Annotated, Literal, Optional, Union
|
||||
from pydantic import validate_arguments
|
||||
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -35,7 +35,7 @@ class CLASS_crypto(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
r"""Crypto Intraday Price.
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class CLASS_crypto(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
|
||||
@@ -9,7 +9,7 @@ from pydantic import validate_arguments
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -21,7 +21,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""CORECPI."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -50,7 +50,7 @@ class CLASS_economy(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Get the constituents of an index.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class CLASS_economy(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -216,7 +216,7 @@ class CLASS_economy(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fred"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""CPI.
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ class CLASS_economy(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -306,7 +306,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Get the options for v3 cpi(options=True)"""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -344,7 +344,7 @@ class CLASS_economy(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
r"""Get OHLCV data for an index.
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ class CLASS_economy(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -467,7 +467,7 @@ class CLASS_economy(Container):
|
||||
@validate_arguments
|
||||
def available_indices(
|
||||
self, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""AVAILABLE_INDICES.
|
||||
|
||||
|
||||
@@ -482,7 +482,7 @@ class CLASS_economy(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -539,7 +539,7 @@ class CLASS_economy(Container):
|
||||
@validate_arguments
|
||||
def risk(
|
||||
self, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Market Risk Premium.
|
||||
|
||||
|
||||
@@ -554,7 +554,7 @@ class CLASS_economy(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -611,7 +611,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Query EconDB for macro data."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -633,7 +633,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""MACRO_COUNTRIES."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -655,7 +655,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""MACRO_PARAMETERS."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -677,7 +677,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""BALANCE."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -699,7 +699,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""BIGMAC."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -721,7 +721,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""COUNTRY_CODES."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -743,7 +743,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""CURRENCIES."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -765,7 +765,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""DEBT."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -787,7 +787,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""EVENTS."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -809,7 +809,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""FGDP."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -831,7 +831,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""FRED."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -853,7 +853,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""FRED Search (was fred_notes)."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -875,7 +875,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""FUTURES. 2 sources"""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -897,7 +897,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""GDP."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -919,7 +919,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""GLBONDS."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -941,7 +941,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""INDICES."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -963,7 +963,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""OVERVIEW."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -985,7 +985,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""PERFMAP."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1007,7 +1007,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""PERFORMANCE."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1029,7 +1029,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""REVENUE."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1051,7 +1051,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""RGDP."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1073,7 +1073,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""RTPS."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1095,7 +1095,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""SEARCH_INDEX."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1117,7 +1117,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""SPENDING."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1139,7 +1139,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""TRUST."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1161,7 +1161,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""USBONDS."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
@@ -1183,7 +1183,7 @@ class CLASS_economy(Container):
|
||||
self,
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp", "fred", "polygon"]] = None,
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""VALUATION."""
|
||||
inputs = filter_inputs(
|
||||
provider_choices={
|
||||
|
||||
@@ -9,7 +9,7 @@ from pydantic import validate_arguments
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -34,7 +34,7 @@ class CLASS_fixedincome(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Get treasury rates.
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class CLASS_fixedincome(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -128,7 +128,7 @@ class CLASS_fixedincome(Container):
|
||||
@validate_arguments
|
||||
def ycrv(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Yield curve."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -7,7 +7,7 @@ from typing import Annotated, Literal, Optional, Union
|
||||
from pydantic import validate_arguments
|
||||
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -20,7 +20,7 @@ class CLASS_forex(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Forex Available Pairs.
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class CLASS_forex(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -149,7 +149,7 @@ class CLASS_forex(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
r"""Forex Intraday Price.
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class CLASS_forex(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
|
||||
@@ -9,7 +9,7 @@ from pydantic import validate_arguments
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -26,7 +26,7 @@ class CLASS_news(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Global News.
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class CLASS_news(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -143,7 +143,7 @@ class CLASS_news(Container):
|
||||
@validate_arguments
|
||||
def sectornews(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Sector news."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -11,7 +11,7 @@ import pydantic.types
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -24,7 +24,7 @@ class CLASS_qa(Container):
|
||||
data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame],
|
||||
target: str,
|
||||
chart: bool = False,
|
||||
) -> Obbject[openbb_qa.qa_models.NormalityModel]:
|
||||
) -> OBBject[openbb_qa.qa_models.NormalityModel]:
|
||||
"""
|
||||
Normality Statistics.
|
||||
|
||||
@@ -43,7 +43,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[NormalityModel]
|
||||
OBBject[NormalityModel]
|
||||
Normality tests summary. See qa_models.NormalityModel for details.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -66,7 +66,7 @@ class CLASS_qa(Container):
|
||||
data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame],
|
||||
target: str,
|
||||
chart: bool = False,
|
||||
) -> Obbject[openbb_qa.qa_models.CAPMModel]:
|
||||
) -> OBBject[openbb_qa.qa_models.CAPMModel]:
|
||||
"""Capital Asset Pricing Model."""
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
@@ -85,7 +85,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def qqplot(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""QQ Plot."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -107,7 +107,7 @@ class CLASS_qa(Container):
|
||||
threshold_start: float = 0.0,
|
||||
threshold_end: float = 1.5,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Omega Ratio.
|
||||
|
||||
Parameters
|
||||
@@ -123,7 +123,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[OmegaModel]]
|
||||
OBBject[List[OmegaModel]]
|
||||
Omega ratios.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -149,7 +149,7 @@ class CLASS_qa(Container):
|
||||
target: str,
|
||||
window: pydantic.types.PositiveInt,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Kurtosis.
|
||||
|
||||
Parameters
|
||||
@@ -163,7 +163,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Kurtosis.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -184,7 +184,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def pick(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Pick."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -201,7 +201,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def spread(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Spread."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -218,7 +218,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def rolling(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Rolling."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -235,7 +235,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def var(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Value at Risk."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -252,7 +252,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def line(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Line."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -269,7 +269,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def hist(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Histogram."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -291,7 +291,7 @@ class CLASS_qa(Container):
|
||||
fuller_reg: Literal["c", "ct", "ctt", "nc"] = "c",
|
||||
kpss_reg: Literal["c", "ct"] = "c",
|
||||
chart: bool = False,
|
||||
) -> Obbject[openbb_qa.qa_models.UnitRootModel]:
|
||||
) -> OBBject[openbb_qa.qa_models.UnitRootModel]:
|
||||
"""Unit Root Test.
|
||||
|
||||
Augmented Dickey-Fuller test for unit root.
|
||||
@@ -310,7 +310,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[UnitRootModel]
|
||||
OBBject[UnitRootModel]
|
||||
Unit root tests summary.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -332,7 +332,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def beta(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Beta."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -354,7 +354,7 @@ class CLASS_qa(Container):
|
||||
rfr: float = 0.0,
|
||||
window: pydantic.types.PositiveInt = 252,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Sharpe Ratio.
|
||||
|
||||
Parameters
|
||||
@@ -370,7 +370,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Sharpe ratio.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -398,7 +398,7 @@ class CLASS_qa(Container):
|
||||
window: pydantic.types.PositiveInt = 252,
|
||||
adjusted: bool = False,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Sortino Ratio.
|
||||
|
||||
For method & terminology see: http://www.redrockcapital.com/Sortino__A__Sharper__Ratio_Red_Rock_Capital.pdf
|
||||
@@ -418,7 +418,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Sortino ratio.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -441,7 +441,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def cusum(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Cumulative Sum."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -458,7 +458,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def raw(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Raw."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -475,7 +475,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def cdf(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Cumulative Distribution Function."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -492,7 +492,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def decompose(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Decompose."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -513,7 +513,7 @@ class CLASS_qa(Container):
|
||||
target: str,
|
||||
window: pydantic.types.PositiveInt,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Skewness.
|
||||
|
||||
Parameters
|
||||
@@ -527,7 +527,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
Skewness.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -553,7 +553,7 @@ class CLASS_qa(Container):
|
||||
window: pydantic.types.PositiveInt,
|
||||
quantile_pct: pydantic.types.NonNegativeFloat = 0.5,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Quantile."""
|
||||
inputs = filter_inputs(
|
||||
data=data,
|
||||
@@ -574,7 +574,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def bw(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Bandwidth."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -591,7 +591,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def es(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Expected Shortfall."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -608,7 +608,7 @@ class CLASS_qa(Container):
|
||||
@validate_arguments
|
||||
def acf(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Autocorrelation Function."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -628,7 +628,7 @@ class CLASS_qa(Container):
|
||||
data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame],
|
||||
target: str,
|
||||
chart: bool = False,
|
||||
) -> Obbject[openbb_qa.qa_models.SummaryModel]:
|
||||
) -> OBBject[openbb_qa.qa_models.SummaryModel]:
|
||||
"""Summary.
|
||||
|
||||
Parameters
|
||||
@@ -640,7 +640,7 @@ class CLASS_qa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[SummaryModel]
|
||||
OBBject[SummaryModel]
|
||||
Summary table.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
|
||||
@@ -10,7 +10,7 @@ from pydantic import validate_arguments
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -102,7 +102,7 @@ class CLASS_stocks(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
r"""Load stock data for a specific ticker.
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class CLASS_stocks(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -239,7 +239,7 @@ class CLASS_stocks(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["benzinga", "polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Get news for one or more stock tickers.
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ class CLASS_stocks(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -417,7 +417,7 @@ class CLASS_stocks(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Get valuation multiples for a stock ticker.
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ class CLASS_stocks(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -599,7 +599,7 @@ class CLASS_stocks(Container):
|
||||
@validate_arguments
|
||||
def tob(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""View top of book for loaded ticker (US exchanges only)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -616,7 +616,7 @@ class CLASS_stocks(Container):
|
||||
@validate_arguments
|
||||
def quote(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""View the current price for a specific stock ticker."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -633,7 +633,7 @@ class CLASS_stocks(Container):
|
||||
@validate_arguments
|
||||
def search(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Search a specific stock ticker for analysis."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -8,7 +8,7 @@ from pydantic import validate_arguments
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -24,7 +24,7 @@ class CLASS_stocks_ca(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Company peers.
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class CLASS_stocks_ca(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -93,7 +93,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def balance(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company balance sheet."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -110,7 +110,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def cashflow(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company cashflow."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -127,7 +127,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def hcorr(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company historical correlation."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -144,7 +144,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def hist(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company historical prices."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -161,7 +161,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def income(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company income statement."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -178,7 +178,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def scorr(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company sector correlation."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -195,7 +195,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def screener(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company screener."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -212,7 +212,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def sentiment(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company sentiment."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -229,7 +229,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def similar(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company similar."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -246,7 +246,7 @@ class CLASS_stocks_ca(Container):
|
||||
@validate_arguments
|
||||
def volume(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Company volume."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -6,7 +6,7 @@ from typing import Annotated, Literal, Optional
|
||||
from pydantic import validate_arguments
|
||||
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -135,7 +135,7 @@ class CLASS_stocks_dd(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""SEC Filings.
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ class CLASS_stocks_dd(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -14,7 +14,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def active(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Most active stocks by intraday trade volumes."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -31,7 +31,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def arkord(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Order by ARK INvestment Management LLC."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -48,7 +48,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def asc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Small cap stocks with revenue and earnings growth more than 25%."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -65,7 +65,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def dividends(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -81,7 +81,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def filings(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""The most-recent form submissions to the SEC."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -98,7 +98,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def fipo(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Future IPOs dates."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -115,7 +115,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def gainers(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show latest top gainers."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -132,7 +132,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def gtech(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Tech stocks with revenue and earnings growth more than 25%."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -149,7 +149,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def hotpenny(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Today's hot penny stocks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -166,7 +166,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def ipo(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -182,7 +182,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def losers(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show latest top losers."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -199,7 +199,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def lowfloat(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Low float stocks under 10M shares float."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -216,7 +216,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def pipo(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Past IPOs dates."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -233,7 +233,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def rtat(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Top 10 retail traded stocks per day."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -250,7 +250,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def trending(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Trending news."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -267,7 +267,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def ugs(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Undervalued stocks with revenue and earnings growth above 25%."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -284,7 +284,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def ulc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Potentially undervalued large cap stocks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -301,7 +301,7 @@ class CLASS_stocks_disc(Container):
|
||||
@validate_arguments
|
||||
def upcoming(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Upcoming earnings release dates."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -14,7 +14,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def psi(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Price vs short interest volume"""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -31,7 +31,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def ctb(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Cost to borrow of stocks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -48,7 +48,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def dpotc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Dark pools (ATS) vs OTC data."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -65,7 +65,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def ftd(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Fails-to-deliver data."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -82,7 +82,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def hsi(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show top high short interest stocks of over 20% ratio."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -99,7 +99,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def pos(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Dark pool short position."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -116,7 +116,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def prom(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Promising tickers based on dark pool shares regression."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -133,7 +133,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def psi_q(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -149,7 +149,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def psi_sg(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -165,7 +165,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def shorted(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Most shorted stocks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -182,7 +182,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def sidtc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Short interest and days to cover."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -199,7 +199,7 @@ class CLASS_stocks_dps(Container):
|
||||
@validate_arguments
|
||||
def spos(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Net short vs position."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -10,7 +10,7 @@ from pydantic import validate_arguments
|
||||
import openbb_core.app.model.command_context
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -20,7 +20,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def analysis(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Analyse SEC filings with the help of machine learning."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -53,7 +53,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Balance Sheet.
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -287,7 +287,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Balance Sheet Statement Growth.
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -454,7 +454,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Show Dividend Calendar for a given start and end dates.
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -554,7 +554,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Cash Flow Statement.
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -750,7 +750,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Cash Flow Statement Growth.
|
||||
|
||||
|
||||
@@ -768,7 +768,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -890,7 +890,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Executive Compensation.
|
||||
|
||||
|
||||
@@ -906,7 +906,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -996,7 +996,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Stock Split Calendar.
|
||||
|
||||
|
||||
@@ -1014,7 +1014,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -1074,7 +1074,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def customer(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""List of customers of the company."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1091,7 +1091,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def dcfc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Determine the (historical) discounted cash flow."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1114,7 +1114,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Historical Dividends.
|
||||
|
||||
|
||||
@@ -1130,7 +1130,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -1193,7 +1193,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def dupont(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Detailed breakdown for Return on Equity (RoE)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1220,7 +1220,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Earnings Calendar.
|
||||
|
||||
|
||||
@@ -1238,7 +1238,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -1312,7 +1312,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Number of Employees.
|
||||
|
||||
|
||||
@@ -1328,7 +1328,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -1395,7 +1395,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def enterprise(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Enterprise value."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1412,7 +1412,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def epsfc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Earnings Estimate by Analysts - EPS."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1445,7 +1445,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Analyst Estimates.
|
||||
|
||||
|
||||
@@ -1465,7 +1465,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -1560,7 +1560,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def fama_coe(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Fama French 3 Factor Model - Coefficient of Earnings."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1577,7 +1577,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def fama_raw(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Fama French 3 Factor Model - Raw Data."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1594,7 +1594,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def fraud(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Key fraud ratios including M-score, Z-score and McKee."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1611,7 +1611,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def growth(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Growth of financial statement items and ratios."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1628,7 +1628,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def historical_5(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -1660,7 +1660,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["polygon", "fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Income Statement.
|
||||
|
||||
|
||||
@@ -1680,7 +1680,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -1877,7 +1877,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Income Statement Growth.
|
||||
|
||||
|
||||
@@ -1897,7 +1897,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2051,7 +2051,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Stock Insider Trading.
|
||||
|
||||
|
||||
@@ -2075,7 +2075,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2171,7 +2171,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Institutional Ownership.
|
||||
|
||||
|
||||
@@ -2191,7 +2191,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2314,7 +2314,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def key(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -2346,7 +2346,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Key Metrics.
|
||||
|
||||
|
||||
@@ -2366,7 +2366,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2543,7 +2543,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Key Executives.
|
||||
|
||||
|
||||
@@ -2559,7 +2559,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2622,7 +2622,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def mktcap(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Obtain the market capitalization or enterprise value."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -2639,7 +2639,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def news(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -2661,7 +2661,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Company Overview.
|
||||
|
||||
|
||||
@@ -2677,7 +2677,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2812,7 +2812,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Stock Ownership.
|
||||
|
||||
|
||||
@@ -2832,7 +2832,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -2967,7 +2967,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Price Target Consensus.
|
||||
|
||||
|
||||
@@ -2983,7 +2983,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -3048,7 +3048,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Price Target.
|
||||
|
||||
|
||||
@@ -3064,7 +3064,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -3135,7 +3135,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def rating(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Analyst prices and ratings over time of the company."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -3152,7 +3152,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def ratios(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Extensive set of ratios over time."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -3169,7 +3169,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def revfc(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Earning Estimate by Analysts - Revenue."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -3202,7 +3202,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Revenue Geographic.
|
||||
|
||||
|
||||
@@ -3222,7 +3222,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -3301,7 +3301,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Revenue Business Line.
|
||||
|
||||
|
||||
@@ -3321,7 +3321,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -3376,7 +3376,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def rot(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Number of analyst ratings over time on a monthly basis."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -3393,7 +3393,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def score(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Value investing scores for any time period."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -3410,7 +3410,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def sec(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -3426,7 +3426,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def shares(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -3448,7 +3448,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Share Statistics.
|
||||
|
||||
|
||||
@@ -3464,7 +3464,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -3531,7 +3531,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Historical Stock Splits.
|
||||
|
||||
|
||||
@@ -3547,7 +3547,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
@@ -3604,7 +3604,7 @@ class CLASS_stocks_fa(Container):
|
||||
@validate_arguments
|
||||
def supplier(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""List of suppliers of the company."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -3639,7 +3639,7 @@ class CLASS_stocks_fa(Container):
|
||||
chart: bool = False,
|
||||
provider: Optional[Literal["fmp"]] = None,
|
||||
**kwargs
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Earnings Call Transcript.
|
||||
|
||||
|
||||
@@ -3659,7 +3659,7 @@ class CLASS_stocks_fa(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject
|
||||
OBBject
|
||||
results: List[Data]
|
||||
Serializable results.
|
||||
provider: Optional[PROVIDERS]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -14,7 +14,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def contracts(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return government contracts."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -31,7 +31,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def government_trading(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return government trading."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -48,7 +48,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def gtrades(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return government trades."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -65,7 +65,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def histcont(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Historical quarterly government contracts."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -82,7 +82,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def lastcontracts(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return last government contracts given out."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -99,7 +99,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def lasttrades(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Last trades."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -116,7 +116,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def lobbying(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Corporate lobbying details."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -133,7 +133,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def qtrcontracts(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Quarterly government contracts analysis."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -150,7 +150,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def topbuys(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show most purchased stocks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -167,7 +167,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def toplobbying(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Top corporate lobbying tickers."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -184,7 +184,7 @@ class CLASS_stocks_gov(Container):
|
||||
@validate_arguments
|
||||
def topsells(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show most sold stocks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -14,7 +14,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def act(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Insider activity over time."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -31,7 +31,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def blcp(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Big latest CEO/CFO purchaces ($25k+)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -48,7 +48,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def blcs(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Big latest CEO/CFO sales ($100k+)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -65,7 +65,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def blip(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Big latest insider purchaces ($25+)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -82,7 +82,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def blis(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Big latest insider sales ($100k+)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -99,7 +99,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def blop(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Big latest officer purchaces ($25k+)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -116,7 +116,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def blos(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Big latest officer sales ($100k+)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -133,7 +133,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def filt(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Filter insiders based on preset."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -150,7 +150,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def lcb(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Latest cluster buys."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -167,7 +167,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def lins(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Last insider trading of the company."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -184,7 +184,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def lip(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Latest insider purchaces."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -201,7 +201,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def lis(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Latest insider sales."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -218,7 +218,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def lit(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Latest insider trading (all filings)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -235,7 +235,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def lpsb(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Latest penny stock buys."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -252,7 +252,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def print_insider_data(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Print insider data."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -269,7 +269,7 @@ class CLASS_stocks_ins(Container):
|
||||
@validate_arguments
|
||||
def stats(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Insider stats of the company."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -14,7 +14,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def chains(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return options chains with greeks."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -31,7 +31,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def dte(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -47,7 +47,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def eodchain(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Gets option chain at a specific date."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -64,7 +64,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def expirations(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return options expirations."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -81,7 +81,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def grhist(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot option greek history."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -98,7 +98,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def hist(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot option history."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -115,7 +115,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def info(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Display option information (volatility, IV rank, etc.)."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -132,7 +132,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def last_price(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Return last price of an option."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -149,7 +149,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def oi(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot option open interest."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -166,7 +166,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def pcr(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Display put/call ratio for ticker."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -183,7 +183,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def price(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
)
|
||||
@@ -199,7 +199,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def unu(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show unusual options activity."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -216,7 +216,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def voi(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot volume and open interest."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -233,7 +233,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def vol(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot volume."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -250,7 +250,7 @@ class CLASS_stocks_options(Container):
|
||||
@validate_arguments
|
||||
def vsurf(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Show 3D volatility surface."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
|
||||
@@ -10,7 +10,7 @@ import pydantic.types
|
||||
from pydantic import validate_arguments
|
||||
|
||||
import openbb_core.app.model.results.empty
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.container import Container
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
|
||||
@@ -27,7 +27,7 @@ class CLASS_ta(Container):
|
||||
drift: pydantic.types.NonNegativeInt = 1,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Average True Range is used to measure volatility, especially volatility caused by
|
||||
gaps or limit moves.
|
||||
@@ -49,7 +49,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -86,7 +86,7 @@ class CLASS_ta(Container):
|
||||
start_date: Optional[str] = None,
|
||||
end_date: Optional[str] = None,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Fibonacci Retracement Levels.
|
||||
|
||||
@@ -101,7 +101,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -135,7 +135,7 @@ class CLASS_ta(Container):
|
||||
index: str = "date",
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The On Balance Volume (OBV) is a cumulative total of the up and
|
||||
down volume. When the close is higher than the previous close, the volume is added
|
||||
@@ -158,7 +158,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -190,7 +190,7 @@ class CLASS_ta(Container):
|
||||
length: pydantic.types.PositiveInt = 14,
|
||||
signal: pydantic.types.PositiveInt = 1,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Fisher Transform is a technical indicator created by John F. Ehlers
|
||||
that converts prices into a Gaussian normal distribution.1 The indicator
|
||||
@@ -211,7 +211,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
List of data with the indicator applied.
|
||||
|
||||
Examples
|
||||
@@ -245,7 +245,7 @@ class CLASS_ta(Container):
|
||||
slow: pydantic.types.PositiveInt = 10,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Accumulation/Distribution Oscillator, also known as the Chaikin Oscillator
|
||||
is essentially a momentum indicator, but of the Accumulation-Distribution line
|
||||
@@ -268,7 +268,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
|
||||
Examples
|
||||
--------
|
||||
@@ -296,7 +296,7 @@ class CLASS_ta(Container):
|
||||
@validate_arguments
|
||||
def tv(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""TradingView."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -321,7 +321,7 @@ class CLASS_ta(Container):
|
||||
mamode: Literal["sma", "ema", "wma", "rma"] = "sma",
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Bollinger Bands consist of three lines. The middle band is a simple
|
||||
moving average (generally 20 periods) of the typical price (TP). The upper and lower
|
||||
@@ -355,7 +355,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -388,7 +388,7 @@ class CLASS_ta(Container):
|
||||
@validate_arguments
|
||||
def multi(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Plot multiple indicators on the same chart."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -411,7 +411,7 @@ class CLASS_ta(Container):
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The zero lag exponential moving average (ZLEMA) indicator
|
||||
was created by John Ehlers and Ric Way. The idea is do a
|
||||
@@ -436,7 +436,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -470,7 +470,7 @@ class CLASS_ta(Container):
|
||||
length: int = 25,
|
||||
scalar: int = 100,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The word aroon is Sanskrit for "dawn's early light." The Aroon
|
||||
indicator attempts to show when a new trend is dawning. The indicator consists
|
||||
@@ -498,7 +498,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -532,7 +532,7 @@ class CLASS_ta(Container):
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Moving Averages are used to smooth the data in an array to
|
||||
help eliminate noise and identify trends. The Simple Moving Average is literally
|
||||
@@ -557,7 +557,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -593,7 +593,7 @@ class CLASS_ta(Container):
|
||||
asint: bool = False,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Demark sequential indicator
|
||||
|
||||
@@ -614,7 +614,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -649,7 +649,7 @@ class CLASS_ta(Container):
|
||||
anchor: str = "D",
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Volume Weighted Average Price that measures the average typical price
|
||||
by volume. It is typically used with intraday charts to identify general direction.
|
||||
@@ -669,7 +669,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -697,7 +697,7 @@ class CLASS_ta(Container):
|
||||
@validate_arguments
|
||||
def recom(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Recommendation."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -721,7 +721,7 @@ class CLASS_ta(Container):
|
||||
slow: int = 26,
|
||||
signal: int = 9,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Moving Average Convergence Divergence (MACD) is the difference
|
||||
between two Exponential Moving Averages. The Signal line is an Exponential Moving
|
||||
@@ -750,7 +750,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -786,7 +786,7 @@ class CLASS_ta(Container):
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Hull Moving Average solves the age old dilemma of making a moving average
|
||||
more responsive to current price activity whilst maintaining curve smoothness.
|
||||
@@ -808,7 +808,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -843,7 +843,7 @@ class CLASS_ta(Container):
|
||||
upper_length: pydantic.types.PositiveInt = 20,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Donchian Channels are three lines generated by moving average
|
||||
calculations that comprise an indicator formed by upper and lower
|
||||
@@ -867,7 +867,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -904,7 +904,7 @@ class CLASS_ta(Container):
|
||||
offset: pydantic.types.PositiveInt = 26,
|
||||
lookahead: bool = False,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that
|
||||
defines support and resistance, identifies trend direction, gauges momentum and provides
|
||||
@@ -955,7 +955,7 @@ class CLASS_ta(Container):
|
||||
target: str = "adj_close",
|
||||
period: pydantic.types.PositiveInt = 90,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Clenow Volatility Adjusted Momentum.
|
||||
|
||||
@@ -972,7 +972,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -1004,7 +1004,7 @@ class CLASS_ta(Container):
|
||||
index: str = "date",
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Accumulation/Distribution Line is similar to the On Balance
|
||||
Volume (OBV), which sums the volume times +1/-1 based on whether the close is
|
||||
@@ -1030,7 +1030,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
|
||||
Examples
|
||||
--------
|
||||
@@ -1062,7 +1062,7 @@ class CLASS_ta(Container):
|
||||
scalar: float = 100.0,
|
||||
drift: int = 1,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The ADX is a Welles Wilder style moving average of the Directional Movement Index (DX).
|
||||
The values range from 0 to 100, but rarely get above 60. To interpret the ADX, consider
|
||||
@@ -1083,7 +1083,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
@@ -1118,7 +1118,7 @@ class CLASS_ta(Container):
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
A Weighted Moving Average puts more weight on recent data and less on past data.
|
||||
This is done by multiplying each bar’s price by a weighting factor. Because of its
|
||||
@@ -1140,7 +1140,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The WMA data.
|
||||
|
||||
Examples
|
||||
@@ -1174,7 +1174,7 @@ class CLASS_ta(Container):
|
||||
length: pydantic.types.PositiveInt = 14,
|
||||
scalar: pydantic.types.PositiveFloat = 0.015,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The CCI is designed to detect beginning and ending market trends.
|
||||
The range of 100 to -100 is the normal trading range. CCI values outside of this
|
||||
@@ -1195,7 +1195,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The CCI data.
|
||||
"""
|
||||
inputs = filter_inputs(
|
||||
@@ -1224,7 +1224,7 @@ class CLASS_ta(Container):
|
||||
scalar: float = 100.0,
|
||||
drift: int = 1,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Relative Strength Index (RSI) calculates a ratio of the
|
||||
recent upward price movements to the absolute price movement. The RSI ranges
|
||||
@@ -1249,7 +1249,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The RSI data.
|
||||
|
||||
Examples
|
||||
@@ -1279,7 +1279,7 @@ class CLASS_ta(Container):
|
||||
@validate_arguments
|
||||
def summary(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Summary."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1302,7 +1302,7 @@ class CLASS_ta(Container):
|
||||
slow_d_period: pydantic.types.NonNegativeInt = 3,
|
||||
slow_k_period: pydantic.types.NonNegativeInt = 3,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Stochastic Oscillator measures where the close is in relation
|
||||
to the recent trading range. The values range from zero to 100. %D values over 75
|
||||
@@ -1326,7 +1326,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The Stochastic Oscillator data.
|
||||
|
||||
Examples
|
||||
@@ -1355,7 +1355,7 @@ class CLASS_ta(Container):
|
||||
@validate_arguments
|
||||
def rsp(
|
||||
self, chart: bool = False
|
||||
) -> Obbject[openbb_core.app.model.results.empty.Empty]:
|
||||
) -> OBBject[openbb_core.app.model.results.empty.Empty]:
|
||||
"""Relative Strength Performance."""
|
||||
inputs = filter_inputs(
|
||||
chart=chart,
|
||||
@@ -1379,7 +1379,7 @@ class CLASS_ta(Container):
|
||||
mamode: Literal["ema", "sma", "wma", "hma", "zlma"] = "ema",
|
||||
offset: pydantic.types.NonNegativeInt = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
Keltner Channels are volatility-based bands that are placed
|
||||
on either side of an asset's price and can aid in determining
|
||||
@@ -1404,7 +1404,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The Keltner Channels data.
|
||||
|
||||
Examples
|
||||
@@ -1438,7 +1438,7 @@ class CLASS_ta(Container):
|
||||
index: str = "date",
|
||||
length: pydantic.types.PositiveInt = 14,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Center of Gravity indicator, in short, is used to anticipate future price movements
|
||||
and to trade on price reversals as soon as they happen. However, just like other oscillators,
|
||||
@@ -1457,7 +1457,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The COG data.
|
||||
|
||||
Examples
|
||||
@@ -1498,7 +1498,7 @@ class CLASS_ta(Container):
|
||||
] = "STD",
|
||||
is_crypto: bool = False,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""Calculate the realized volatility quantiles over rolling windows of time.
|
||||
|
||||
The model for calculating volatility is selectable.
|
||||
@@ -1540,7 +1540,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The cones data.
|
||||
|
||||
Examples
|
||||
@@ -1576,7 +1576,7 @@ class CLASS_ta(Container):
|
||||
length: int = 50,
|
||||
offset: int = 0,
|
||||
chart: bool = False,
|
||||
) -> Obbject[typing.List]:
|
||||
) -> OBBject[typing.List]:
|
||||
"""
|
||||
The Exponential Moving Average is a staple of technical
|
||||
analysis and is used in countless technical indicators. In a Simple Moving
|
||||
@@ -1602,7 +1602,7 @@ class CLASS_ta(Container):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Obbject[List[Data]]
|
||||
OBBject[List[Data]]
|
||||
The calculated data.
|
||||
|
||||
Examples
|
||||
|
||||
@@ -179,7 +179,7 @@ class ImportDefinition:
|
||||
"""Build the import definition."""
|
||||
hint_type_list = cls.get_path_hint_type_list(path=path)
|
||||
code = "\nfrom openbb_core.app.static.container import Container"
|
||||
code += "\nfrom openbb_core.app.model.obbject import Obbject"
|
||||
code += "\nfrom openbb_core.app.model.obbject import OBBject"
|
||||
code += (
|
||||
"\nfrom openbb_core.app.model.custom_parameter import OpenBBCustomParameter"
|
||||
)
|
||||
@@ -247,7 +247,7 @@ class DocstringGenerator:
|
||||
obbject_description = (
|
||||
"\nReturns\n"
|
||||
"-------\n"
|
||||
"Obbject\n"
|
||||
"OBBject\n"
|
||||
" results: List[Data]\n"
|
||||
" Serializable results.\n"
|
||||
" provider: Optional[PROVIDERS]\n"
|
||||
@@ -582,18 +582,18 @@ class MethodDefinition:
|
||||
else:
|
||||
item_type = get_args(get_type_hints(return_type)["results"])[0]
|
||||
if item_type.__module__ == "builtins":
|
||||
func_returns = f"Obbject[{item_type.__name__}]"
|
||||
func_returns = f"OBBject[{item_type.__name__}]"
|
||||
# elif get_origin(item_type) == list:
|
||||
# inner_type = get_args(item_type)[0]
|
||||
# select = f"[{inner_type.__module__}.{inner_type.__name__}]"
|
||||
# func_returns = f"Obbject[{item_type.__module__}.{item_type.__name__}[{select}]]"
|
||||
# func_returns = f"OBBject[{item_type.__module__}.{item_type.__name__}[{select}]]"
|
||||
else:
|
||||
inner_type_name = (
|
||||
item_type.__name__
|
||||
if hasattr(item_type, "__name__")
|
||||
else item_type._name
|
||||
)
|
||||
func_returns = f"Obbject[{item_type.__module__}.{inner_type_name}]"
|
||||
func_returns = f"OBBject[{item_type.__module__}.{inner_type_name}]"
|
||||
|
||||
return func_returns
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class MockLoggingSettings:
|
||||
self.user_settings = user_settings
|
||||
|
||||
|
||||
class MockObbject(BaseModel):
|
||||
class MockOBBject(BaseModel):
|
||||
output: Optional[str]
|
||||
error: Optional[str]
|
||||
|
||||
@@ -108,7 +108,7 @@ def test_log_startup(logging_manager):
|
||||
(
|
||||
"mock_settings",
|
||||
"mock_system",
|
||||
MockObbject(output="mock_output"),
|
||||
MockOBBject(output="mock_output"),
|
||||
"mock_route",
|
||||
"mock_func",
|
||||
{},
|
||||
@@ -116,7 +116,7 @@ def test_log_startup(logging_manager):
|
||||
(
|
||||
"mock_settings",
|
||||
"mock_system",
|
||||
MockObbject(error="mock_error"),
|
||||
MockOBBject(error="mock_error"),
|
||||
"mock_route",
|
||||
"mock_func",
|
||||
{},
|
||||
@@ -124,7 +124,7 @@ def test_log_startup(logging_manager):
|
||||
(
|
||||
"mock_settings",
|
||||
"mock_system",
|
||||
MockObbject(error="mock_error"),
|
||||
MockOBBject(error="mock_error"),
|
||||
"login",
|
||||
"mock_func",
|
||||
{},
|
||||
|
||||
@@ -2,16 +2,16 @@ from unittest.mock import MagicMock, patch
|
||||
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from openbb_core.app.model.command_output import Chart, Obbject, OpenBBError
|
||||
from openbb_core.app.model.command_output import Chart, OBBject, OpenBBError
|
||||
|
||||
|
||||
def test_command_output():
|
||||
co = Obbject()
|
||||
assert isinstance(co, Obbject)
|
||||
co = OBBject()
|
||||
assert isinstance(co, OBBject)
|
||||
|
||||
|
||||
def test_fields():
|
||||
fields = Obbject.__fields__.keys()
|
||||
fields = OBBject.__fields__.keys()
|
||||
|
||||
assert "results" in fields
|
||||
assert "provider" in fields
|
||||
@@ -21,7 +21,7 @@ def test_fields():
|
||||
|
||||
|
||||
def test_to_dataframe_no_results():
|
||||
co = Obbject()
|
||||
co = OBBject()
|
||||
with pytest.raises(Exception):
|
||||
co.to_dataframe()
|
||||
|
||||
@@ -50,7 +50,7 @@ def test_to_dataframe_no_results():
|
||||
)
|
||||
def test_to_dataframe(results, expected_df):
|
||||
# Arrange
|
||||
co = Obbject(results=results)
|
||||
co = OBBject(results=results)
|
||||
|
||||
# Act and Assert
|
||||
if isinstance(expected_df, pd.DataFrame):
|
||||
@@ -87,7 +87,7 @@ def test_to_dataframe(results, expected_df):
|
||||
)
|
||||
def test_to_dict(results, expected):
|
||||
# Arrange
|
||||
co = Obbject(results=results)
|
||||
co = OBBject(results=results)
|
||||
|
||||
# Act
|
||||
result = co.to_dict()
|
||||
@@ -101,7 +101,7 @@ def test_to_dict(results, expected):
|
||||
@patch("openbb_core.app.model.command_output.Chart")
|
||||
def test_to_plotly_json_with_existing_chart(mock_chart, mock_charting_manager):
|
||||
# Arrange
|
||||
mock_instance = Obbject()
|
||||
mock_instance = OBBject()
|
||||
mock_instance.chart = Chart(content={"existing_chart_data": "some_data"})
|
||||
|
||||
# Act
|
||||
@@ -115,7 +115,7 @@ def test_to_plotly_json_with_existing_chart(mock_chart, mock_charting_manager):
|
||||
mock_chart.assert_not_called()
|
||||
|
||||
|
||||
@patch("openbb_core.app.model.command_output.Obbject.to_dataframe")
|
||||
@patch("openbb_core.app.model.command_output.OBBject.to_dataframe")
|
||||
@patch("openbb_core.app.model.command_output.ChartingManager")
|
||||
@patch("openbb_core.app.model.command_output.Chart")
|
||||
def test_to_plotly_json_with_new_chart(
|
||||
@@ -133,7 +133,7 @@ def test_to_plotly_json_with_new_chart(
|
||||
return pd.DataFrame(data)
|
||||
|
||||
# Arrange
|
||||
mock_instance = Obbject()
|
||||
mock_instance = OBBject()
|
||||
mock_charting_manager_instance = mock_charting_manager.return_value
|
||||
mock_charting_manager_instance.to_plotly_json.return_value = {
|
||||
"new_chart_data": "some_data"
|
||||
@@ -161,7 +161,7 @@ def test_to_plotly_json_with_new_chart(
|
||||
|
||||
|
||||
def test_show_chart_exists():
|
||||
mock_instance = Obbject()
|
||||
mock_instance = OBBject()
|
||||
# Arrange
|
||||
mock_instance.chart = MagicMock(spec=Chart)
|
||||
|
||||
@@ -173,7 +173,7 @@ def test_show_chart_exists():
|
||||
|
||||
|
||||
def test_show_chart_not_found():
|
||||
mock_instance = Obbject()
|
||||
mock_instance = OBBject()
|
||||
# Arrange
|
||||
mock_instance.chart = None
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Test the filters.py file."""
|
||||
|
||||
import pytest
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output
|
||||
from pandas import DataFrame
|
||||
|
||||
@@ -39,6 +39,6 @@ def test_filter_inputs_df():
|
||||
|
||||
def test_filter_output():
|
||||
"""Test filter_output."""
|
||||
obbject = filter_output(Obbject())
|
||||
obbject = filter_output(OBBject())
|
||||
|
||||
assert obbject is not None
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import pytest
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
@@ -105,8 +105,8 @@ def test_check_return_error(command_validator):
|
||||
def test_check_return(command_validator):
|
||||
"""Test check_return."""
|
||||
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
assert command_validator.check_return(valid_function) is None
|
||||
|
||||
@@ -114,8 +114,8 @@ def test_check_return(command_validator):
|
||||
def test_check(command_validator):
|
||||
"""Test check."""
|
||||
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
assert command_validator.check(valid_function) is None
|
||||
|
||||
@@ -135,8 +135,8 @@ def test_command(router):
|
||||
"""Test command."""
|
||||
|
||||
@router.command
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
assert valid_function
|
||||
|
||||
@@ -182,7 +182,7 @@ def test_complete_signature(signature_inspector):
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
pass
|
||||
|
||||
model = "StockEOD"
|
||||
@@ -193,8 +193,8 @@ def test_complete_signature(signature_inspector):
|
||||
def test_complete_signature_error(signature_inspector):
|
||||
"""Test complete_signature."""
|
||||
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
with pytest.raises(AttributeError):
|
||||
signature_inspector.complete_signature(valid_function, "invalid_model")
|
||||
@@ -208,7 +208,7 @@ def test_validate_signature(signature_inspector):
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
pass
|
||||
|
||||
expected_signature = {
|
||||
@@ -232,7 +232,7 @@ def test_inject_dependency(signature_inspector):
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
pass
|
||||
|
||||
assert signature_inspector.inject_dependency(sample_function, "cc", CommandContext)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import pytest
|
||||
from openbb_core.app.model.command_context import CommandContext
|
||||
from openbb_core.app.model.obbject import Obbject
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
from openbb_core.app.provider_interface import (
|
||||
ExtraParams,
|
||||
ProviderChoices,
|
||||
@@ -105,8 +105,8 @@ def test_check_return_error(command_validator):
|
||||
def test_check_return(command_validator):
|
||||
"""Test check_return."""
|
||||
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
assert command_validator.check_return(valid_function) is None
|
||||
|
||||
@@ -114,8 +114,8 @@ def test_check_return(command_validator):
|
||||
def test_check(command_validator):
|
||||
"""Test check."""
|
||||
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
assert command_validator.check(valid_function) is None
|
||||
|
||||
@@ -135,8 +135,8 @@ def test_command(router):
|
||||
"""Test command."""
|
||||
|
||||
@router.command
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
assert valid_function
|
||||
|
||||
@@ -182,7 +182,7 @@ def test_complete_signature(signature_inspector):
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
pass
|
||||
|
||||
model = "StockEOD"
|
||||
@@ -193,8 +193,8 @@ def test_complete_signature(signature_inspector):
|
||||
def test_complete_signature_error(signature_inspector):
|
||||
"""Test complete_signature."""
|
||||
|
||||
def valid_function() -> Obbject[int]:
|
||||
return Obbject(results=[1, 2, 3])
|
||||
def valid_function() -> OBBject[int]:
|
||||
return OBBject(results=[1, 2, 3])
|
||||
|
||||
with pytest.raises(AttributeError):
|
||||
signature_inspector.complete_signature(valid_function, "invalid_model")
|
||||
@@ -208,7 +208,7 @@ def test_validate_signature(signature_inspector):
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
pass
|
||||
|
||||
expected_signature = {
|
||||
@@ -232,7 +232,7 @@ def test_inject_dependency(signature_inspector):
|
||||
provider_choices: ProviderChoices,
|
||||
standard_params: StandardParams,
|
||||
extra_params: ExtraParams,
|
||||
) -> Obbject:
|
||||
) -> OBBject:
|
||||
pass
|
||||
|
||||
assert signature_inspector.inject_dependency(sample_function, "cc", CommandContext)
|
||||
|
||||
Reference in New Issue
Block a user