Skip to content

Commit

Permalink
Rename ta qa (#5708)
Browse files Browse the repository at this point in the history
* Rename ta folder

* Rename ta to technical

* Rename qa folder

* Rename qa to quantitative

* Rename the actual routes in quantitative
  • Loading branch information
piiq authored Nov 10, 2023
1 parent 7ae881a commit 3c1510f
Show file tree
Hide file tree
Showing 29 changed files with 343 additions and 3,137 deletions.
4 changes: 2 additions & 2 deletions openbb_platform/dev_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
openbb-charting = { path = "./extensions/charting", optional = true, develop = true }
openbb-econometrics = { path = "./extensions/econometrics", optional = true, develop = true }
openbb-futures = { path = "./extensions/futures", optional = true, develop = true }
openbb-qa = { path = "./extensions/qa", optional = true, develop = true }
openbb-ta = { path = "./extensions/ta", optional = true, develop = true }
openbb-quantitative = { path = "./extensions/quantitative", optional = true, develop = true }
openbb-technical = { path = "./extensions/technical", optional = true, develop = true }
"""

pyproject_toml = toml.load(PYPROJECT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_chart_ta_adx(params, obb):

params["data"] = get_equity_data()

result = obb.ta.adx(**params)
result = obb.technical.adx(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_chart_ta_aroon(params, obb):

params["data"] = get_equity_data()

result = obb.ta.aroon(**params)
result = obb.technical.aroon(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -185,7 +185,7 @@ def test_chart_ta_ema(params, obb):

params["data"] = get_equity_data()

result = obb.ta.ema(**params)
result = obb.technical.ema(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -215,7 +215,7 @@ def test_chart_ta_hma(params, obb):

params["data"] = get_equity_data()

result = obb.ta.hma(**params)
result = obb.technical.hma(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -246,7 +246,7 @@ def test_chart_ta_macd(params, obb):

params["data"] = get_equity_data()

result = obb.ta.macd(**params)
result = obb.technical.macd(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -277,7 +277,7 @@ def test_chart_ta_rsi(params, obb):

params["data"] = get_equity_data()

result = obb.ta.rsi(**params)
result = obb.technical.rsi(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -307,7 +307,7 @@ def test_chart_ta_sma(params, obb):

params["data"] = get_equity_data()

result = obb.ta.sma(**params)
result = obb.technical.sma(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -337,7 +337,7 @@ def test_chart_ta_wma(params, obb):

params["data"] = get_equity_data()

result = obb.ta.wma(**params)
result = obb.technical.wma(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down Expand Up @@ -367,7 +367,7 @@ def test_chart_ta_zlma(params, obb):

params["data"] = get_equity_data()

result = obb.ta.zlma(**params)
result = obb.technical.zlma(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Custom technical indicators."""
import warnings
from datetime import datetime, timedelta

Expand Down Expand Up @@ -120,11 +121,13 @@ def is_resistance(df, i):
def plot_fib(self, fig: OpenBBFigure, df_ta: pd.DataFrame):
"""Add fibonacci to plotly figure."""
try:
from openbb_ta.ta_helpers import calculate_fib_levels
from openbb_technical.helpers import ( # pylint: disable=import-outside-toplevel
calculate_fib_levels,
)
except ImportError:
warnings.warn(
"In order to use the Fibonacci indicator in your plot,"
" you need to install the `openbb_ta` package."
" you need to install the `openbb-technical` package."
)
return fig

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Momentum technical indicators."""
import warnings

import numpy as np
Expand Down Expand Up @@ -149,13 +150,14 @@ def plot_cg(self, fig: OpenBBFigure, df_ta: pd.DataFrame, subplot_row: int):
@indicator()
def plot_clenow(self, fig: OpenBBFigure, df_ta: pd.DataFrame, inchart_index: int):
"""Add current close price to plotly figure."""

try:
from openbb_ta.ta_helpers import clenow_momentum
from openbb_technical.helpers import ( # pylint: disable=import-outside-toplevel
clenow_momentum,
)
except ImportError:
warnings.warn(
"In order to use the Clenow momentum indicator in your plot,"
" you need to install the `openbb_ta` package."
" you need to install the `openbb-technical` package."
)
return fig, inchart_index

Expand Down Expand Up @@ -352,7 +354,6 @@ def plot_fisher(self, fig: OpenBBFigure, df_ta: pd.DataFrame, subplot_row: int):
@indicator()
def plot_macd(self, fig: OpenBBFigure, df_ta: pd.DataFrame, subplot_row: int):
"""Add macd to plotly figure."""

fig.add_bar(
name="MACD Histogram",
x=df_ta.index,
Expand Down Expand Up @@ -528,7 +529,7 @@ def plot_stoch(self, fig: OpenBBFigure, df_ta: pd.DataFrame, subplot_row: int):

@indicator()
def plot_ichimoku(self, fig: OpenBBFigure, df_ta: pd.DataFrame, inchart_index: int):
# Calculate Ichimoku indicator
"""Calculate Ichimoku indicator."""
conversion_period = (
self.params["ichimoku"].get_argument_values("conversion_period") or 9
)
Expand Down
Empty file.
Loading

0 comments on commit 3c1510f

Please sign in to comment.