From d351afdefbb999011005543e41f755cb466433cf Mon Sep 17 00:00:00 2001 From: colin99d Date: Tue, 23 Aug 2022 09:28:51 -0400 Subject: [PATCH 1/2] Fixed polygon quarterly --- .../stocks/fundamental_analysis/fa_controller.py | 6 ++++-- .../stocks/fundamental_analysis/polygon_model.py | 2 +- .../stocks/fundamental_analysis/yahoo_finance_model.py | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/openbb_terminal/stocks/fundamental_analysis/fa_controller.py b/openbb_terminal/stocks/fundamental_analysis/fa_controller.py index 61692880aa43..c304652fcc9f 100644 --- a/openbb_terminal/stocks/fundamental_analysis/fa_controller.py +++ b/openbb_terminal/stocks/fundamental_analysis/fa_controller.py @@ -819,8 +819,10 @@ def call_income(self, other_args: List[str]): if ns_parser: # TODO: Switch to actually getting data if ns_parser.source == "yf" and ns_parser.b_quarter: - text = "Quarterly data currently unavailable for yfinance" - console.print(f"[red]{text}, showing yearly.[/red]\n") + console.print( + "[red]Quarterly data currently unavailable for yfinance" + ", showing yearly.[/red]\n" + ) if ns_parser.source == "av": av_view.display_income_statement( symbol=self.ticker, diff --git a/openbb_terminal/stocks/fundamental_analysis/polygon_model.py b/openbb_terminal/stocks/fundamental_analysis/polygon_model.py index 81b6d4369e27..2ede835cea34 100644 --- a/openbb_terminal/stocks/fundamental_analysis/polygon_model.py +++ b/openbb_terminal/stocks/fundamental_analysis/polygon_model.py @@ -107,7 +107,7 @@ def get_financials( cash_flows = cash_flows[["value"]] cash_flows.columns = [single_thing["filing_date"]] - first = False + first = False else: values = pd.DataFrame( pd.DataFrame.from_dict( diff --git a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py index 94854c336c6e..407f02d02d0e 100644 --- a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py +++ b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_model.py @@ -423,4 +423,5 @@ def get_financials(symbol: str, statement: str, ratios: bool = False) -> pd.Data df.iloc[i] = df_fa_pc.iloc[j] j += 1 - return df.dropna(how="all") + df = df.dropna(how="all") + return df From 1c16cc29c04e794dd15c9e8c300dd07e39015eb3 Mon Sep 17 00:00:00 2001 From: colin99d Date: Tue, 23 Aug 2022 09:39:18 -0400 Subject: [PATCH 2/2] Fixed tests --- ...ck_output[get_financials-kwargs_dict0].csv | 26 ++++++----- ...ck_output[get_financials-kwargs_dict2].csv | 44 ++++++++++--------- ...test_display_fundamentals[income-True].txt | 44 ++++++++++--------- 3 files changed, 60 insertions(+), 54 deletions(-) diff --git a/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict0].csv b/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict0].csv index eb73f4e1a5ee..58dd76a1fffc 100644 --- a/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict0].csv +++ b/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict0].csv @@ -1,12 +1,14 @@ -,2009-07-22 -equity_attributable_to_noncontrolling_interest,0.0 -current_assets,35170000000.0 -equity_attributable_to_parent,25888000000.0 -noncurrent_liabilities,5591000000.0 -assets,48140000000.0 -commitments_and_contingencies,0.0 -noncurrent_assets,12970000000.0 -equity,25888000000.0 -current_liabilities,16661000000.0 -liabilities,22252000000.0 -liabilities_and_equity,48140000000.0 +,2022-04-29,2022-01-28,2021-07-28,2021-04-29,2021-01-28,2020-07-31,2020-05-01,2020-01-29,2019-07-31,2019-05-01,2019-01-30,2018-08-01,2018-05-02,2018-02-02,2017-08-02,2017-05-03,2017-02-01,2016-07-27,2016-04-27,2016-01-27,2015-07-22,2015-04-28,2015-01-28,2014-07-23,2014-04-24,2014-01-28,2013-07-24,2013-04-24,2013-01-24,2012-07-25,2012-04-25,2012-01-25,2011-07-20,2011-04-21,2011-01-19,2010-07-21,2010-04-21,2010-01-25,2009-07-22 +assets,350662000000.0,381191000000.0,329840000000.0,337158000000.0,354054000000.0,317344000000.0,320400000000.0,340618000000.0,322239000000.0,341998000000.0,373719000000.0,349197000000.0,367502000000.0,406794000000.0,345173000000.0,334532000000.0,331141000000.0,305602000000.0,305277000000.0,293284000000.0,273151000000.0,261194000000.0,261894000000.0,222520000000.0,205989000000.0,225184000000.0,199856000000.0,194743000000.0,196088000000.0,162896000000.0,150934000000.0,138681000000.0,106758000000.0,94904000000.0,86742000000.0,64725000000.0,57057000000.0,53926000000.0,48140000000.0 +liabilities_and_equity,350662000000.0,381191000000.0,329840000000.0,337158000000.0,354054000000.0,317344000000.0,320400000000.0,340618000000.0,322239000000.0,341998000000.0,373719000000.0,349197000000.0,367502000000.0,406794000000.0,345173000000.0,334532000000.0,331141000000.0,305602000000.0,305277000000.0,293284000000.0,273151000000.0,261194000000.0,261894000000.0,222520000000.0,205989000000.0,225184000000.0,199856000000.0,194743000000.0,196088000000.0,162896000000.0,150934000000.0,138681000000.0,106758000000.0,94904000000.0,86742000000.0,64725000000.0,57057000000.0,53926000000.0,48140000000.0 +equity,67399000000.0,71932000000.0,64280000000.0,69178000000.0,66224000000.0,72282000000.0,78425000000.0,89531000000.0,96456000000.0,105860000000.0,117892000000.0,114949000000.0,126878000000.0,140199000000.0,132425000000.0,134082000000.0,132390000000.0,126541000000.0,130457000000.0,128267000000.0,125677000000.0,129006000000.0,123328000000.0,120940000000.0,120179000000.0,129684000000.0,123354000000.0,135490000000.0,127346000000.0,111746000000.0,102498000000.0,90054000000.0,69343000000.0,61477000000.0,54666000000.0,43111000000.0,39348000000.0,35768000000.0,25888000000.0 +other_than_fixed_noncurrent_assets,232482000000.0,228037000000.0,215417000000.0,215693000000.0,199948000000.0,177279000000.0,176647000000.0,177387000000.0,187266000000.0,218652000000.0,232891000000.0,195319000000.0,202372000000.0,229305000000.0,203012000000.0,205379000000.0,201299000000.0,186393000000.0,194482000000.0,194765000000.0,181049000000.0,173152000000.0,158099000000.0,136986000000.0,120328000000.0,129349000000.0,115310000000.0,116380000000.0,108318000000.0,100466000000.0,91375000000.0,,,,,,,, +equity_attributable_to_parent,67399000000.0,71932000000.0,64280000000.0,69178000000.0,66224000000.0,72282000000.0,78425000000.0,89531000000.0,96456000000.0,105860000000.0,117892000000.0,114949000000.0,126878000000.0,140199000000.0,132425000000.0,134082000000.0,132390000000.0,126541000000.0,130457000000.0,128267000000.0,125677000000.0,129006000000.0,123328000000.0,120940000000.0,120179000000.0,129684000000.0,123354000000.0,135490000000.0,127346000000.0,111746000000.0,102498000000.0,90054000000.0,69343000000.0,61477000000.0,54666000000.0,43111000000.0,39348000000.0,35768000000.0,25888000000.0 +liabilities,283263000000.0,309259000000.0,265560000000.0,267980000000.0,287830000000.0,245062000000.0,241975000000.0,251087000000.0,225783000000.0,236138000000.0,255827000000.0,234248000000.0,240624000000.0,266595000000.0,212748000000.0,200450000000.0,198751000000.0,179061000000.0,174820000000.0,165017000000.0,147474000000.0,132188000000.0,138566000000.0,101580000000.0,85810000000.0,95500000000.0,76502000000.0,59253000000.0,68742000000.0,51150000000.0,48436000000.0,48627000000.0,37415000000.0,33427000000.0,32076000000.0,21614000000.0,17709000000.0,18158000000.0,22252000000.0 +current_assets,118180000000.0,153154000000.0,114423000000.0,121465000000.0,154106000000.0,140065000000.0,143753000000.0,163231000000.0,134973000000.0,123346000000.0,140828000000.0,115761000000.0,130053000000.0,143810000000.0,112875000000.0,101990000000.0,103332000000.0,93761000000.0,87592000000.0,76219000000.0,70953000000.0,67891000000.0,83403000000.0,67949000000.0,70541000000.0,80347000000.0,68219000000.0,63337000000.0,72348000000.0,51943000000.0,50712000000.0,54771000000.0,46898000000.0,46997000000.0,43927000000.0,36033000000.0,32336000000.0,33332000000.0,35170000000.0 +equity_attributable_to_noncontrolling_interest,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +noncurrent_liabilities,155755000000.0,161685000000.0,157806000000.0,161595000000.0,155323000000.0,149744000000.0,145881000000.0,148926000000.0,136079000000.0,142366000000.0,147544000000.0,145700000000.0,151304000000.0,150807000000.0,131446000000.0,127108000000.0,114621000000.0,107575000000.0,106555000000.0,88925000000.0,82189000000.0,73459000000.0,64955000000.0,55375000000.0,42602000000.0,41731000000.0,40183000000.0,23745000000.0,21863000000.0,18090000000.0,16400000000.0,14020000000.0,10556000000.0,9100000000.0,8281000000.0,6002000000.0,5480000000.0,5061000000.0,5591000000.0 +noncurrent_assets,232482000000.0,228037000000.0,215417000000.0,215693000000.0,199948000000.0,177279000000.0,176647000000.0,177387000000.0,187266000000.0,218652000000.0,232891000000.0,233436000000.0,237449000000.0,262984000000.0,232298000000.0,232542000000.0,227809000000.0,211841000000.0,217685000000.0,217065000000.0,202198000000.0,193303000000.0,178491000000.0,154571000000.0,135448000000.0,144837000000.0,131637000000.0,131406000000.0,123740000000.0,110953000000.0,100222000000.0,83910000000.0,59860000000.0,47907000000.0,42815000000.0,28692000000.0,24721000000.0,20594000000.0,12970000000.0 +current_liabilities,127508000000.0,147574000000.0,107754000000.0,106385000000.0,132507000000.0,95318000000.0,96094000000.0,102161000000.0,89704000000.0,93772000000.0,108283000000.0,88548000000.0,89320000000.0,115788000000.0,81302000000.0,73342000000.0,84130000000.0,71486000000.0,68265000000.0,76092000000.0,65285000000.0,58729000000.0,73611000000.0,46205000000.0,43208000000.0,53769000000.0,36319000000.0,35508000000.0,46879000000.0,33060000000.0,32036000000.0,34607000000.0,26859000000.0,24327000000.0,23795000000.0,15612000000.0,12229000000.0,13097000000.0,16661000000.0 +fixed_assets,39304000000.0,39245000000.0,38615000000.0,37815000000.0,37933000000.0,35687000000.0,35889000000.0,37031000000.0,37636000000.0,38746000000.0,39597000000.0,38117000000.0,35077000000.0,33679000000.0,29286000000.0,27163000000.0,26510000000.0,25448000000.0,23203000000.0,22300000000.0,21149000000.0,20151000000.0,20392000000.0,17585000000.0,15120000000.0,15488000000.0,16327000000.0,15026000000.0,15422000000.0,10487000000.0,8847000000.0,,,,,,,, +commitments_and_contingencies,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0.0 diff --git a/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict2].csv b/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict2].csv index 03fc893336a5..aa1b99cd923c 100644 --- a/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict2].csv +++ b/tests/openbb_terminal/stocks/fundamental_analysis/csv/test_polygon_model/test_check_output[get_financials-kwargs_dict2].csv @@ -1,21 +1,23 @@ -,2009-07-22 -benefits_costs_expenses,6605000000.0 -revenues,8337000000.0 -income_tax_expense_benefit,503000000.0 -net_income_loss,1229000000.0 -nonoperating_income_loss,60000000.0 -cost_of_revenue,5314000000.0 -income_loss_before_equity_method_investments,1732000000.0 -diluted_earnings_per_share,1.35 -participating_securities_distributed_and_undistributed_earnings_loss_basic,0.0 -preferred_stock_dividends_and_other_adjustments,0.0 -income_loss_from_continuing_operations_after_tax,1229000000.0 -gross_profit,3023000000.0 -basic_earnings_per_share,1.38 -net_income_loss_available_to_common_stockholders_basic,1229000000.0 -operating_income_loss,1672000000.0 -operating_expenses,1351000000.0 -net_income_loss_attributable_to_parent,1229000000.0 -costs_and_expenses,6605000000.0 -net_income_loss_attributable_to_noncontrolling_interest,0.0 -income_loss_from_continuing_operations_before_tax,1732000000.0 +,2022-04-29,2022-01-28,2021-07-28,2021-04-29,2021-01-28,2020-07-31,2020-05-01,2020-01-29,2019-07-31,2019-05-01,2019-01-30,2018-08-01,2018-05-02,2018-02-02,2017-08-02,2017-05-03,2017-02-01,2016-07-27,2016-04-27,2016-01-27,2015-07-22,2015-04-28,2015-01-28,2014-07-23,2014-04-24,2014-01-28,2013-07-24,2013-04-24,2013-01-24,2012-07-25,2012-04-25,2012-01-25,2011-07-20,2011-04-21,2011-01-19,2010-07-21,2010-04-21,2010-01-25,2009-07-22 +net_income_loss_available_to_common_stockholders_basic,25010000000.0,34630000000.0,21744000000.0,23630000000.0,28755000000.0,11253000000.0,11249000000.0,22236000000.0,10044000000.0,11561000000.0,19965000000.0,11519000000.0,13822000000.0,20065000000.0,8717000000.0,11029000000.0,17891000000.0,7796000000.0,10516000000.0,18361000000.0,10677000000.0,13569000000.0,18024000000.0,7748000000.0,10223000000.0,13072000000.0,6900000000.0,9547000000.0,13078000000.0,8824000000.0,11622000000.0,13064000000.0,7308000000.0,5987000000.0,6004000000.0,3253000000.0,3074000000.0,3378000000.0,1229000000.0 +interest_expense_operating,691000000.0,694000000.0,665000000.0,670000000.0,638000000.0,697000000.0,757000000.0,785000000.0,866000000.0,1010000000.0,890000000.0,846000000.0,792000000.0,734000000.0,602000000.0,530000000.0,525000000.0,409000000.0,321000000.0,276000000.0,201000000.0,163000000.0,131000000.0,100000000.0,85000000.0,84000000.0,,,,,,,,,,,,, +income_loss_from_continuing_operations_after_tax,25010000000.0,34630000000.0,21744000000.0,23630000000.0,28755000000.0,11253000000.0,11249000000.0,22236000000.0,10044000000.0,11561000000.0,19965000000.0,11519000000.0,13822000000.0,20065000000.0,8717000000.0,11029000000.0,17891000000.0,7796000000.0,10516000000.0,18361000000.0,10677000000.0,13569000000.0,18024000000.0,7748000000.0,10223000000.0,13072000000.0,6900000000.0,9547000000.0,13078000000.0,8824000000.0,11622000000.0,13064000000.0,7308000000.0,5987000000.0,6004000000.0,3253000000.0,3074000000.0,3378000000.0,1229000000.0 +net_income_loss,25010000000.0,34630000000.0,21744000000.0,23630000000.0,28755000000.0,11253000000.0,11249000000.0,22236000000.0,10044000000.0,11561000000.0,19965000000.0,11519000000.0,13822000000.0,20065000000.0,8717000000.0,11029000000.0,17891000000.0,7796000000.0,10516000000.0,18361000000.0,10677000000.0,13569000000.0,18024000000.0,7748000000.0,10223000000.0,13072000000.0,6900000000.0,9547000000.0,13078000000.0,8824000000.0,11622000000.0,13064000000.0,7308000000.0,5987000000.0,6004000000.0,3253000000.0,3074000000.0,3378000000.0,1229000000.0 +cost_of_revenue,54719000000.0,69702000000.0,46179000000.0,51505000000.0,67111000000.0,37005000000.0,35943000000.0,56602000000.0,33582000000.0,36194000000.0,52279000000.0,32844000000.0,37715000000.0,54381000000.0,27920000000.0,32305000000.0,48175000000.0,26252000000.0,30636000000.0,45449000000.0,29924000000.0,34354000000.0,44858000000.0,22697000000.0,27699000000.0,35748000000.0,22299000000.0,27254000000.0,33452000000.0,20029000000.0,20622000000.0,25630000000.0,16649000000.0,14449000000.0,16443000000.0,9564000000.0,7874000000.0,9272000000.0,5314000000.0 +revenues,97278000000.0,123945000000.0,81434000000.0,89584000000.0,111439000000.0,59685000000.0,58313000000.0,91819000000.0,53809000000.0,58015000000.0,84310000000.0,53265000000.0,61137000000.0,88293000000.0,45408000000.0,52896000000.0,78351000000.0,42358000000.0,50557000000.0,75872000000.0,49605000000.0,58010000000.0,74599000000.0,37432000000.0,45646000000.0,57594000000.0,35323000000.0,43603000000.0,54512000000.0,35023000000.0,39186000000.0,46333000000.0,28571000000.0,24667000000.0,26741000000.0,15700000000.0,13499000000.0,15683000000.0,8337000000.0 +participating_securities_distributed_and_undistributed_earnings_loss_basic,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +gross_profit,42559000000.0,54243000000.0,35255000000.0,38079000000.0,44328000000.0,22680000000.0,22370000000.0,35217000000.0,20227000000.0,21821000000.0,32031000000.0,20421000000.0,23422000000.0,33912000000.0,17488000000.0,20591000000.0,30176000000.0,16106000000.0,19921000000.0,30423000000.0,19681000000.0,23656000000.0,29741000000.0,14735000000.0,17947000000.0,21846000000.0,13024000000.0,16349000000.0,21060000000.0,14994000000.0,18564000000.0,20703000000.0,11922000000.0,10218000000.0,10298000000.0,6136000000.0,5625000000.0,6411000000.0,3023000000.0 +income_loss_from_continuing_operations_before_tax,30139000000.0,41241000000.0,24369000000.0,28011000000.0,33579000000.0,13137000000.0,13135000000.0,25918000000.0,11911000000.0,13793000000.0,23906000000.0,13284000000.0,16168000000.0,27030000000.0,11308000000.0,14684000000.0,24180000000.0,10469000000.0,14142000000.0,24573000000.0,14473000000.0,18564000000.0,24416000000.0,10484000000.0,13818000000.0,17709000000.0,9435000000.0,12905000000.0,17672000000.0,11861000000.0,15532000000.0,17477000000.0,9551000000.0,7900000000.0,7963000000.0,4292000000.0,4029000000.0,4758000000.0,1732000000.0 +benefits_costs_expenses,67139000000.0,82704000000.0,57065000000.0,61573000000.0,77860000000.0,46548000000.0,45178000000.0,65901000000.0,41898000000.0,44222000000.0,60404000000.0,39981000000.0,44969000000.0,61263000000.0,34100000000.0,38212000000.0,54171000000.0,31889000000.0,36415000000.0,51299000000.0,35132000000.0,39446000000.0,50183000000.0,26948000000.0,31828000000.0,39885000000.0,25888000000.0,30698000000.0,36840000000.0,23162000000.0,23654000000.0,28856000000.0,19020000000.0,16767000000.0,18778000000.0,11408000000.0,9470000000.0,10925000000.0,6605000000.0 +preferred_stock_dividends_and_other_adjustments,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +net_income_loss_attributable_to_noncontrolling_interest,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 +basic_earnings_per_share,1.54,2.11,1.31,1.41,1.7,2.61,2.58,5.04,2.2,2.47,4.22,2.36,2.75,3.92,1.68,2.11,3.38,1.43,1.91,3.3,1.86,2.34,3.08,1.29,11.69,14.59,7.51,10.16,13.93,9.42,12.45,14.03,7.89,6.49,6.53,3.57,3.39,3.74,1.38 +operating_expenses,12580000000.0,12755000000.0,11129000000.0,10576000000.0,10794000000.0,9589000000.0,9517000000.0,9648000000.0,8683000000.0,8406000000.0,8685000000.0,7809000000.0,7528000000.0,7638000000.0,6720000000.0,6494000000.0,6817000000.0,6001000000.0,5934000000.0,6252000000.0,5598000000.0,5378000000.0,5495000000.0,4453000000.0,4354000000.0,4383000000.0,3823000000.0,3791000000.0,3850000000.0,3421000000.0,3180000000.0,3363000000.0,2543000000.0,2344000000.0,2471000000.0,1902000000.0,1646000000.0,1686000000.0,1351000000.0 +net_income_loss_attributable_to_parent,25010000000.0,34630000000.0,21744000000.0,23630000000.0,28755000000.0,11253000000.0,11249000000.0,22236000000.0,10044000000.0,11561000000.0,19965000000.0,11519000000.0,13822000000.0,20065000000.0,8717000000.0,11029000000.0,17891000000.0,7796000000.0,10516000000.0,18361000000.0,10677000000.0,13569000000.0,18024000000.0,7748000000.0,10223000000.0,13072000000.0,6900000000.0,9547000000.0,13078000000.0,8824000000.0,11622000000.0,13064000000.0,7308000000.0,5987000000.0,6004000000.0,3253000000.0,3074000000.0,3378000000.0,1229000000.0 +nonoperating_income_loss,160000000.0,-247000000.0,243000000.0,508000000.0,45000000.0,46000000.0,282000000.0,349000000.0,367000000.0,378000000.0,560000000.0,672000000.0,274000000.0,756000000.0,540000000.0,587000000.0,821000000.0,364000000.0,155000000.0,402000000.0,390000000.0,286000000.0,170000000.0,202000000.0,225000000.0,246000000.0,234000000.0,347000000.0,462000000.0,288000000.0,148000000.0,137000000.0,172000000.0,26000000.0,136000000.0,58000000.0,50000000.0,33000000.0,60000000.0 +costs_and_expenses,67139000000.0,82704000000.0,57065000000.0,61573000000.0,77860000000.0,46548000000.0,45178000000.0,65901000000.0,41898000000.0,44222000000.0,60404000000.0,39981000000.0,44969000000.0,61263000000.0,34100000000.0,38212000000.0,54171000000.0,31889000000.0,36415000000.0,51299000000.0,35132000000.0,39446000000.0,50183000000.0,26948000000.0,31828000000.0,39885000000.0,25888000000.0,30698000000.0,36840000000.0,23162000000.0,23654000000.0,28856000000.0,19020000000.0,16767000000.0,18778000000.0,11408000000.0,9470000000.0,10925000000.0,6605000000.0 +income_tax_expense_benefit,5129000000.0,6611000000.0,2625000000.0,4381000000.0,4824000000.0,1884000000.0,1886000000.0,3682000000.0,1867000000.0,2232000000.0,3941000000.0,1765000000.0,2346000000.0,6965000000.0,2591000000.0,3655000000.0,6289000000.0,2673000000.0,3626000000.0,6212000000.0,3796000000.0,4995000000.0,6392000000.0,2736000000.0,3595000000.0,4637000000.0,2535000000.0,3358000000.0,4594000000.0,3037000000.0,3910000000.0,4413000000.0,2243000000.0,1913000000.0,1959000000.0,1039000000.0,955000000.0,1380000000.0,503000000.0 +operating_income_loss,29979000000.0,41488000000.0,24126000000.0,27503000000.0,33534000000.0,13091000000.0,12853000000.0,25569000000.0,11544000000.0,13415000000.0,23346000000.0,12612000000.0,15894000000.0,26274000000.0,10768000000.0,14097000000.0,23359000000.0,10105000000.0,13987000000.0,24171000000.0,14083000000.0,18278000000.0,24246000000.0,10282000000.0,13593000000.0,17463000000.0,9201000000.0,12558000000.0,17210000000.0,11573000000.0,15384000000.0,17340000000.0,9379000000.0,7874000000.0,7827000000.0,4234000000.0,3979000000.0,4725000000.0,1672000000.0 +diluted_earnings_per_share,1.52,2.1,1.3,1.4,1.68,2.58,2.55,4.99,2.18,2.46,4.18,2.34,2.73,3.89,1.67,2.1,3.36,1.42,1.9,3.28,1.85,2.33,3.06,1.28,11.62,14.5,7.47,10.09,13.81,9.32,12.3,13.87,7.79,6.4,6.43,3.51,3.33,3.67,1.35 +income_tax_expense_benefit_deferred,,682000000.0,,,-58000000.0,,,-349000000.0,,,53000000.0,,,-33737000000.0,,,1452000000.0,,,1592000000.0,,,2197000000.0,,,1253000000.0,,,1179000000.0,,,1456000000.0,,,823000000.0,,,425000000.0, +income_loss_before_equity_method_investments,,,,,,,,,,,,,,,,,,,,,,,,,,,,12905000000.0,17672000000.0,11861000000.0,15532000000.0,17477000000.0,9551000000.0,7900000000.0,7963000000.0,4292000000.0,4029000000.0,4758000000.0,1732000000.0 diff --git a/tests/openbb_terminal/stocks/fundamental_analysis/txt/test_polygon_view/test_display_fundamentals[income-True].txt b/tests/openbb_terminal/stocks/fundamental_analysis/txt/test_polygon_view/test_display_fundamentals[income-True].txt index cfbac65a7c0d..87a89256e7a2 100644 --- a/tests/openbb_terminal/stocks/fundamental_analysis/txt/test_polygon_view/test_display_fundamentals[income-True].txt +++ b/tests/openbb_terminal/stocks/fundamental_analysis/txt/test_polygon_view/test_display_fundamentals[income-True].txt @@ -1,21 +1,23 @@ - 2009-07-22 -Net Income Loss 1.229 B -Nonoperating Income Loss 60 M -Gross Profit 3.023 B -Costs And Expenses 6.605 B -Benefits Costs Expenses 6.605 B -Net Income Loss Attributable To Parent 1.229 B -Income Tax Expense Benefit 503 M -Income Loss Before Equity Method Investments 1.732 B -Operating Income Loss 1.672 B -Cost Of Revenue 5.314 B -Diluted Earnings Per Share 1.350 -Net Income Loss Attributable To Noncontrolling Interest 0 -Income Loss From Continuing Operations Before Tax 1.732 B -Revenues 8.337 B -Basic Earnings Per Share 1.380 -Net Income Loss Available To Common Stockholders Basic 1.229 B -Preferred Stock Dividends And Other Adjustments 0 -Income Loss From Continuing Operations After Tax 1.229 B -Operating Expenses 1.351 B -Participating Securities Distributed And Undistributed Earnings Loss Basic 0 + 2022-01-28 2022-04-29 +Interest Expense Operating 694 M 691 M +Preferred Stock Dividends And Other Adjustments 0 0 +Income Tax Expense Benefit 6.611 B 5.129 B +Income Loss From Continuing Operations Before Tax 41.241 B 30.139 B +Net Income Loss Available To Common Stockholders Basic 34.630 B 25.010 B +Revenues 123.945 B 97.278 B +Nonoperating Income Loss -247 M 160 M +Participating Securities Distributed And Undistributed Earnings Loss Basic 0 0 +Gross Profit 54.243 B 42.559 B +Net Income Loss 34.630 B 25.010 B +Operating Expenses 12.755 B 12.580 B +Cost Of Revenue 69.702 B 54.719 B +Basic Earnings Per Share 2.110 1.540 +Operating Income Loss 41.488 B 29.979 B +Net Income Loss Attributable To Parent 34.630 B 25.010 B +Costs And Expenses 82.704 B 67.139 B +Net Income Loss Attributable To Noncontrolling Interest 0 0 +Income Loss From Continuing Operations After Tax 34.630 B 25.010 B +Benefits Costs Expenses 82.704 B 67.139 B +Diluted Earnings Per Share 2.100 1.520 +Income Tax Expense Benefit Deferred 682 M - +Income Loss Before Equity Method Investments - -