From a3a134505ecd758485646e05006a6289e49a767c Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Mon, 30 Jan 2023 05:50:19 -0800 Subject: [PATCH 1/2] Clarifies the Balance example by including, `timeframe = '2021'` (#4072) Companies have not finished reporting F/Y 2022 earnings, including `timeframe='2021'` ensures that results are returned. --- .../sdk/guides/intros/stocks/comparison-analysis.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/website/content/sdk/guides/intros/stocks/comparison-analysis.md b/website/content/sdk/guides/intros/stocks/comparison-analysis.md index e1d8ea6b705..3b4c522e435 100644 --- a/website/content/sdk/guides/intros/stocks/comparison-analysis.md +++ b/website/content/sdk/guides/intros/stocks/comparison-analysis.md @@ -40,7 +40,7 @@ help(openbb.stocks.ca) `openbb.stocks.ca.balance` compares the balance sheets for a list of companies. ```python -openbb.stocks.ca.balance(["TSLA","F", "GE"]) +openbb.stocks.ca.balance(["TSLA","F", "GE"], timeframe = '2021') ``` | Item | TSLA | F | GE | @@ -123,8 +123,12 @@ openbb.stocks.ca.screener(["f", "ge", "tsla"]) Calculates the historical price (or returns) correlation for a list of tickers, over a specified window. ```python -correlation,historical = openbb.stocks.ca.hcorr(similar = openbb.stocks.ca.similar('TSLA', source = 'Polygon'), candle_type = 'R', start_date = '2018-11-01') - +correlation,historical = ( + openbb.stocks.ca.hcorr(similar = openbb.stocks.ca.similar('TSLA', source = 'Polygon'), + candle_type = 'R', + start_date = '2018-11-01' + ) +) correlation ``` From 4c80b75591cf311a93e222c4dbd634c694195e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Oroszv=C3=A1ri?= <30414255+peter-oroszvari@users.noreply.github.com> Date: Mon, 30 Jan 2023 15:57:18 +0100 Subject: [PATCH 2/2] Fix incorrect column label in nasdaq_model.py (#4063) * Fix incorrect column label in nasdaq_model.py 'Time (GMT)' changed to 'Time (ET)' * Update tests --------- Co-authored-by: petycomppety <30414255+petycomppety@users.noreply.github.com> Co-authored-by: James Maslek --- openbb_terminal/economy/nasdaq_model.py | 2 +- .../csv/test_nasdaq_model/test_get_economic_calendar.csv | 2 +- .../test_display_big_mac_index[False].txt | 1 - .../test_display_big_mac_index[True0].txt | 1 - .../test_display_big_mac_index[True1].txt | 1 - .../test_nasdaq_view/test_display_economic_calendar.txt | 8 ++++---- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/openbb_terminal/economy/nasdaq_model.py b/openbb_terminal/economy/nasdaq_model.py index 01d3eb4a40d..943ad69794e 100644 --- a/openbb_terminal/economy/nasdaq_model.py +++ b/openbb_terminal/economy/nasdaq_model.py @@ -92,7 +92,7 @@ def get_economic_calendar( calendar = calendar.rename( columns={ - "gmt": "Time (GMT)", + "gmt": "Time (ET)", "country": "Country", "eventName": "Event", "actual": "Actual", diff --git a/tests/openbb_terminal/economy/csv/test_nasdaq_model/test_get_economic_calendar.csv b/tests/openbb_terminal/economy/csv/test_nasdaq_model/test_get_economic_calendar.csv index cc77eefe1d7..b09f7f2dcf4 100644 --- a/tests/openbb_terminal/economy/csv/test_nasdaq_model/test_get_economic_calendar.csv +++ b/tests/openbb_terminal/economy/csv/test_nasdaq_model/test_get_economic_calendar.csv @@ -1,4 +1,4 @@ -,Time (GMT),Country,Event,Actual,Consensus,Previous,Date +,Time (ET),Country,Event,Actual,Consensus,Previous,Date 0,08:30,United States,Continuing Jobless Claims,"1,385K","1,375K","1,364K",2022-10-20 1,08:30,United States,Initial Jobless Claims,214K,230K,226K,2022-10-20 2,08:30,United States,Jobless Claims 4-Week Avg.,212.25K,-,211.00K,2022-10-20 diff --git a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[False].txt b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[False].txt index 8b137891791..e69de29bb2d 100644 --- a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[False].txt +++ b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[False].txt @@ -1 +0,0 @@ - diff --git a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True0].txt b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True0].txt index 56330f4eafd..fdc482f735b 100644 --- a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True0].txt +++ b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True0].txt @@ -16,4 +16,3 @@ Date 2015-07-31 2.751032 3.065134 3.922265 2015-01-31 2.806361 3.252033 4.318705 2014-07-31 2.826189 2.570773 4.814145 - diff --git a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True1].txt b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True1].txt index 56330f4eafd..fdc482f735b 100644 --- a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True1].txt +++ b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_big_mac_index[True1].txt @@ -16,4 +16,3 @@ Date 2015-07-31 2.751032 3.065134 3.922265 2015-01-31 2.806361 3.252033 4.318705 2014-07-31 2.826189 2.570773 4.814145 - diff --git a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_economic_calendar.txt b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_economic_calendar.txt index c65813bedb6..1aac53290f7 100644 --- a/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_economic_calendar.txt +++ b/tests/openbb_terminal/economy/txt/test_nasdaq_view/test_display_economic_calendar.txt @@ -1,5 +1,5 @@ - Time (GMT) Country Event Actual Consensus Previous Date -0 08:30 United States Continuing Jobless Claims 1,385K 1,375K 1,364K 2022-10-20 -1 08:30 United States Initial Jobless Claims 214K 230K 226K 2022-10-20 -2 08:30 United States Jobless Claims 4-Week Avg. 212.25K - 211.00K 2022-10-20 + Time (ET) Country Event Actual Consensus Previous Date +0 08:30 United States Continuing Jobless Claims 1,385K 1,375K 1,364K 2022-10-20 +1 08:30 United States Initial Jobless Claims 214K 230K 226K 2022-10-20 +2 08:30 United States Jobless Claims 4-Week Avg. 212.25K - 211.00K 2022-10-20