Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…minal into develop
  • Loading branch information
jmaslek committed Feb 29, 2024
2 parents 8b68f23 + b47c9cc commit 6a8a1ea
Show file tree
Hide file tree
Showing 44 changed files with 1,714 additions and 840 deletions.
1,543 changes: 1,193 additions & 350 deletions examples/findSymbols.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion openbb_platform/core/integration/test_obbject.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_to_chart(obb):
"""Test obbject to chart."""

res = obb.equity.price.historical("AAPL", provider="fmp")
res.charting.to_chart()
res.charting.to_chart(render=False)
assert isinstance(res.chart.fig, OpenBBFigure)


Expand Down
15 changes: 8 additions & 7 deletions openbb_platform/extensions/equity/integration/test_equity_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,14 @@ def test_equity_ownership_insider_trading(params, headers):
"provider": "fmp",
}
),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"limit": 100,
}
),
# Disabled due to unreliable Intrinio endpoint
# (
# {
# "provider": "intrinio",
# "symbol": "AAPL",
# "limit": 100,
# }
# ),
],
)
@pytest.mark.integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,14 @@ def test_equity_ownership_insider_trading(params, obb):
"provider": "fmp",
}
),
(
{
"provider": "intrinio",
"symbol": "AAPL",
"limit": 100,
}
),
# Disabled due to unreliable Intrinio endpoint
# (
# {
# "provider": "intrinio",
# "symbol": "AAPL",
# "limit": 100,
# }
# ),
],
)
@pytest.mark.integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def to_chart(
index = (
data.index.name
if has_data and isinstance(data, (pd.DataFrame, pd.Series))
else ""
else None
)
data_as_df: pd.DataFrame = (
basemodel_to_df(convert_to_basemodel(data), index=index)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ def __plot__(
if not isinstance(indicators, ChartIndicators):
indicators = ChartIndicators.from_dict(indicators or dict(dict()))

# Apply to_datetime to the index in a way that handles daylight savings.
df_stock.loc[:, "date"] = df_stock.index # type: ignore
df_stock["date"] = df_stock["date"].apply(pd.to_datetime)
df_stock.index = df_stock["date"] # type: ignore
df_stock.drop(columns=["date"], inplace=True)

self.indicators = indicators
self.intraday = df_stock.index[-2].time() != df_stock.index[-1].time()
self.df_stock = df_stock.sort_index(ascending=True)
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/openbb/package/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def search(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CryptoSearch
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/openbb/package/crypto_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def historical(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CryptoHistorical
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/openbb/package/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def search(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CurrencyPairs
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/openbb/package/currency_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def historical(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CurrencyHistorical
Expand Down
4 changes: 2 additions & 2 deletions openbb_platform/openbb/package/derivatives_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def chains(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
OptionsChains
Expand Down Expand Up @@ -209,7 +209,7 @@ def unusual(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
OptionsUnusual
Expand Down
22 changes: 11 additions & 11 deletions openbb_platform/openbb/package/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def calendar(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
EconomicCalendar
Expand Down Expand Up @@ -195,7 +195,7 @@ def composite_leading_indicator(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CLI
Expand Down Expand Up @@ -313,7 +313,7 @@ def cpi(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
ConsumerPriceIndex
Expand Down Expand Up @@ -461,7 +461,7 @@ def fred_regional(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
FredRegional
Expand Down Expand Up @@ -560,7 +560,7 @@ def fred_search(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
FredSearch
Expand Down Expand Up @@ -730,7 +730,7 @@ def fred_series(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
FredSeries
Expand Down Expand Up @@ -833,7 +833,7 @@ def long_term_interest_rate(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
LTIR
Expand Down Expand Up @@ -920,7 +920,7 @@ def money_measures(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
MoneyMeasures
Expand Down Expand Up @@ -992,7 +992,7 @@ def risk_premium(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
RiskPremium
Expand Down Expand Up @@ -1079,7 +1079,7 @@ def short_term_interest_rate(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
STIR
Expand Down Expand Up @@ -1168,7 +1168,7 @@ def unemployment(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
Unemployment
Expand Down
6 changes: 3 additions & 3 deletions openbb_platform/openbb/package/economy_gdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def forecast(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
GdpForecast
Expand Down Expand Up @@ -171,7 +171,7 @@ def nominal(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
GdpNominal
Expand Down Expand Up @@ -259,7 +259,7 @@ def real(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
GdpReal
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/openbb/package/equity.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def market_snapshots(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
MarketSnapshots
Expand Down Expand Up @@ -257,7 +257,7 @@ def profile(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
EquityInfo
Expand Down Expand Up @@ -470,7 +470,7 @@ def screener(self, provider: Optional[Literal["fmp"]] = None, **kwargs) -> OBBje
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
EquityScreener
Expand Down Expand Up @@ -573,7 +573,7 @@ def search(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
EquitySearch
Expand Down
8 changes: 4 additions & 4 deletions openbb_platform/openbb/package/equity_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def dividend(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CalendarDividend
Expand Down Expand Up @@ -158,7 +158,7 @@ def earnings(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CalendarEarnings
Expand Down Expand Up @@ -272,7 +272,7 @@ def ipo(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CalendarIpo
Expand Down Expand Up @@ -430,7 +430,7 @@ def splits(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
CalendarSplits
Expand Down
2 changes: 1 addition & 1 deletion openbb_platform/openbb/package/equity_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def peers(
List of warnings.
chart : Optional[Chart]
Chart object.
extra: Dict[str, Any]
extra : Dict[str, Any]
Extra info.
EquityPeers
Expand Down
Loading

0 comments on commit 6a8a1ea

Please sign in to comment.