-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into release/3.2.5
- Loading branch information
Showing
22 changed files
with
5,881 additions
and
2,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
25 changes: 25 additions & 0 deletions
25
openbb_platform/extensions/econometrics/tests/test_econometrics_utils.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""Test the econometrics utils module.""" | ||
|
||
import numpy as np | ||
import pandas as pd | ||
from extensions.econometrics.openbb_econometrics.utils import ( | ||
get_engle_granger_two_step_cointegration_test, | ||
mock_multi_index_data, | ||
) | ||
|
||
|
||
def test_get_engle_granger_two_step_cointegration_test(): | ||
"""Test the get_engle_granger_two_step_cointegration_test function.""" | ||
x = pd.Series(np.random.randn(100)) | ||
y = pd.Series(np.random.randn(100)) | ||
|
||
result = get_engle_granger_two_step_cointegration_test(x, y) | ||
|
||
assert result | ||
|
||
|
||
def test_mock_multi_index_data(): | ||
"""Test the mock_multi_index_data function.""" | ||
mi_data = mock_multi_index_data() | ||
assert isinstance(mi_data, pd.DataFrame) | ||
assert mi_data.index.nlevels == 2 |
Empty file.
14 changes: 14 additions & 0 deletions
14
openbb_platform/extensions/quantitative/tests/test_quantitative_helpers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Test the quantitative helpers.""" | ||
|
||
import pandas as pd | ||
from extensions.quantitative.openbb_quantitative.helpers import ( | ||
validate_window, | ||
) | ||
|
||
|
||
def test_validate_window(): | ||
input_data = pd.Series(range(1, 100)) | ||
validate_window( | ||
input_data=input_data, | ||
window=20, | ||
) |
Empty file.
Oops, something went wrong.