From 4d2239d38618542f7a3ad10e6c26e5534c6d7751 Mon Sep 17 00:00:00 2001 From: colin99d <72827203+colin99d@users.noreply.github.com> Date: Fri, 6 Aug 2021 19:34:25 -0400 Subject: [PATCH] Refactored Tests (#640) * Added basic openpyxl * Add screener checks to confirm that preset is correct (#580) * refactor screener finviz_view to view and model * Add checks for defined screener preset * Feature/fraud indicators (#581) * Fixed glitch reading AlphaVantage API key * Bug fix * Added mscore metric * Refactored code, added error handling * Updated reademe.md * Figuring out pre-commit * Figuring out pre-commit * Improved formating and code * Added Zscore * Formatted code Co-authored-by: Colin Delahunty * Reformated tests and started writing FA * Removed excel analytics * Figured out testing with input and print * Figured out testing with input and print * Added av_view tests * Added av_view tests * Added main_helper tests * Fixed Poetry * Added main helper tests * Expanded pycoingecko_view * Fixed ETF model * Added coinpaprika view tests * Added optimizer view tests * Updated tests Co-authored-by: Colin Delahunty Co-authored-by: DidierRLopes Co-authored-by: Colin Delahunty --- .coveragerc | 4 + .gitignore | 2 + gamestonk_terminal/etf/stockanalysis_model.py | 11 +- .../stocks/fundamental_analysis/av_view.py | 1 + poetry.lock | 40 +- tests/data/json/fa_av_balance.json | 1007 +++++++++++++++++ tests/data/json/fa_av_cash.json | 782 +++++++++++++ tests/data/json/fa_av_earnings.json | 719 ++++++++++++ tests/data/json/fa_av_income.json | 707 ++++++++++++ tests/data/json/fa_av_key.json | 61 + tests/data/json/fa_av_overview.json | 61 + tests/test_ba/__init__.py | 0 tests/{ => test_ba}/test_ba_finbrain_api.py | 4 +- tests/test_coingecko_crypto.py | 54 - tests/test_cryptocurrency/__init__.py | 0 .../test_coingecko_crypto.py | 391 +++++++ .../test_coinpaprika_view.py | 154 +++ tests/test_dd/__init__.py | 0 .../test_dd_financial_modeling_prep_view.py | 0 tests/{ => test_dd}/test_dd_finviz_view.py | 0 tests/test_discovery/__init__.py | 0 .../test_discovery_ark_api.py | 0 .../test_discovery_ark_model.py | 0 .../test_discovery_ark_view.py | 0 .../test_discovery_fidelity_api.py | 0 .../test_discovery_fidelity_model.py | 0 .../test_discovery_seeing_alpha_model.py | 0 .../test_discovery_short_interest_model.py | 0 tests/test_fa/__init__.py | 0 tests/test_fa/test_fa_av_view.py | 135 +++ .../test_fa_business_insider_view.py | 0 tests/test_fa/test_fa_controller.py | 50 + tests/test_fa/test_fa_fmp_view.py | 30 + .../test_fa_market_watch_model.py | 0 .../test_fa_market_watch_view.py | 0 .../test_fa_yahoo_finance_view.py | 0 .../test_fa_yield_curve_model.py | 0 tests/test_main/__init__.py | 0 tests/test_main/test_main_helper.py | 115 ++ tests/test_portfolio_optimization/__init__.py | 0 .../test_optimizer_view.py | 73 ++ 41 files changed, 4340 insertions(+), 61 deletions(-) create mode 100644 .coveragerc create mode 100644 tests/data/json/fa_av_balance.json create mode 100644 tests/data/json/fa_av_cash.json create mode 100644 tests/data/json/fa_av_earnings.json create mode 100644 tests/data/json/fa_av_income.json create mode 100644 tests/data/json/fa_av_key.json create mode 100644 tests/data/json/fa_av_overview.json create mode 100644 tests/test_ba/__init__.py rename tests/{ => test_ba}/test_ba_finbrain_api.py (78%) delete mode 100644 tests/test_coingecko_crypto.py create mode 100644 tests/test_cryptocurrency/__init__.py create mode 100644 tests/test_cryptocurrency/test_coingecko_crypto.py create mode 100644 tests/test_cryptocurrency/test_coinpaprika_view.py create mode 100644 tests/test_dd/__init__.py rename tests/{ => test_dd}/test_dd_financial_modeling_prep_view.py (100%) rename tests/{ => test_dd}/test_dd_finviz_view.py (100%) create mode 100644 tests/test_discovery/__init__.py rename tests/{ => test_discovery}/test_discovery_ark_api.py (100%) rename tests/{ => test_discovery}/test_discovery_ark_model.py (100%) rename tests/{ => test_discovery}/test_discovery_ark_view.py (100%) rename tests/{ => test_discovery}/test_discovery_fidelity_api.py (100%) rename tests/{ => test_discovery}/test_discovery_fidelity_model.py (100%) rename tests/{ => test_discovery}/test_discovery_seeing_alpha_model.py (100%) rename tests/{ => test_discovery}/test_discovery_short_interest_model.py (100%) create mode 100644 tests/test_fa/__init__.py create mode 100644 tests/test_fa/test_fa_av_view.py rename tests/{ => test_fa}/test_fa_business_insider_view.py (100%) create mode 100644 tests/test_fa/test_fa_controller.py create mode 100644 tests/test_fa/test_fa_fmp_view.py rename tests/{ => test_fa}/test_fa_market_watch_model.py (100%) rename tests/{ => test_fa}/test_fa_market_watch_view.py (100%) rename tests/{ => test_fa}/test_fa_yahoo_finance_view.py (100%) rename tests/{ => test_fa}/test_fa_yield_curve_model.py (100%) create mode 100644 tests/test_main/__init__.py create mode 100644 tests/test_main/test_main_helper.py create mode 100644 tests/test_portfolio_optimization/__init__.py create mode 100644 tests/test_portfolio_optimization/test_optimizer_view.py diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000000..d640f2996a1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[coverage:run] +omit = + env/* +source = . diff --git a/.gitignore b/.gitignore index 5bdb997371c..06a4263ccc2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ reports/* .python-version exports/* .idea +.coverage +htmlcov diff --git a/gamestonk_terminal/etf/stockanalysis_model.py b/gamestonk_terminal/etf/stockanalysis_model.py index 729a6c6a194..29c365fa513 100644 --- a/gamestonk_terminal/etf/stockanalysis_model.py +++ b/gamestonk_terminal/etf/stockanalysis_model.py @@ -14,13 +14,16 @@ from gamestonk_terminal.helper_funcs import ( # Run this when called to get all available etfs and names r = requests.get("https://stockanalysis.com/etf/") -soup = bs(r.text, "html.parser").findAll("ul", {"class": "no-spacing"}) -all_links = soup[0].findAll("li") +soup = bs(r.text, "html.parser").findAll("table", {"class": "SymbolTable_table__3Q2qq"}) +all_links = soup[0].findAll("tr") + etf_symbols = [] etf_names = [] for link in all_links: - etf_symbols.append(link.text.split("-")[0].strip(" ")) - etf_names.append(link.text.split("-")[1].strip(" ")) + data = link.findAll("td") + if data: + etf_symbols.append(data[0].find("a").get_text()) + etf_names.append(data[1].find("span").get_text()) def limit_number_of_holdings(num: str) -> int: diff --git a/gamestonk_terminal/stocks/fundamental_analysis/av_view.py b/gamestonk_terminal/stocks/fundamental_analysis/av_view.py index dc7d601c9d1..cf741f3c1ea 100644 --- a/gamestonk_terminal/stocks/fundamental_analysis/av_view.py +++ b/gamestonk_terminal/stocks/fundamental_analysis/av_view.py @@ -3,6 +3,7 @@ __docformat__ = "numpy" import argparse from typing import List, Dict + import requests from alpha_vantage.fundamentaldata import FundamentalData diff --git a/poetry.lock b/poetry.lock index a875fec1bc4..fc58664c0cb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3052,7 +3052,7 @@ prediction = ["tensorflow", "pmdarima"] [metadata] lock-version = "1.1" python-versions = "^3.6.8" -content-hash = "b966fb3af66877067d5660fe2b65094278506f953c3a174a4347f8e17e3c6603" +content-hash = "90b9e9207f1a4680fc23f634392afb9c45bbc0227f36c6b6c1a1afde4dcdcb12" [metadata.files] absl-py = [ @@ -3141,6 +3141,10 @@ argon2-cffi = [ {file = "argon2_cffi-20.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:9dfd5197852530294ecb5795c97a823839258dfd5eb9420233c7cfedec2058f2"}, {file = "argon2_cffi-20.1.0-cp39-cp39-win32.whl", hash = "sha256:e2db6e85c057c16d0bd3b4d2b04f270a7467c147381e8fd73cbbe5bc719832be"}, {file = "argon2_cffi-20.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:8a84934bd818e14a17943de8099d41160da4a336bcc699bb4c394bbb9b94bd32"}, + {file = "argon2_cffi-20.1.0-pp36-pypy36_pp73-macosx_10_7_x86_64.whl", hash = "sha256:b94042e5dcaa5d08cf104a54bfae614be502c6f44c9c89ad1535b2ebdaacbd4c"}, + {file = "argon2_cffi-20.1.0-pp36-pypy36_pp73-win32.whl", hash = "sha256:8282b84ceb46b5b75c3a882b28856b8cd7e647ac71995e71b6705ec06fc232c3"}, + {file = "argon2_cffi-20.1.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3aa804c0e52f208973845e8b10c70d8957c9e5a666f702793256242e9167c4e0"}, + {file = "argon2_cffi-20.1.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:36320372133a003374ef4275fbfce78b7ab581440dfca9f9471be3dd9a522428"}, ] astroid = [ {file = "astroid-2.6.5-py3-none-any.whl", hash = "sha256:7b963d1c590d490f60d2973e57437115978d3a2529843f160b5003b721e1e925"}, @@ -3303,6 +3307,8 @@ cssselect = [ {file = "cssselect-1.1.0.tar.gz", hash = "sha256:f95f8dedd925fd8f54edb3d2dfb44c190d9d18512377d3c1e2388d16126879bc"}, ] cvxpy = [ + {file = "cvxpy-1.1.12-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:48e9bae36a43453659ca5d0c85e78f1eb0dfe629b8aa0f023f65aa59d0ac04d7"}, + {file = "cvxpy-1.1.12-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fe0bcb7f83b5d4deb760bf033cb72ab97c8e0770b116e08d96e9726cb1a52c01"}, {file = "cvxpy-1.1.12-cp36-cp36m-win_amd64.whl", hash = "sha256:86f8e4aa1a79482431b89aa526249d9fda04c74e04a3ec224d1175d281643d71"}, {file = "cvxpy-1.1.12-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:90b09a7361b9c614166fa673e1fe9321317df6939135330e1621b9a0bf10e3a8"}, {file = "cvxpy-1.1.12-cp37-cp37m-win_amd64.whl", hash = "sha256:084e5292f2a13133a1cd28d68f5af1df33a5119b0f1aec7cecf834eea3e2d11d"}, @@ -3310,6 +3316,8 @@ cvxpy = [ {file = "cvxpy-1.1.12-cp38-cp38-win_amd64.whl", hash = "sha256:76d04444cb50ad2840bbc72a625ac246b5eeeeb580ee20c71bec057822667738"}, {file = "cvxpy-1.1.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2de5e0e75316839bc71b5df2c2db0131cee7ef06dac566c6c44dc852c091502b"}, {file = "cvxpy-1.1.12-cp39-cp39-win_amd64.whl", hash = "sha256:9fa4d033ab31855aea090e4b358017b36880390a7d0e6e97ecc5226c77eab489"}, + {file = "cvxpy-1.1.12-py3.5-macosx-10.9-x86_64.egg", hash = "sha256:27ff263c80700b097d3714ba34161bd284f736f3029dfa89a95bf4c4a2801cb9"}, + {file = "cvxpy-1.1.12-py3.6-macosx-10.7-x86_64.egg", hash = "sha256:7c1c5371dda78580f0892fba6776abb6e43bdb45589311c3179a057f1a984110"}, {file = "cvxpy-1.1.12-py3.6-win-amd64.egg", hash = "sha256:d2c28e0eea1b6dc70262c9ed8b63c5c1747d85c28b3ec24cbaab07583b3ad729"}, {file = "cvxpy-1.1.12-py3.7-win-amd64.egg", hash = "sha256:44d0e3d60693831ac70bdc9b2e23faf84401347bfcdef4eb5da5ae22ac57f5ff"}, {file = "cvxpy-1.1.12-py3.8-win-amd64.egg", hash = "sha256:c86f8de9a63ccbd45844a4482df8099824688b5329060f089aad1c3beb939190"}, @@ -3419,6 +3427,10 @@ entrypoints = [ {file = "entrypoints-0.3-py2.py3-none-any.whl", hash = "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19"}, {file = "entrypoints-0.3.tar.gz", hash = "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"}, ] +et-xmlfile = [ + {file = "et_xmlfile-1.1.0-py3-none-any.whl", hash = "sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada"}, + {file = "et_xmlfile-1.1.0.tar.gz", hash = "sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c"}, +] fear-greed-index = [ {file = "fear-greed-index-0.1.3.tar.gz", hash = "sha256:5ba5286ee29b2b35147a93da353899e30abf1715decf943183399e4f057a2d87"}, {file = "fear_greed_index-0.1.3-py3-none-any.whl", hash = "sha256:0bdccdce61a408172187254dced6e1033c6126620d4694aaccc5ce09f4001921"}, @@ -3722,30 +3734,40 @@ lxml = [ {file = "lxml-4.6.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:4bff24dfeea62f2e56f5bab929b4428ae6caba2d1eea0c2d6eb618e30a71e6d4"}, {file = "lxml-4.6.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:74f7d8d439b18fa4c385f3f5dfd11144bb87c1da034a466c5b5577d23a1d9b51"}, {file = "lxml-4.6.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f90ba11136bfdd25cae3951af8da2e95121c9b9b93727b1b896e3fa105b2f586"}, + {file = "lxml-4.6.3-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:4c61b3a0db43a1607d6264166b230438f85bfed02e8cff20c22e564d0faff354"}, + {file = "lxml-4.6.3-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:5c8c163396cc0df3fd151b927e74f6e4acd67160d6c33304e805b84293351d16"}, {file = "lxml-4.6.3-cp35-cp35m-win32.whl", hash = "sha256:f2380a6376dfa090227b663f9678150ef27543483055cc327555fb592c5967e2"}, {file = "lxml-4.6.3-cp35-cp35m-win_amd64.whl", hash = "sha256:c4f05c5a7c49d2fb70223d0d5bcfbe474cf928310ac9fa6a7c6dddc831d0b1d4"}, {file = "lxml-4.6.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d2e35d7bf1c1ac8c538f88d26b396e73dd81440d59c1ef8522e1ea77b345ede4"}, {file = "lxml-4.6.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:289e9ca1a9287f08daaf796d96e06cb2bc2958891d7911ac7cae1c5f9e1e0ee3"}, {file = "lxml-4.6.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:bccbfc27563652de7dc9bdc595cb25e90b59c5f8e23e806ed0fd623755b6565d"}, + {file = "lxml-4.6.3-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d916d31fd85b2f78c76400d625076d9124de3e4bda8b016d25a050cc7d603f24"}, {file = "lxml-4.6.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:820628b7b3135403540202e60551e741f9b6d3304371712521be939470b454ec"}, + {file = "lxml-4.6.3-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:c47ff7e0a36d4efac9fd692cfa33fbd0636674c102e9e8d9b26e1b93a94e7617"}, {file = "lxml-4.6.3-cp36-cp36m-win32.whl", hash = "sha256:5a0a14e264069c03e46f926be0d8919f4105c1623d620e7ec0e612a2e9bf1c04"}, {file = "lxml-4.6.3-cp36-cp36m-win_amd64.whl", hash = "sha256:92e821e43ad382332eade6812e298dc9701c75fe289f2a2d39c7960b43d1e92a"}, {file = "lxml-4.6.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:efd7a09678fd8b53117f6bae4fa3825e0a22b03ef0a932e070c0bdbb3a35e654"}, {file = "lxml-4.6.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:efac139c3f0bf4f0939f9375af4b02c5ad83a622de52d6dfa8e438e8e01d0eb0"}, {file = "lxml-4.6.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:0fbcf5565ac01dff87cbfc0ff323515c823081c5777a9fc7703ff58388c258c3"}, + {file = "lxml-4.6.3-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:36108c73739985979bf302006527cf8a20515ce444ba916281d1c43938b8bb96"}, {file = "lxml-4.6.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:122fba10466c7bd4178b07dba427aa516286b846b2cbd6f6169141917283aae2"}, + {file = "lxml-4.6.3-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:cdaf11d2bd275bf391b5308f86731e5194a21af45fbaaaf1d9e8147b9160ea92"}, {file = "lxml-4.6.3-cp37-cp37m-win32.whl", hash = "sha256:3439c71103ef0e904ea0a1901611863e51f50b5cd5e8654a151740fde5e1cade"}, {file = "lxml-4.6.3-cp37-cp37m-win_amd64.whl", hash = "sha256:4289728b5e2000a4ad4ab8da6e1db2e093c63c08bdc0414799ee776a3f78da4b"}, {file = "lxml-4.6.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b007cbb845b28db4fb8b6a5cdcbf65bacb16a8bd328b53cbc0698688a68e1caa"}, {file = "lxml-4.6.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:76fa7b1362d19f8fbd3e75fe2fb7c79359b0af8747e6f7141c338f0bee2f871a"}, {file = "lxml-4.6.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:26e761ab5b07adf5f555ee82fb4bfc35bf93750499c6c7614bd64d12aaa67927"}, + {file = "lxml-4.6.3-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:e1cbd3f19a61e27e011e02f9600837b921ac661f0c40560eefb366e4e4fb275e"}, {file = "lxml-4.6.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:66e575c62792c3f9ca47cb8b6fab9e35bab91360c783d1606f758761810c9791"}, + {file = "lxml-4.6.3-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:1b38116b6e628118dea5b2186ee6820ab138dbb1e24a13e478490c7db2f326ae"}, {file = "lxml-4.6.3-cp38-cp38-win32.whl", hash = "sha256:89b8b22a5ff72d89d48d0e62abb14340d9e99fd637d046c27b8b257a01ffbe28"}, {file = "lxml-4.6.3-cp38-cp38-win_amd64.whl", hash = "sha256:2a9d50e69aac3ebee695424f7dbd7b8c6d6eb7de2a2eb6b0f6c7db6aa41e02b7"}, {file = "lxml-4.6.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ce256aaa50f6cc9a649c51be3cd4ff142d67295bfc4f490c9134d0f9f6d58ef0"}, {file = "lxml-4.6.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:7610b8c31688f0b1be0ef882889817939490a36d0ee880ea562a4e1399c447a1"}, {file = "lxml-4.6.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f8380c03e45cf09f8557bdaa41e1fa7c81f3ae22828e1db470ab2a6c96d8bc23"}, + {file = "lxml-4.6.3-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:3082c518be8e97324390614dacd041bb1358c882d77108ca1957ba47738d9d59"}, {file = "lxml-4.6.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:884ab9b29feaca361f7f88d811b1eea9bfca36cf3da27768d28ad45c3ee6f969"}, + {file = "lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:6f12e1427285008fd32a6025e38e977d44d6382cf28e7201ed10d6c1698d2a9a"}, {file = "lxml-4.6.3-cp39-cp39-win32.whl", hash = "sha256:33bb934a044cf32157c12bfcfbb6649807da20aa92c062ef51903415c704704f"}, {file = "lxml-4.6.3-cp39-cp39-win_amd64.whl", hash = "sha256:542d454665a3e277f76954418124d67516c5f88e51a900365ed54a9806122b83"}, {file = "lxml-4.6.3.tar.gz", hash = "sha256:39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468"}, @@ -4008,6 +4030,10 @@ oauthlib = [ onetimepass = [ {file = "onetimepass-1.0.1.tar.gz", hash = "sha256:a569dac076d6e3761cbc55e36952144a637ca1b075c6d509de1c1dbc5e7f6a27"}, ] +openpyxl = [ + {file = "openpyxl-3.0.7-py2.py3-none-any.whl", hash = "sha256:46af4eaf201a89b610fcca177eed957635f88770a5462fb6aae4a2a52b0ff516"}, + {file = "openpyxl-3.0.7.tar.gz", hash = "sha256:6456a3b472e1ef0facb1129f3c6ef00713cebf62e736cd7a75bcc3247432f251"}, +] opt-einsum = [ {file = "opt_einsum-3.3.0-py3-none-any.whl", hash = "sha256:2455e59e3947d3c275477df7f5205b30635e266fe6dc300e3d9f9646bfcea147"}, {file = "opt_einsum-3.3.0.tar.gz", hash = "sha256:59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549"}, @@ -4228,9 +4254,13 @@ protobuf = [ {file = "protobuf-3.17.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2ae692bb6d1992afb6b74348e7bb648a75bb0d3565a3f5eea5bec8f62bd06d87"}, {file = "protobuf-3.17.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:99938f2a2d7ca6563c0ade0c5ca8982264c484fdecf418bd68e880a7ab5730b1"}, {file = "protobuf-3.17.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6902a1e4b7a319ec611a7345ff81b6b004b36b0d2196ce7a748b3493da3d226d"}, + {file = "protobuf-3.17.3-cp38-cp38-win32.whl", hash = "sha256:59e5cf6b737c3a376932fbfb869043415f7c16a0cf176ab30a5bbc419cd709c1"}, + {file = "protobuf-3.17.3-cp38-cp38-win_amd64.whl", hash = "sha256:ebcb546f10069b56dc2e3da35e003a02076aaa377caf8530fe9789570984a8d2"}, {file = "protobuf-3.17.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4ffbd23640bb7403574f7aff8368e2aeb2ec9a5c6306580be48ac59a6bac8bde"}, {file = "protobuf-3.17.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:26010f693b675ff5a1d0e1bdb17689b8b716a18709113288fead438703d45539"}, {file = "protobuf-3.17.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:e76d9686e088fece2450dbc7ee905f9be904e427341d289acbe9ad00b78ebd47"}, + {file = "protobuf-3.17.3-cp39-cp39-win32.whl", hash = "sha256:a38bac25f51c93e4be4092c88b2568b9f407c27217d3dd23c7a57fa522a17554"}, + {file = "protobuf-3.17.3-cp39-cp39-win_amd64.whl", hash = "sha256:85d6303e4adade2827e43c2b54114d9a6ea547b671cb63fafd5011dc47d0e13d"}, {file = "protobuf-3.17.3-py2.py3-none-any.whl", hash = "sha256:2bfb815216a9cd9faec52b16fd2bfa68437a44b67c56bee59bc3926522ecb04e"}, {file = "protobuf-3.17.3.tar.gz", hash = "sha256:72804ea5eaa9c22a090d2803813e280fb273b62d5ae497aaf3553d141c4fdd7b"}, ] @@ -4404,18 +4434,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, diff --git a/tests/data/json/fa_av_balance.json b/tests/data/json/fa_av_balance.json new file mode 100644 index 00000000000..16d59d6d7c2 --- /dev/null +++ b/tests/data/json/fa_av_balance.json @@ -0,0 +1,1007 @@ +{ + "symbol": "GME", + "annualReports": [ + { + "fiscalDateEnding": "2021-01-30", + "reportedCurrency": "USD", + "totalAssets": "2472600000", + "totalCurrentAssets": "1551200000", + "cashAndCashEquivalentsAtCarryingValue": "508500000", + "cashAndShortTermInvestments": "508500000", + "inventory": "602500000", + "currentNetReceivables": "105300000", + "totalNonCurrentAssets": "819700000", + "propertyPlantEquipment": "201200000", + "accumulatedDepreciationAmortizationPPE": "1117700000", + "intangibleAssets": "18500000", + "intangibleAssetsExcludingGoodwill": "18500000", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "112500000", + "otherNonCurrrentAssets": "41600000", + "totalLiabilities": "2035900000", + "totalCurrentLiabilities": "1342700000", + "currentAccountsPayable": "341800000", + "deferredRevenue": "348200000", + "currentDebt": "146700000", + "shortTermDebt": "146700000", + "totalNonCurrentLiabilities": "693200000", + "capitalLeaseObligations": "684100000", + "longTermDebt": "362700000", + "currentLongTermDebt": "121700000", + "longTermDebtNoncurrent": "216000000", + "shortLongTermDebtTotal": "362700000", + "otherCurrentLiabilities": "425200000", + "otherNonCurrentLiabilities": "20500000", + "totalShareholderEquity": "436700000", + "treasuryStock": "None", + "retainedEarnings": "474900000", + "commonStock": "100000", + "commonStockSharesOutstanding": "65300000" + }, + { + "fiscalDateEnding": "2020-02-01", + "reportedCurrency": "USD", + "totalAssets": "2819700000", + "totalCurrentAssets": "1633700000", + "cashAndCashEquivalentsAtCarryingValue": "499400000", + "cashAndShortTermInvestments": "499400000", + "inventory": "859700000", + "currentNetReceivables": "141900000", + "totalNonCurrentAssets": "1199800000", + "propertyPlantEquipment": "275900000", + "accumulatedDepreciationAmortizationPPE": "1190100000", + "intangibleAssets": "0", + "intangibleAssetsExcludingGoodwill": "22800000", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "132700000", + "otherNonCurrrentAssets": "46300000", + "totalLiabilities": "2208200000", + "totalCurrentLiabilities": "1237700000", + "currentAccountsPayable": "380800000", + "deferredRevenue": "339200000", + "currentDebt": "0", + "shortTermDebt": "None", + "totalNonCurrentLiabilities": "970500000", + "capitalLeaseObligations": "768700000", + "longTermDebt": "419800000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "419800000", + "shortLongTermDebtTotal": "419800000", + "otherCurrentLiabilities": "239400000", + "otherNonCurrentLiabilities": "21400000", + "totalShareholderEquity": "611500000", + "treasuryStock": "None", + "retainedEarnings": "690200000", + "commonStock": "100000", + "commonStockSharesOutstanding": "64300000" + }, + { + "fiscalDateEnding": "2019-02-02", + "reportedCurrency": "USD", + "totalAssets": "4044300000", + "totalCurrentAssets": "3127700000", + "cashAndCashEquivalentsAtCarryingValue": "1624400000", + "cashAndShortTermInvestments": "1624400000", + "inventory": "1250500000", + "currentNetReceivables": "134200000", + "totalNonCurrentAssets": "916600000", + "propertyPlantEquipment": "321300000", + "accumulatedDepreciationAmortizationPPE": "1235800000", + "intangibleAssets": "397400000", + "intangibleAssetsExcludingGoodwill": "33500000", + "goodwill": "363900000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "118600000", + "otherNonCurrrentAssets": "84100000", + "totalLiabilities": "2708100000", + "totalCurrentLiabilities": "2181100000", + "currentAccountsPayable": "1051900000", + "deferredRevenue": "376900000", + "currentDebt": "349200000", + "shortTermDebt": "349200000", + "totalNonCurrentLiabilities": "527000000", + "capitalLeaseObligations": "None", + "longTermDebt": "820800000", + "currentLongTermDebt": "349200000", + "longTermDebtNoncurrent": "471600000", + "shortLongTermDebtTotal": "820800000", + "otherCurrentLiabilities": "502800000", + "otherNonCurrentLiabilities": "55400000", + "totalShareholderEquity": "1336200000", + "treasuryStock": "None", + "retainedEarnings": "1362700000", + "commonStock": "100000", + "commonStockSharesOutstanding": "102000000" + }, + { + "fiscalDateEnding": "2018-02-03", + "reportedCurrency": "USD", + "totalAssets": "5041600000", + "totalCurrentAssets": "3018400000", + "cashAndCashEquivalentsAtCarryingValue": "854200000", + "cashAndShortTermInvestments": "864400000", + "inventory": "1250300000", + "currentNetReceivables": "138600000", + "totalNonCurrentAssets": "2023200000", + "propertyPlantEquipment": "351000000", + "accumulatedDepreciationAmortizationPPE": "1235300000", + "intangibleAssets": "1443000000", + "intangibleAssetsExcludingGoodwill": "92500000", + "goodwill": "1350500000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "10200000", + "otherCurrentAssets": "124900000", + "otherNonCurrrentAssets": "71000000", + "totalLiabilities": "2827100000", + "totalCurrentLiabilities": "1930800000", + "currentAccountsPayable": "892300000", + "deferredRevenue": "132400000", + "currentDebt": "None", + "shortTermDebt": "817900000", + "totalNonCurrentLiabilities": "896300000", + "capitalLeaseObligations": "None", + "longTermDebt": "817900000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "817900000", + "shortLongTermDebtTotal": "-7100000", + "otherCurrentLiabilities": "711600000", + "otherNonCurrentLiabilities": "73400000", + "totalShareholderEquity": "2214500000", + "treasuryStock": "None", + "retainedEarnings": "2180100000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101300000" + }, + { + "fiscalDateEnding": "2017-01-28", + "reportedCurrency": "USD", + "totalAssets": "4975900000", + "totalCurrentAssets": "2140700000", + "cashAndCashEquivalentsAtCarryingValue": "664500000", + "cashAndShortTermInvestments": "669400000", + "inventory": "1121500000", + "currentNetReceivables": "220900000", + "totalNonCurrentAssets": "2835200000", + "propertyPlantEquipment": "363300000", + "accumulatedDepreciationAmortizationPPE": "1203500000", + "intangibleAssets": "1882800000", + "intangibleAssetsExcludingGoodwill": "507200000", + "goodwill": "1375600000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "4900000", + "otherCurrentAssets": "128900000", + "otherNonCurrrentAssets": "72800000", + "totalLiabilities": "2721800000", + "totalCurrentLiabilities": "1761500000", + "currentAccountsPayable": "616600000", + "deferredRevenue": "131500000", + "currentDebt": "None", + "shortTermDebt": "815000000", + "totalNonCurrentLiabilities": "960300000", + "capitalLeaseObligations": "None", + "longTermDebt": "815000000", + "currentLongTermDebt": "815000000", + "longTermDebtNoncurrent": "815000000", + "shortLongTermDebtTotal": "815000000", + "otherCurrentLiabilities": "816400000", + "otherNonCurrentLiabilities": "122300000", + "totalShareholderEquity": "2254100000", + "treasuryStock": "None", + "retainedEarnings": "2301300000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101000000" + } + ], + "quarterlyReports": [ + { + "fiscalDateEnding": "2021-05-01", + "reportedCurrency": "USD", + "totalAssets": "2562700000", + "totalCurrentAssets": "1657200000", + "cashAndCashEquivalentsAtCarryingValue": "694700000", + "cashAndShortTermInvestments": "694700000", + "inventory": "570900000", + "currentNetReceivables": "102100000", + "totalNonCurrentAssets": "905500000", + "propertyPlantEquipment": "192600000", + "accumulatedDepreciationAmortizationPPE": "1109900000", + "intangibleAssets": "None", + "intangibleAssetsExcludingGoodwill": "None", + "goodwill": "None", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "943700000", + "otherNonCurrrentAssets": "40000000", + "totalLiabilities": "1683200000", + "totalCurrentLiabilities": "1217900000", + "currentAccountsPayable": "388600000", + "deferredRevenue": "322600000", + "currentDebt": "48100000", + "shortTermDebt": "48100000", + "totalNonCurrentLiabilities": "465300000", + "capitalLeaseObligations": "664400000", + "longTermDebt": "48100000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "0", + "shortLongTermDebtTotal": "48100000", + "otherCurrentLiabilities": "267500000", + "otherNonCurrentLiabilities": "20300000", + "totalShareholderEquity": "879500000", + "treasuryStock": "None", + "retainedEarnings": "408100000", + "commonStock": "100000", + "commonStockSharesOutstanding": "69300000" + }, + { + "fiscalDateEnding": "2021-01-30", + "reportedCurrency": "USD", + "totalAssets": "2472600000", + "totalCurrentAssets": "1551200000", + "cashAndCashEquivalentsAtCarryingValue": "508500000", + "cashAndShortTermInvestments": "508500000", + "inventory": "602500000", + "currentNetReceivables": "105300000", + "totalNonCurrentAssets": "819700000", + "propertyPlantEquipment": "201200000", + "accumulatedDepreciationAmortizationPPE": "1117700000", + "intangibleAssets": "18500000", + "intangibleAssetsExcludingGoodwill": "18500000", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "112500000", + "otherNonCurrrentAssets": "41600000", + "totalLiabilities": "2035900000", + "totalCurrentLiabilities": "1342700000", + "currentAccountsPayable": "341800000", + "deferredRevenue": "348200000", + "currentDebt": "146700000", + "shortTermDebt": "146700000", + "totalNonCurrentLiabilities": "693200000", + "capitalLeaseObligations": "684100000", + "longTermDebt": "362700000", + "currentLongTermDebt": "121700000", + "longTermDebtNoncurrent": "216000000", + "shortLongTermDebtTotal": "362700000", + "otherCurrentLiabilities": "425200000", + "otherNonCurrentLiabilities": "20500000", + "totalShareholderEquity": "436700000", + "treasuryStock": "None", + "retainedEarnings": "474900000", + "commonStock": "100000", + "commonStockSharesOutstanding": "65300000" + }, + { + "fiscalDateEnding": "2020-10-31", + "reportedCurrency": "USD", + "totalAssets": "2601400000", + "totalCurrentAssets": "1651900000", + "cashAndCashEquivalentsAtCarryingValue": "445900000", + "cashAndShortTermInvestments": "445900000", + "inventory": "861000000", + "currentNetReceivables": "77600000", + "totalNonCurrentAssets": "949500000", + "propertyPlantEquipment": "193000000", + "accumulatedDepreciationAmortizationPPE": "1175300000", + "intangibleAssets": "None", + "intangibleAssetsExcludingGoodwill": "None", + "goodwill": "None", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "142000000", + "otherNonCurrrentAssets": "44600000", + "totalLiabilities": "2269200000", + "totalCurrentLiabilities": "1576700000", + "currentAccountsPayable": "440200000", + "deferredRevenue": "404600000", + "currentDebt": "269500000", + "shortTermDebt": "31600000", + "totalNonCurrentLiabilities": "692500000", + "capitalLeaseObligations": "669600000", + "longTermDebt": "485500000", + "currentLongTermDebt": "25000000", + "longTermDebtNoncurrent": "216000000", + "shortLongTermDebtTotal": "517100000", + "otherCurrentLiabilities": "3200000", + "otherNonCurrentLiabilities": "19800000", + "totalShareholderEquity": "332200000", + "treasuryStock": "None", + "retainedEarnings": "394400000", + "commonStock": "100000", + "commonStockSharesOutstanding": "65200000" + }, + { + "fiscalDateEnding": "2020-08-01", + "reportedCurrency": "USD", + "totalAssets": "2375200000", + "totalCurrentAssets": "1379900000", + "cashAndCashEquivalentsAtCarryingValue": "735100000", + "cashAndShortTermInvestments": "735100000", + "inventory": "474600000", + "currentNetReceivables": "83100000", + "totalNonCurrentAssets": "995300000", + "propertyPlantEquipment": "219700000", + "accumulatedDepreciationAmortizationPPE": "1176500000", + "intangibleAssets": "None", + "intangibleAssetsExcludingGoodwill": "None", + "goodwill": "None", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "13900000", + "otherNonCurrrentAssets": "57400000", + "totalLiabilities": "2022900000", + "totalCurrentLiabilities": "1312200000", + "currentAccountsPayable": "256400000", + "deferredRevenue": "None", + "currentDebt": "256300000", + "shortTermDebt": "35000000", + "totalNonCurrentLiabilities": "710700000", + "capitalLeaseObligations": "694300000", + "longTermDebt": "472200000", + "currentLongTermDebt": "256300000", + "longTermDebtNoncurrent": "215900000", + "shortLongTermDebtTotal": "250900000", + "otherCurrentLiabilities": "8400000", + "otherNonCurrentLiabilities": "19300000", + "totalShareholderEquity": "352300000", + "treasuryStock": "None", + "retainedEarnings": "413200000", + "commonStock": "100000", + "commonStockSharesOutstanding": "65200000" + }, + { + "fiscalDateEnding": "2020-05-02", + "reportedCurrency": "USD", + "totalAssets": "2469000000", + "totalCurrentAssets": "1419900000", + "cashAndCashEquivalentsAtCarryingValue": "570300000", + "cashAndShortTermInvestments": "570300000", + "inventory": "654700000", + "currentNetReceivables": "86700000", + "totalNonCurrentAssets": "1049100000", + "propertyPlantEquipment": "256300000", + "accumulatedDepreciationAmortizationPPE": "1172400000", + "intangibleAssets": "None", + "intangibleAssetsExcludingGoodwill": "None", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "108200000", + "otherNonCurrrentAssets": "43800000", + "totalLiabilities": "2034000000", + "totalCurrentLiabilities": "1519700000", + "currentAccountsPayable": "212100000", + "deferredRevenue": "304600000", + "currentDebt": "552200000", + "shortTermDebt": "417200000", + "totalNonCurrentLiabilities": "514300000", + "capitalLeaseObligations": "743300000", + "longTermDebt": "552200000", + "currentLongTermDebt": "417200000", + "longTermDebtNoncurrent": "0", + "shortLongTermDebtTotal": "969400000", + "otherCurrentLiabilities": "249400000", + "otherNonCurrentLiabilities": "20400000", + "totalShareholderEquity": "435000000", + "treasuryStock": "None", + "retainedEarnings": "524500000", + "commonStock": "100000", + "commonStockSharesOutstanding": "64600000" + }, + { + "fiscalDateEnding": "2020-02-01", + "reportedCurrency": "USD", + "totalAssets": "2819700000", + "totalCurrentAssets": "1633700000", + "cashAndCashEquivalentsAtCarryingValue": "499400000", + "cashAndShortTermInvestments": "499400000", + "inventory": "859700000", + "currentNetReceivables": "141900000", + "totalNonCurrentAssets": "1199800000", + "propertyPlantEquipment": "275900000", + "accumulatedDepreciationAmortizationPPE": "1190100000", + "intangibleAssets": "0", + "intangibleAssetsExcludingGoodwill": "22800000", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "13500000", + "otherNonCurrrentAssets": "46300000", + "totalLiabilities": "2208200000", + "totalCurrentLiabilities": "1237700000", + "currentAccountsPayable": "380800000", + "deferredRevenue": "339200000", + "currentDebt": "0", + "shortTermDebt": "None", + "totalNonCurrentLiabilities": "970500000", + "capitalLeaseObligations": "768700000", + "longTermDebt": "419800000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "419800000", + "shortLongTermDebtTotal": "419800000", + "otherCurrentLiabilities": "423000000", + "otherNonCurrentLiabilities": "21400000", + "totalShareholderEquity": "611500000", + "treasuryStock": "None", + "retainedEarnings": "690200000", + "commonStock": "100000", + "commonStockSharesOutstanding": "64300000" + }, + { + "fiscalDateEnding": "2019-11-02", + "reportedCurrency": "USD", + "totalAssets": "3145600000", + "totalCurrentAssets": "1863100000", + "cashAndCashEquivalentsAtCarryingValue": "290300000", + "cashAndShortTermInvestments": "290300000", + "inventory": "1286700000", + "currentNetReceivables": "145700000", + "totalNonCurrentAssets": "1282500000", + "propertyPlantEquipment": "287100000", + "accumulatedDepreciationAmortizationPPE": "1230400000", + "intangibleAssets": "22800000", + "intangibleAssetsExcludingGoodwill": "22800000", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "140400000", + "otherNonCurrrentAssets": "65700000", + "totalLiabilities": "2528500000", + "totalCurrentLiabilities": "1573500000", + "currentAccountsPayable": "709900000", + "deferredRevenue": "348600000", + "currentDebt": "0", + "shortTermDebt": "None", + "totalNonCurrentLiabilities": "955000000", + "capitalLeaseObligations": "768700000", + "longTermDebt": "419400000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "419400000", + "shortLongTermDebtTotal": "419400000", + "otherCurrentLiabilities": "238500000", + "otherNonCurrentLiabilities": "19100000", + "totalShareholderEquity": "617100000", + "treasuryStock": "None", + "retainedEarnings": "688500000", + "commonStock": "100000", + "commonStockSharesOutstanding": "67900000" + }, + { + "fiscalDateEnding": "2019-08-03", + "reportedCurrency": "USD", + "totalAssets": "2987900000", + "totalCurrentAssets": "1667600000", + "cashAndCashEquivalentsAtCarryingValue": "424000000", + "cashAndShortTermInvestments": "424000000", + "inventory": "948900000", + "currentNetReceivables": "122400000", + "totalNonCurrentAssets": "1333600000", + "propertyPlantEquipment": "312000000", + "accumulatedDepreciationAmortizationPPE": "1255300000", + "intangibleAssets": "None", + "intangibleAssetsExcludingGoodwill": "None", + "goodwill": "0", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "32700000", + "otherNonCurrrentAssets": "80800000", + "totalLiabilities": "2178200000", + "totalCurrentLiabilities": "1216800000", + "currentAccountsPayable": "368300000", + "deferredRevenue": "354500000", + "currentDebt": "0", + "shortTermDebt": "None", + "totalNonCurrentLiabilities": "961400000", + "capitalLeaseObligations": "755000000", + "longTermDebt": "419100000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "419100000", + "shortLongTermDebtTotal": "419100000", + "otherCurrentLiabilities": "14500000", + "otherNonCurrentLiabilities": "18400000", + "totalShareholderEquity": "809700000", + "treasuryStock": "None", + "retainedEarnings": "884700000", + "commonStock": "100000", + "commonStockSharesOutstanding": "90500000" + }, + { + "fiscalDateEnding": "2019-05-04", + "reportedCurrency": "USD", + "totalAssets": "3633300000", + "totalCurrentAssets": "1920100000", + "cashAndCashEquivalentsAtCarryingValue": "543200000", + "cashAndShortTermInvestments": "543200000", + "inventory": "1149100000", + "currentNetReceivables": "126000000", + "totalNonCurrentAssets": "1726400000", + "propertyPlantEquipment": "313300000", + "accumulatedDepreciationAmortizationPPE": "1247900000", + "intangibleAssets": "363900000", + "intangibleAssetsExcludingGoodwill": "33500000", + "goodwill": "363900000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "101800000", + "otherNonCurrrentAssets": "81700000", + "totalLiabilities": "2341600000", + "totalCurrentLiabilities": "1297300000", + "currentAccountsPayable": "458400000", + "deferredRevenue": "350200000", + "currentDebt": "250000000", + "shortTermDebt": "349200000", + "totalNonCurrentLiabilities": "1044300000", + "capitalLeaseObligations": "764200000", + "longTermDebt": "468900000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "468900000", + "shortLongTermDebtTotal": "820800000", + "otherCurrentLiabilities": "250000000", + "otherNonCurrentLiabilities": "22800000", + "totalShareholderEquity": "1291700000", + "treasuryStock": "None", + "retainedEarnings": "1330800000", + "commonStock": "100000", + "commonStockSharesOutstanding": "102300000" + }, + { + "fiscalDateEnding": "2019-02-02", + "reportedCurrency": "USD", + "totalAssets": "4044300000", + "totalCurrentAssets": "3127700000", + "cashAndCashEquivalentsAtCarryingValue": "1624400000", + "cashAndShortTermInvestments": "1624400000", + "inventory": "1250500000", + "currentNetReceivables": "134200000", + "totalNonCurrentAssets": "916600000", + "propertyPlantEquipment": "321300000", + "accumulatedDepreciationAmortizationPPE": "1235800000", + "intangibleAssets": "397400000", + "intangibleAssetsExcludingGoodwill": "33500000", + "goodwill": "363900000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "118600000", + "otherNonCurrrentAssets": "84100000", + "totalLiabilities": "2708100000", + "totalCurrentLiabilities": "2181100000", + "currentAccountsPayable": "1051900000", + "deferredRevenue": "376900000", + "currentDebt": "349200000", + "shortTermDebt": "349200000", + "totalNonCurrentLiabilities": "527000000", + "capitalLeaseObligations": "None", + "longTermDebt": "820800000", + "currentLongTermDebt": "349200000", + "longTermDebtNoncurrent": "471600000", + "shortLongTermDebtTotal": "820800000", + "otherCurrentLiabilities": "None", + "otherNonCurrentLiabilities": "55400000", + "totalShareholderEquity": "1336200000", + "treasuryStock": "None", + "retainedEarnings": "1362700000", + "commonStock": "100000", + "commonStockSharesOutstanding": "102000000" + }, + { + "fiscalDateEnding": "2018-11-03", + "reportedCurrency": "USD", + "totalAssets": "4656700000", + "totalCurrentAssets": "3263000000", + "cashAndCashEquivalentsAtCarryingValue": "448600000", + "cashAndShortTermInvestments": "448600000", + "inventory": "1881500000", + "currentNetReceivables": "152300000", + "totalNonCurrentAssets": "1859600000", + "propertyPlantEquipment": "323900000", + "accumulatedDepreciationAmortizationPPE": "1237900000", + "intangibleAssets": "901800000", + "intangibleAssetsExcludingGoodwill": "124800000", + "goodwill": "777000000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "2700000", + "otherCurrentAssets": "157700000", + "otherNonCurrrentAssets": "103800000", + "totalLiabilities": "3091600000", + "totalCurrentLiabilities": "2556700000", + "currentAccountsPayable": "1452800000", + "deferredRevenue": "None", + "currentDebt": "348800000", + "shortTermDebt": "348800000", + "totalNonCurrentLiabilities": "549800000", + "capitalLeaseObligations": "None", + "longTermDebt": "820000000", + "currentLongTermDebt": "348800000", + "longTermDebtNoncurrent": "471200000", + "shortLongTermDebtTotal": "820000000", + "otherCurrentLiabilities": "48100000", + "otherNonCurrentLiabilities": "63700000", + "totalShareholderEquity": "1565100000", + "treasuryStock": "None", + "retainedEarnings": "1589200000", + "commonStock": "100000", + "commonStockSharesOutstanding": "102000000" + }, + { + "fiscalDateEnding": "2018-08-04", + "reportedCurrency": "USD", + "totalAssets": "4282400000", + "totalCurrentAssets": "2324800000", + "cashAndCashEquivalentsAtCarryingValue": "272800000", + "cashAndShortTermInvestments": "272800000", + "inventory": "1130600000", + "currentNetReceivables": "121800000", + "totalNonCurrentAssets": "2427700000", + "propertyPlantEquipment": "325800000", + "accumulatedDepreciationAmortizationPPE": "1249500000", + "intangibleAssets": "1495600000", + "intangibleAssetsExcludingGoodwill": "157700000", + "goodwill": "1337900000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "2800000", + "otherCurrentAssets": "168400000", + "otherNonCurrrentAssets": "140300000", + "totalLiabilities": "2178200000", + "totalCurrentLiabilities": "1290800000", + "currentAccountsPayable": "535800000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "819200000", + "totalNonCurrentLiabilities": "902500000", + "capitalLeaseObligations": "None", + "longTermDebt": "819200000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "819200000", + "shortLongTermDebtTotal": "819200000", + "otherCurrentLiabilities": "54600000", + "otherNonCurrentLiabilities": "63200000", + "totalShareholderEquity": "2104200000", + "treasuryStock": "None", + "retainedEarnings": "2117000000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101900000" + }, + { + "fiscalDateEnding": "2018-05-05", + "reportedCurrency": "USD", + "totalAssets": "4308400000", + "totalCurrentAssets": "2327300000", + "cashAndCashEquivalentsAtCarryingValue": "242100000", + "cashAndShortTermInvestments": "242100000", + "inventory": "1184500000", + "currentNetReceivables": "104500000", + "totalNonCurrentAssets": "2456800000", + "propertyPlantEquipment": "333500000", + "accumulatedDepreciationAmortizationPPE": "1237100000", + "intangibleAssets": "1505500000", + "intangibleAssetsExcludingGoodwill": "163200000", + "goodwill": "1342300000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "2800000", + "otherCurrentAssets": "141900000", + "otherNonCurrrentAssets": "151700000", + "totalLiabilities": "2124900000", + "totalCurrentLiabilities": "1229600000", + "currentAccountsPayable": "547800000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "818600000", + "totalNonCurrentLiabilities": "910200000", + "capitalLeaseObligations": "None", + "longTermDebt": "818600000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "818600000", + "shortLongTermDebtTotal": "818600000", + "otherCurrentLiabilities": "65900000", + "otherNonCurrentLiabilities": "71700000", + "totalShareholderEquity": "2183500000", + "treasuryStock": "None", + "retainedEarnings": "2180900000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101900000" + }, + { + "fiscalDateEnding": "2018-02-03", + "reportedCurrency": "USD", + "totalAssets": "5041600000", + "totalCurrentAssets": "3018400000", + "cashAndCashEquivalentsAtCarryingValue": "854200000", + "cashAndShortTermInvestments": "864400000", + "inventory": "1250300000", + "currentNetReceivables": "138600000", + "totalNonCurrentAssets": "2023200000", + "propertyPlantEquipment": "351000000", + "accumulatedDepreciationAmortizationPPE": "1235300000", + "intangibleAssets": "1443000000", + "intangibleAssetsExcludingGoodwill": "92500000", + "goodwill": "1350500000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "10200000", + "otherCurrentAssets": "124900000", + "otherNonCurrrentAssets": "71000000", + "totalLiabilities": "2827100000", + "totalCurrentLiabilities": "1930800000", + "currentAccountsPayable": "892300000", + "deferredRevenue": "132400000", + "currentDebt": "None", + "shortTermDebt": "817900000", + "totalNonCurrentLiabilities": "896300000", + "capitalLeaseObligations": "None", + "longTermDebt": "817900000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "817900000", + "shortLongTermDebtTotal": "-7100000", + "otherCurrentLiabilities": "799700000", + "otherNonCurrentLiabilities": "73400000", + "totalShareholderEquity": "2214500000", + "treasuryStock": "None", + "retainedEarnings": "2180100000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101300000" + }, + { + "fiscalDateEnding": "2017-10-28", + "reportedCurrency": "USD", + "totalAssets": "5474000000", + "totalCurrentAssets": "2671000000", + "cashAndCashEquivalentsAtCarryingValue": "454700000", + "cashAndShortTermInvestments": "454700000", + "inventory": "1822500000", + "currentNetReceivables": "195800000", + "totalNonCurrentAssets": "2803000000", + "propertyPlantEquipment": "457900000", + "accumulatedDepreciationAmortizationPPE": "1300900000", + "intangibleAssets": "2201200000", + "intangibleAssetsExcludingGoodwill": "508000000", + "goodwill": "1693200000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "198000000", + "otherNonCurrrentAssets": "70700000", + "totalLiabilities": "3160300000", + "totalCurrentLiabilities": "2217500000", + "currentAccountsPayable": "1285100000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "817200000", + "totalNonCurrentLiabilities": "942800000", + "capitalLeaseObligations": "None", + "longTermDebt": "817200000", + "currentLongTermDebt": "0", + "longTermDebtNoncurrent": "817200000", + "shortLongTermDebtTotal": "-7800000", + "otherCurrentLiabilities": "914900000", + "otherNonCurrentLiabilities": "103400000", + "totalShareholderEquity": "2313700000", + "treasuryStock": "None", + "retainedEarnings": "2325100000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101300000" + }, + { + "fiscalDateEnding": "2017-07-29", + "reportedCurrency": "USD", + "totalAssets": "4609800000", + "totalCurrentAssets": "1790600000", + "cashAndCashEquivalentsAtCarryingValue": "262100000", + "cashAndShortTermInvestments": "262100000", + "inventory": "1140600000", + "currentNetReceivables": "185400000", + "totalNonCurrentAssets": "2819200000", + "propertyPlantEquipment": "457400000", + "accumulatedDepreciationAmortizationPPE": "1281400000", + "intangibleAssets": "2210100000", + "intangibleAssetsExcludingGoodwill": "512100000", + "goodwill": "1698000000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "202500000", + "otherNonCurrrentAssets": "78500000", + "totalLiabilities": "2298100000", + "totalCurrentLiabilities": "1337700000", + "currentAccountsPayable": "469800000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "816400000", + "totalNonCurrentLiabilities": "960400000", + "capitalLeaseObligations": "None", + "longTermDebt": "816400000", + "currentLongTermDebt": "816400000", + "longTermDebtNoncurrent": "816400000", + "shortLongTermDebtTotal": "-8600000", + "otherCurrentLiabilities": "855800000", + "otherNonCurrentLiabilities": "121700000", + "totalShareholderEquity": "2311700000", + "treasuryStock": "None", + "retainedEarnings": "2304800000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101300000" + }, + { + "fiscalDateEnding": "2017-04-29", + "reportedCurrency": "USD", + "totalAssets": "4683400000", + "totalCurrentAssets": "1847000000", + "cashAndCashEquivalentsAtCarryingValue": "311900000", + "cashAndShortTermInvestments": "311900000", + "inventory": "1216900000", + "currentNetReceivables": "172500000", + "totalNonCurrentAssets": "2836400000", + "propertyPlantEquipment": "453600000", + "accumulatedDepreciationAmortizationPPE": "1230800000", + "intangibleAssets": "2237600000", + "intangibleAssetsExcludingGoodwill": "512700000", + "goodwill": "1724900000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "145700000", + "otherNonCurrrentAssets": "72000000", + "totalLiabilities": "2414500000", + "totalCurrentLiabilities": "1465600000", + "currentAccountsPayable": "526100000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "815700000", + "totalNonCurrentLiabilities": "948900000", + "capitalLeaseObligations": "None", + "longTermDebt": "815700000", + "currentLongTermDebt": "815700000", + "longTermDebtNoncurrent": "815700000", + "shortLongTermDebtTotal": "-9300000", + "otherCurrentLiabilities": "845400000", + "otherNonCurrentLiabilities": "110200000", + "totalShareholderEquity": "2268900000", + "treasuryStock": "None", + "retainedEarnings": "2321700000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101300000" + }, + { + "fiscalDateEnding": "2017-01-28", + "reportedCurrency": "USD", + "totalAssets": "4975900000", + "totalCurrentAssets": "2140700000", + "cashAndCashEquivalentsAtCarryingValue": "664500000", + "cashAndShortTermInvestments": "669400000", + "inventory": "1121500000", + "currentNetReceivables": "220900000", + "totalNonCurrentAssets": "2835200000", + "propertyPlantEquipment": "363300000", + "accumulatedDepreciationAmortizationPPE": "1203500000", + "intangibleAssets": "1882800000", + "intangibleAssetsExcludingGoodwill": "507200000", + "goodwill": "1375600000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "4900000", + "otherCurrentAssets": "128900000", + "otherNonCurrrentAssets": "72800000", + "totalLiabilities": "2721800000", + "totalCurrentLiabilities": "1761500000", + "currentAccountsPayable": "616600000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "815000000", + "totalNonCurrentLiabilities": "960300000", + "capitalLeaseObligations": "None", + "longTermDebt": "815000000", + "currentLongTermDebt": "815000000", + "longTermDebtNoncurrent": "815000000", + "shortLongTermDebtTotal": "815000000", + "otherCurrentLiabilities": "822500000", + "otherNonCurrentLiabilities": "122300000", + "totalShareholderEquity": "2254100000", + "treasuryStock": "None", + "retainedEarnings": "2301300000", + "commonStock": "100000", + "commonStockSharesOutstanding": "101000000" + }, + { + "fiscalDateEnding": "2016-10-29", + "reportedCurrency": "USD", + "totalAssets": "5230600000", + "totalCurrentAssets": "2358800000", + "cashAndCashEquivalentsAtCarryingValue": "356100000", + "cashAndShortTermInvestments": "356100000", + "inventory": "1633600000", + "currentNetReceivables": "181100000", + "totalNonCurrentAssets": "2871800000", + "propertyPlantEquipment": "503100000", + "accumulatedDepreciationAmortizationPPE": "1166800000", + "intangibleAssets": "2254500000", + "intangibleAssetsExcludingGoodwill": "527700000", + "goodwill": "1726800000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "188000000", + "otherNonCurrrentAssets": "75200000", + "totalLiabilities": "3106500000", + "totalCurrentLiabilities": "2151100000", + "currentAccountsPayable": "1242600000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "None", + "totalNonCurrentLiabilities": "955400000", + "capitalLeaseObligations": "None", + "longTermDebt": "0", + "currentLongTermDebt": "None", + "longTermDebtNoncurrent": "814300000", + "shortLongTermDebtTotal": "-10700000", + "otherCurrentLiabilities": "877800000", + "otherNonCurrentLiabilities": "111000000", + "totalShareholderEquity": "2124100000", + "treasuryStock": "None", + "retainedEarnings": "2169700000", + "commonStock": "100000", + "commonStockSharesOutstanding": "102600000" + }, + { + "fiscalDateEnding": "2016-07-30", + "reportedCurrency": "USD", + "totalAssets": "4133600000", + "totalCurrentAssets": "1684400000", + "cashAndCashEquivalentsAtCarryingValue": "289500000", + "cashAndShortTermInvestments": "289500000", + "inventory": "1093000000", + "currentNetReceivables": "126600000", + "totalNonCurrentAssets": "2449200000", + "propertyPlantEquipment": "480900000", + "accumulatedDepreciationAmortizationPPE": "1135900000", + "intangibleAssets": "1859700000", + "intangibleAssetsExcludingGoodwill": "369700000", + "goodwill": "1490000000", + "investments": "None", + "longTermInvestments": "None", + "shortTermInvestments": "None", + "otherCurrentAssets": "175300000", + "otherNonCurrrentAssets": "69600000", + "totalLiabilities": "1982600000", + "totalCurrentLiabilities": "1056500000", + "currentAccountsPayable": "370700000", + "deferredRevenue": "None", + "currentDebt": "None", + "shortTermDebt": "None", + "totalNonCurrentLiabilities": "926100000", + "capitalLeaseObligations": "None", + "longTermDebt": "0", + "currentLongTermDebt": "None", + "longTermDebtNoncurrent": "813500000", + "shortLongTermDebtTotal": "-11500000", + "otherCurrentLiabilities": "682400000", + "otherNonCurrentLiabilities": "82500000", + "totalShareholderEquity": "2151000000", + "treasuryStock": "None", + "retainedEarnings": "2184500000", + "commonStock": "100000", + "commonStockSharesOutstanding": "104000000" + } + ] +} diff --git a/tests/data/json/fa_av_cash.json b/tests/data/json/fa_av_cash.json new file mode 100644 index 00000000000..007872cdbaa --- /dev/null +++ b/tests/data/json/fa_av_cash.json @@ -0,0 +1,782 @@ +{ + "symbol": "GME", + "annualReports": [ + { + "fiscalDateEnding": "2021-01-30", + "reportedCurrency": "USD", + "operatingCashflow": "123700000", + "paymentsForOperatingActivities": "259700000", + "proceedsFromOperatingActivities": "58800000", + "changeInOperatingLiabilities": "-81600000", + "changeInOperatingAssets": "-410900000", + "depreciationDepletionAndAmortization": "161500000", + "capitalExpenditures": "60000000", + "changeInReceivables": "-39800000", + "changeInInventory": "-282400000", + "profitLoss": "-214600000", + "cashflowFromInvestment": "36900000", + "cashflowFromFinancing": "-55400000", + "proceedsFromRepaymentsOfShortTermDebt": "72100000", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "300000", + "dividendPayoutCommonStock": "300000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "3000000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "105200000", + "changeInExchangeRate": "None", + "netIncome": "-215300000" + }, + { + "fiscalDateEnding": "2020-02-01", + "reportedCurrency": "USD", + "operatingCashflow": "-414500000", + "paymentsForOperatingActivities": "363300000", + "proceedsFromOperatingActivities": "24900000", + "changeInOperatingLiabilities": "-792800000", + "changeInOperatingAssets": "-415200000", + "depreciationDepletionAndAmortization": "192400000", + "capitalExpenditures": "78500000", + "changeInReceivables": "10900000", + "changeInInventory": "-361100000", + "profitLoss": "-470900000", + "cashflowFromInvestment": "-60900000", + "cashflowFromFinancing": "-644700000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "198700000", + "paymentsForRepurchaseOfEquity": "198700000", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "40500000", + "dividendPayoutCommonStock": "40500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-198700000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-1127000000", + "changeInExchangeRate": "-6900000", + "netIncome": "-470900000" + }, + { + "fiscalDateEnding": "2019-02-02", + "reportedCurrency": "USD", + "operatingCashflow": "325100000", + "paymentsForOperatingActivities": "122900000", + "proceedsFromOperatingActivities": "8800000", + "changeInOperatingLiabilities": "-21100000", + "changeInOperatingAssets": "19600000", + "depreciationDepletionAndAmortization": "233700000", + "capitalExpenditures": "93700000", + "changeInReceivables": "34400000", + "changeInInventory": "-12600000", + "profitLoss": "-673000000", + "cashflowFromInvestment": "635500000", + "cashflowFromFinancing": "-174700000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "157400000", + "dividendPayoutCommonStock": "157400000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-5100000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "771400000", + "changeInExchangeRate": "-24700000", + "netIncome": "-673000000" + }, + { + "fiscalDateEnding": "2018-02-03", + "reportedCurrency": "USD", + "operatingCashflow": "434900000", + "paymentsForOperatingActivities": "221700000", + "proceedsFromOperatingActivities": "7800000", + "changeInOperatingLiabilities": "155000000", + "changeInOperatingAssets": "221800000", + "depreciationDepletionAndAmortization": "275400000", + "capitalExpenditures": "113400000", + "changeInReceivables": "-35700000", + "changeInInventory": "197200000", + "profitLoss": "34700000", + "cashflowFromInvestment": "-60600000", + "cashflowFromFinancing": "-202500000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "22000000", + "paymentsForRepurchaseOfEquity": "22000000", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "155200000", + "dividendPayoutCommonStock": "155200000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-22000000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "194400000", + "changeInExchangeRate": "28000000", + "netIncome": "34700000" + }, + { + "fiscalDateEnding": "2017-01-28", + "reportedCurrency": "USD", + "operatingCashflow": "537100000", + "paymentsForOperatingActivities": "252600000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "65800000", + "changeInOperatingAssets": "40600000", + "depreciationDepletionAndAmortization": "333400000", + "capitalExpenditures": "142700000", + "changeInReceivables": "43900000", + "changeInInventory": "-14700000", + "profitLoss": "353200000", + "cashflowFromInvestment": "-577400000", + "cashflowFromFinancing": "238700000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "63100000", + "paymentsForRepurchaseOfEquity": "63100000", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "155500000", + "dividendPayoutCommonStock": "155500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "475000000", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-63100000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "217300000", + "changeInExchangeRate": "21100000", + "netIncome": "353200000" + } + ], + "quarterlyReports": [ + { + "fiscalDateEnding": "2021-05-01", + "reportedCurrency": "USD", + "operatingCashflow": "-18800000", + "paymentsForOperatingActivities": "200000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-11500000", + "changeInOperatingAssets": "-32600000", + "depreciationDepletionAndAmortization": "18700000", + "capitalExpenditures": "14700000", + "changeInReceivables": "-3100000", + "changeInInventory": "-32400000", + "profitLoss": "-66800000", + "cashflowFromInvestment": "-14700000", + "cashflowFromFinancing": "169300000", + "proceedsFromRepaymentsOfShortTermDebt": "-25000000", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "100000", + "dividendPayoutCommonStock": "100000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "551700000", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "551700000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "135800000", + "changeInExchangeRate": "None", + "netIncome": "-66800000" + }, + { + "fiscalDateEnding": "2021-01-30", + "reportedCurrency": "USD", + "operatingCashflow": "164800000", + "paymentsForOperatingActivities": "66000000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-159600000", + "changeInOperatingAssets": "-336400000", + "depreciationDepletionAndAmortization": "100400000", + "capitalExpenditures": "27400000", + "changeInReceivables": "26000000", + "changeInInventory": "-270800000", + "profitLoss": "18800000", + "cashflowFromInvestment": "-26400000", + "cashflowFromFinancing": "-120900000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "0", + "dividendPayoutCommonStock": "300000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "3000000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "18800000", + "changeInExchangeRate": "None", + "netIncome": "80500000" + }, + { + "fiscalDateEnding": "2020-10-31", + "reportedCurrency": "USD", + "operatingCashflow": "-184600000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "None", + "changeInOperatingAssets": "None", + "depreciationDepletionAndAmortization": "19400000", + "capitalExpenditures": "15100000", + "changeInReceivables": "-5300000", + "changeInInventory": "382600000", + "profitLoss": "-18800000", + "cashflowFromInvestment": "27300000", + "cashflowFromFinancing": "13500000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "0", + "dividendPayoutCommonStock": "300000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "0", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "0", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-18800000", + "changeInExchangeRate": "None", + "netIncome": "-18800000" + }, + { + "fiscalDateEnding": "2020-08-01", + "reportedCurrency": "USD", + "operatingCashflow": "192800000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "None", + "changeInOperatingAssets": "None", + "depreciationDepletionAndAmortization": "20200000", + "capitalExpenditures": "10900000", + "changeInReceivables": "-6100000", + "changeInInventory": "-198200000", + "profitLoss": "-85600000", + "cashflowFromInvestment": "42100000", + "cashflowFromFinancing": "-79900000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "0", + "dividendPayoutCommonStock": "300000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "None", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "8600000", + "changeInExchangeRate": "None", + "netIncome": "-111300000" + }, + { + "fiscalDateEnding": "2020-05-02", + "reportedCurrency": "USD", + "operatingCashflow": "-49300000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-274300000", + "changeInOperatingAssets": "-256200000", + "depreciationDepletionAndAmortization": "21500000", + "capitalExpenditures": "6600000", + "changeInReceivables": "-54400000", + "changeInInventory": "-196000000", + "profitLoss": "-165700000", + "cashflowFromInvestment": "-6100000", + "cashflowFromFinancing": "131900000", + "proceedsFromRepaymentsOfShortTermDebt": "135000000", + "paymentsForRepurchaseOfCommonStock": "None", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "300000", + "dividendPayoutCommonStock": "300000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "0", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-500000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-108000000", + "changeInExchangeRate": "None", + "netIncome": "-165700000" + }, + { + "fiscalDateEnding": "2020-02-01", + "reportedCurrency": "USD", + "operatingCashflow": "240300000", + "paymentsForOperatingActivities": "140300000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-304500000", + "changeInOperatingAssets": "-494200000", + "depreciationDepletionAndAmortization": "122300000", + "capitalExpenditures": "17100000", + "changeInReceivables": "4200000", + "changeInInventory": "-422700000", + "profitLoss": "21000000", + "cashflowFromInvestment": "-4000000", + "cashflowFromFinancing": "-22000000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "21800000", + "paymentsForRepurchaseOfEquity": "21800000", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "0", + "dividendPayoutCommonStock": "300000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-21800000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "207400000", + "changeInExchangeRate": "-6900000", + "netIncome": "21000000" + }, + { + "fiscalDateEnding": "2019-11-02", + "reportedCurrency": "USD", + "operatingCashflow": "-8100000", + "paymentsForOperatingActivities": "72400000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "350900000", + "changeInOperatingAssets": "350600000", + "depreciationDepletionAndAmortization": "23900000", + "capitalExpenditures": "20200000", + "changeInReceivables": "15200000", + "changeInInventory": "332100000", + "profitLoss": "-83400000", + "cashflowFromInvestment": "-14700000", + "cashflowFromFinancing": "-114000000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "114000000", + "paymentsForRepurchaseOfEquity": "114000000", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "0", + "dividendPayoutCommonStock": "40500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-114000000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-45600000", + "changeInExchangeRate": "None", + "netIncome": "-83400000" + }, + { + "fiscalDateEnding": "2019-08-03", + "reportedCurrency": "USD", + "operatingCashflow": "18300000", + "paymentsForOperatingActivities": "66300000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-52200000", + "changeInOperatingAssets": "-171500000", + "depreciationDepletionAndAmortization": "22900000", + "capitalExpenditures": "22600000", + "changeInReceivables": "-1600000", + "changeInInventory": "-181100000", + "profitLoss": "-415300000", + "cashflowFromInvestment": "-23500000", + "cashflowFromFinancing": "-114700000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "200000", + "dividendPayoutCommonStock": "200000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "0", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-415300000", + "changeInExchangeRate": "None", + "netIncome": "-415300000" + }, + { + "fiscalDateEnding": "2019-05-04", + "reportedCurrency": "USD", + "operatingCashflow": "-665000000", + "paymentsForOperatingActivities": "84300000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-787000000", + "changeInOperatingAssets": "-100100000", + "depreciationDepletionAndAmortization": "23300000", + "capitalExpenditures": "18600000", + "changeInReceivables": "-6900000", + "changeInInventory": "-89400000", + "profitLoss": "6800000", + "cashflowFromInvestment": "-18700000", + "cashflowFromFinancing": "-394000000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "None", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "40300000", + "dividendPayoutCommonStock": "38700000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-600000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "6800000", + "changeInExchangeRate": "None", + "netIncome": "6800000" + }, + { + "fiscalDateEnding": "2019-02-02", + "reportedCurrency": "USD", + "operatingCashflow": "504300000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-385700000", + "changeInOperatingAssets": "-685300000", + "depreciationDepletionAndAmortization": "136300000", + "capitalExpenditures": "27800000", + "changeInReceivables": "54900000", + "changeInInventory": "-717900000", + "profitLoss": "-187700000", + "cashflowFromInvestment": "701700000", + "cashflowFromFinancing": "-38700000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38700000", + "dividendPayoutCommonStock": "38700000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "None", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "832000000", + "changeInExchangeRate": "-24700000", + "netIncome": "-187700000" + }, + { + "fiscalDateEnding": "2018-11-03", + "reportedCurrency": "USD", + "operatingCashflow": "250700000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "948600000", + "changeInOperatingAssets": "778300000", + "depreciationDepletionAndAmortization": "30500000", + "capitalExpenditures": "25800000", + "changeInReceivables": "-10800000", + "changeInInventory": "782300000", + "profitLoss": "-488600000", + "cashflowFromInvestment": "-28400000", + "cashflowFromFinancing": "-39700000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38800000", + "dividendPayoutCommonStock": "38800000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-900000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-517900000", + "changeInExchangeRate": "None", + "netIncome": "-488600000" + }, + { + "fiscalDateEnding": "2018-08-04", + "reportedCurrency": "USD", + "operatingCashflow": "102000000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "96800000", + "changeInOperatingAssets": "-22200000", + "depreciationDepletionAndAmortization": "32500000", + "capitalExpenditures": "22500000", + "changeInReceivables": "14600000", + "changeInInventory": "-49300000", + "profitLoss": "-24900000", + "cashflowFromInvestment": "-21400000", + "cashflowFromFinancing": "-39000000", + "proceedsFromRepaymentsOfShortTermDebt": "0", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "0", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "39000000", + "dividendPayoutCommonStock": "39000000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "None", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-24900000", + "changeInExchangeRate": "None", + "netIncome": "-24900000" + }, + { + "fiscalDateEnding": "2018-05-05", + "reportedCurrency": "USD", + "operatingCashflow": "-531900000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-680800000", + "changeInOperatingAssets": "-51200000", + "depreciationDepletionAndAmortization": "34400000", + "capitalExpenditures": "17600000", + "changeInReceivables": "-24300000", + "changeInInventory": "-27700000", + "profitLoss": "28200000", + "cashflowFromInvestment": "-16400000", + "cashflowFromFinancing": "-57300000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "40900000", + "dividendPayoutCommonStock": "38500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "None", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-100000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "28200000", + "changeInExchangeRate": "None", + "netIncome": "28200000" + }, + { + "fiscalDateEnding": "2018-02-03", + "reportedCurrency": "USD", + "operatingCashflow": "452000000", + "paymentsForOperatingActivities": "221700000", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-356900000", + "changeInOperatingAssets": "-486700000", + "depreciationDepletionAndAmortization": "162200000", + "capitalExpenditures": "27800000", + "changeInReceivables": "-15300000", + "changeInInventory": "-518200000", + "profitLoss": "-105900000", + "cashflowFromInvestment": "-22600000", + "cashflowFromFinancing": "-38600000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38500000", + "dividendPayoutCommonStock": "38500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "0", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "409100000", + "changeInExchangeRate": "20800000", + "netIncome": "-105900000" + }, + { + "fiscalDateEnding": "2017-10-28", + "reportedCurrency": "USD", + "operatingCashflow": "294600000", + "paymentsForOperatingActivities": "0", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "906800000", + "changeInOperatingAssets": "712300000", + "depreciationDepletionAndAmortization": "37000000", + "capitalExpenditures": "38400000", + "changeInReceivables": "10800000", + "changeInInventory": "698900000", + "profitLoss": "59400000", + "cashflowFromInvestment": "-37400000", + "cashflowFromFinancing": "-60400000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38500000", + "dividendPayoutCommonStock": "38500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "0", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "192600000", + "changeInExchangeRate": "-4800000", + "netIncome": "59400000" + }, + { + "fiscalDateEnding": "2017-07-29", + "reportedCurrency": "USD", + "operatingCashflow": "-54900000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-77800000", + "changeInOperatingAssets": "-80100000", + "depreciationDepletionAndAmortization": "37900000", + "capitalExpenditures": "27200000", + "changeInReceivables": "17500000", + "changeInInventory": "-98400000", + "profitLoss": "22200000", + "cashflowFromInvestment": "26600000", + "cashflowFromFinancing": "-38500000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38500000", + "dividendPayoutCommonStock": "38500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "0", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-49800000", + "changeInExchangeRate": "20500000", + "netIncome": "22200000" + }, + { + "fiscalDateEnding": "2017-04-29", + "reportedCurrency": "USD", + "operatingCashflow": "-256800000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-317100000", + "changeInOperatingAssets": "76300000", + "depreciationDepletionAndAmortization": "38300000", + "capitalExpenditures": "20000000", + "changeInReceivables": "-48700000", + "changeInInventory": "114900000", + "profitLoss": "59000000", + "cashflowFromInvestment": "-27200000", + "cashflowFromFinancing": "-65000000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "22000000", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "39700000", + "dividendPayoutCommonStock": "39700000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-22000000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-357500000", + "changeInExchangeRate": "-8500000", + "netIncome": "59000000" + }, + { + "fiscalDateEnding": "2017-01-28", + "reportedCurrency": "USD", + "operatingCashflow": "405500000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-394100000", + "changeInOperatingAssets": "-463100000", + "depreciationDepletionAndAmortization": "208400000", + "capitalExpenditures": "36900000", + "changeInReceivables": "40300000", + "changeInInventory": "-497600000", + "profitLoss": "208700000", + "cashflowFromInvestment": "-35900000", + "cashflowFromFinancing": "-58100000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "19800000", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "37700000", + "dividendPayoutCommonStock": "37700000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-11400000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "311600000", + "changeInExchangeRate": "2300000", + "netIncome": "208700000" + }, + { + "fiscalDateEnding": "2016-10-29", + "reportedCurrency": "USD", + "operatingCashflow": "567800000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "1052600000", + "changeInOperatingAssets": "610400000", + "depreciationDepletionAndAmortization": "42600000", + "capitalExpenditures": "39700000", + "changeInReceivables": "55000000", + "changeInInventory": "551400000", + "profitLoss": "50800000", + "cashflowFromInvestment": "-432500000", + "cashflowFromFinancing": "-72500000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "33300000", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38500000", + "dividendPayoutCommonStock": "38500000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-33900000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "66600000", + "changeInExchangeRate": "3800000", + "netIncome": "50800000" + }, + { + "fiscalDateEnding": "2016-07-30", + "reportedCurrency": "USD", + "operatingCashflow": "-60100000", + "paymentsForOperatingActivities": "None", + "proceedsFromOperatingActivities": "None", + "changeInOperatingLiabilities": "-240700000", + "changeInOperatingAssets": "-164200000", + "depreciationDepletionAndAmortization": "41400000", + "capitalExpenditures": "36700000", + "changeInReceivables": "-12000000", + "changeInInventory": "-156100000", + "profitLoss": "27900000", + "cashflowFromInvestment": "-81100000", + "cashflowFromFinancing": "-38900000", + "proceedsFromRepaymentsOfShortTermDebt": "None", + "paymentsForRepurchaseOfCommonStock": "0", + "paymentsForRepurchaseOfEquity": "None", + "paymentsForRepurchaseOfPreferredStock": "None", + "dividendPayout": "38400000", + "dividendPayoutCommonStock": "38400000", + "dividendPayoutPreferredStock": "None", + "proceedsFromIssuanceOfCommonStock": "None", + "proceedsFromIssuanceOfLongTermDebtAndCapitalSecuritiesNet": "0", + "proceedsFromIssuanceOfPreferredStock": "None", + "proceedsFromRepurchaseOfEquity": "-200000", + "proceedsFromSaleOfTreasuryStock": "None", + "changeInCashAndCashEquivalents": "-184100000", + "changeInExchangeRate": "-4000000", + "netIncome": "27900000" + } + ] +} diff --git a/tests/data/json/fa_av_earnings.json b/tests/data/json/fa_av_earnings.json new file mode 100644 index 00000000000..087092dae64 --- /dev/null +++ b/tests/data/json/fa_av_earnings.json @@ -0,0 +1,719 @@ +{ + "symbol": "GME", + "annualEarnings": [ + { + "fiscalDateEnding": "2021-07-31", + "reportedEPS": "-0.45" + }, + { + "fiscalDateEnding": "2021-01-31", + "reportedEPS": "1.34" + }, + { + "fiscalDateEnding": "2020-11-30", + "reportedEPS": "-4.07" + }, + { + "fiscalDateEnding": "2020-01-31", + "reportedEPS": "0.53" + }, + { + "fiscalDateEnding": "2019-01-31", + "reportedEPS": "2.7" + }, + { + "fiscalDateEnding": "2018-01-31", + "reportedEPS": "3.34" + }, + { + "fiscalDateEnding": "2017-01-31", + "reportedEPS": "3.8" + }, + { + "fiscalDateEnding": "2016-01-31", + "reportedEPS": "3.93" + }, + { + "fiscalDateEnding": "2015-01-31", + "reportedEPS": "3.53" + }, + { + "fiscalDateEnding": "2014-01-31", + "reportedEPS": "3.03" + }, + { + "fiscalDateEnding": "2013-01-31", + "reportedEPS": "3.24" + }, + { + "fiscalDateEnding": "2012-01-31", + "reportedEPS": "2.9" + }, + { + "fiscalDateEnding": "2011-01-31", + "reportedEPS": "2.68" + }, + { + "fiscalDateEnding": "2010-01-31", + "reportedEPS": "2.27" + }, + { + "fiscalDateEnding": "2009-01-31", + "reportedEPS": "2.4" + }, + { + "fiscalDateEnding": "2008-01-31", + "reportedEPS": "1.79" + }, + { + "fiscalDateEnding": "2007-01-31", + "reportedEPS": "1.04" + }, + { + "fiscalDateEnding": "2006-01-31", + "reportedEPS": "0.8" + }, + { + "fiscalDateEnding": "2005-01-31", + "reportedEPS": "0.61" + }, + { + "fiscalDateEnding": "2004-01-31", + "reportedEPS": "0.55" + }, + { + "fiscalDateEnding": "2003-01-31", + "reportedEPS": "0.44" + }, + { + "fiscalDateEnding": "2002-01-31", + "reportedEPS": "0.1654" + } + ], + "quarterlyEarnings": [ + { + "fiscalDateEnding": "2021-04-30", + "reportedDate": "2021-06-09", + "reportedEPS": "-0.45", + "estimatedEPS": "-0.835", + "surprise": "0.385", + "surprisePercentage": "46.1078" + }, + { + "fiscalDateEnding": "2021-01-31", + "reportedDate": "2021-03-23", + "reportedEPS": "1.34", + "estimatedEPS": "1.4229", + "surprise": "-0.0829", + "surprisePercentage": "-5.8261" + }, + { + "fiscalDateEnding": "2020-10-31", + "reportedDate": "2020-12-08", + "reportedEPS": "-0.53", + "estimatedEPS": "-0.8488", + "surprise": "0.3188", + "surprisePercentage": "37.5589" + }, + { + "fiscalDateEnding": "2020-07-31", + "reportedDate": "2020-09-09", + "reportedEPS": "-1.4", + "estimatedEPS": "-1.135", + "surprise": "-0.265", + "surprisePercentage": "-23.348" + }, + { + "fiscalDateEnding": "2020-04-30", + "reportedDate": "2020-06-09", + "reportedEPS": "-1.61", + "estimatedEPS": "-1.6883", + "surprise": "0.0783", + "surprisePercentage": "4.6378" + }, + { + "fiscalDateEnding": "2020-01-31", + "reportedDate": "2020-03-26", + "reportedEPS": "1.27", + "estimatedEPS": "0.7869", + "surprise": "0.4831", + "surprisePercentage": "61.3928" + }, + { + "fiscalDateEnding": "2019-10-31", + "reportedDate": "2019-12-10", + "reportedEPS": "-0.49", + "estimatedEPS": "0.1716", + "surprise": "-0.6616", + "surprisePercentage": "-385.5478" + }, + { + "fiscalDateEnding": "2019-07-31", + "reportedDate": "2019-09-10", + "reportedEPS": "-0.32", + "estimatedEPS": "-0.2153", + "surprise": "-0.1047", + "surprisePercentage": "-48.6298" + }, + { + "fiscalDateEnding": "2019-04-30", + "reportedDate": "2019-06-04", + "reportedEPS": "0.07", + "estimatedEPS": "-0.0284", + "surprise": "0.0984", + "surprisePercentage": "346.4789" + }, + { + "fiscalDateEnding": "2019-01-31", + "reportedDate": "2019-04-02", + "reportedEPS": "1.6", + "estimatedEPS": "1.579", + "surprise": "0.021", + "surprisePercentage": "1.33" + }, + { + "fiscalDateEnding": "2018-10-31", + "reportedDate": "2018-11-29", + "reportedEPS": "0.67", + "estimatedEPS": "0.563", + "surprise": "0.107", + "surprisePercentage": "19.0053" + }, + { + "fiscalDateEnding": "2018-07-31", + "reportedDate": "2018-09-06", + "reportedEPS": "0.05", + "estimatedEPS": "0.074", + "surprise": "-0.024", + "surprisePercentage": "-32.4324" + }, + { + "fiscalDateEnding": "2018-04-30", + "reportedDate": "2018-05-31", + "reportedEPS": "0.38", + "estimatedEPS": "0.367", + "surprise": "0.013", + "surprisePercentage": "3.5422" + }, + { + "fiscalDateEnding": "2018-01-31", + "reportedDate": "2018-03-28", + "reportedEPS": "2.02", + "estimatedEPS": "1.96", + "surprise": "0.06", + "surprisePercentage": "3.0612" + }, + { + "fiscalDateEnding": "2017-10-31", + "reportedDate": "2017-11-21", + "reportedEPS": "0.54", + "estimatedEPS": "0.433", + "surprise": "0.107", + "surprisePercentage": "24.7113" + }, + { + "fiscalDateEnding": "2017-07-31", + "reportedDate": "2017-08-24", + "reportedEPS": "0.15", + "estimatedEPS": "0.1608", + "surprise": "-0.0108", + "surprisePercentage": "-6.7164" + }, + { + "fiscalDateEnding": "2017-04-30", + "reportedDate": "2017-05-25", + "reportedEPS": "0.63", + "estimatedEPS": "0.5055", + "surprise": "0.1245", + "surprisePercentage": "24.6291" + }, + { + "fiscalDateEnding": "2017-01-31", + "reportedDate": "2017-03-23", + "reportedEPS": "2.38", + "estimatedEPS": "2.2853", + "surprise": "0.0947", + "surprisePercentage": "4.1439" + }, + { + "fiscalDateEnding": "2016-10-31", + "reportedDate": "2016-11-22", + "reportedEPS": "0.49", + "estimatedEPS": "0.4691", + "surprise": "0.0209", + "surprisePercentage": "4.4553" + }, + { + "fiscalDateEnding": "2016-07-31", + "reportedDate": "2016-08-25", + "reportedEPS": "0.27", + "estimatedEPS": "0.2747", + "surprise": "-0.0047", + "surprisePercentage": "-1.711" + }, + { + "fiscalDateEnding": "2016-04-30", + "reportedDate": "2016-05-26", + "reportedEPS": "0.66", + "estimatedEPS": "0.6071", + "surprise": "0.0529", + "surprisePercentage": "8.7136" + }, + { + "fiscalDateEnding": "2016-01-31", + "reportedDate": "2016-03-24", + "reportedEPS": "2.4", + "estimatedEPS": "2.25", + "surprise": "0.15", + "surprisePercentage": "6.6667" + }, + { + "fiscalDateEnding": "2015-10-31", + "reportedDate": "2015-11-23", + "reportedEPS": "0.54", + "estimatedEPS": "0.59", + "surprise": "-0.05", + "surprisePercentage": "-8.4746" + }, + { + "fiscalDateEnding": "2015-07-31", + "reportedDate": "2015-08-27", + "reportedEPS": "0.31", + "estimatedEPS": "0.25", + "surprise": "0.06", + "surprisePercentage": "24" + }, + { + "fiscalDateEnding": "2015-04-30", + "reportedDate": "2015-05-28", + "reportedEPS": "0.68", + "estimatedEPS": "0.59", + "surprise": "0.09", + "surprisePercentage": "15.2542" + }, + { + "fiscalDateEnding": "2015-01-31", + "reportedDate": "2015-03-26", + "reportedEPS": "2.15", + "estimatedEPS": "2.17", + "surprise": "-0.02", + "surprisePercentage": "-0.9217" + }, + { + "fiscalDateEnding": "2014-10-31", + "reportedDate": "2014-11-20", + "reportedEPS": "0.57", + "estimatedEPS": "0.61", + "surprise": "-0.04", + "surprisePercentage": "-6.5574" + }, + { + "fiscalDateEnding": "2014-07-31", + "reportedDate": "2014-08-21", + "reportedEPS": "0.22", + "estimatedEPS": "0.18", + "surprise": "0.04", + "surprisePercentage": "22.2222" + }, + { + "fiscalDateEnding": "2014-04-30", + "reportedDate": "2014-05-22", + "reportedEPS": "0.59", + "estimatedEPS": "0.57", + "surprise": "0.02", + "surprisePercentage": "3.5088" + }, + { + "fiscalDateEnding": "2014-01-31", + "reportedDate": "2014-03-27", + "reportedEPS": "1.9", + "estimatedEPS": "1.92", + "surprise": "-0.02", + "surprisePercentage": "-1.0417" + }, + { + "fiscalDateEnding": "2013-10-31", + "reportedDate": "2013-11-21", + "reportedEPS": "0.58", + "estimatedEPS": "0.57", + "surprise": "0.01", + "surprisePercentage": "1.7544" + }, + { + "fiscalDateEnding": "2013-07-31", + "reportedDate": "2013-08-22", + "reportedEPS": "0.09", + "estimatedEPS": "0.04", + "surprise": "0.05", + "surprisePercentage": "125" + }, + { + "fiscalDateEnding": "2013-04-30", + "reportedDate": "2013-05-23", + "reportedEPS": "0.46", + "estimatedEPS": "0.4", + "surprise": "0.06", + "surprisePercentage": "15" + }, + { + "fiscalDateEnding": "2013-01-31", + "reportedDate": "2013-03-28", + "reportedEPS": "2.16", + "estimatedEPS": "2.09", + "surprise": "0.07", + "surprisePercentage": "3.3493" + }, + { + "fiscalDateEnding": "2012-10-31", + "reportedDate": "2012-11-15", + "reportedEPS": "0.38", + "estimatedEPS": "0.32", + "surprise": "0.06", + "surprisePercentage": "18.75" + }, + { + "fiscalDateEnding": "2012-07-31", + "reportedDate": "2012-08-16", + "reportedEPS": "0.16", + "estimatedEPS": "0.15", + "surprise": "0.01", + "surprisePercentage": "6.6667" + }, + { + "fiscalDateEnding": "2012-04-30", + "reportedDate": "2012-05-17", + "reportedEPS": "0.54", + "estimatedEPS": "0.54", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2012-01-31", + "reportedDate": "2012-03-22", + "reportedEPS": "1.73", + "estimatedEPS": "1.73", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2011-10-31", + "reportedDate": "2011-11-17", + "reportedEPS": "0.39", + "estimatedEPS": "0.39", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2011-07-31", + "reportedDate": "2011-08-18", + "reportedEPS": "0.22", + "estimatedEPS": "0.21", + "surprise": "0.01", + "surprisePercentage": "4.7619" + }, + { + "fiscalDateEnding": "2011-04-30", + "reportedDate": "2011-05-19", + "reportedEPS": "0.56", + "estimatedEPS": "0.54", + "surprise": "0.02", + "surprisePercentage": "3.7037" + }, + { + "fiscalDateEnding": "2011-01-31", + "reportedDate": "2011-03-24", + "reportedEPS": "1.56", + "estimatedEPS": "1.55", + "surprise": "0.01", + "surprisePercentage": "0.6452" + }, + { + "fiscalDateEnding": "2010-10-31", + "reportedDate": "2010-11-18", + "reportedEPS": "0.38", + "estimatedEPS": "0.37", + "surprise": "0.01", + "surprisePercentage": "2.7027" + }, + { + "fiscalDateEnding": "2010-07-31", + "reportedDate": "2010-08-19", + "reportedEPS": "0.26", + "estimatedEPS": "0.27", + "surprise": "-0.01", + "surprisePercentage": "-3.7037" + }, + { + "fiscalDateEnding": "2010-04-30", + "reportedDate": "2010-05-20", + "reportedEPS": "0.48", + "estimatedEPS": "0.47", + "surprise": "0.01", + "surprisePercentage": "2.1277" + }, + { + "fiscalDateEnding": "2010-01-31", + "reportedDate": "2010-03-18", + "reportedEPS": "1.29", + "estimatedEPS": "1.27", + "surprise": "0.02", + "surprisePercentage": "1.5748" + }, + { + "fiscalDateEnding": "2009-10-31", + "reportedDate": "2009-11-19", + "reportedEPS": "0.32", + "estimatedEPS": "0.3", + "surprise": "0.02", + "surprisePercentage": "6.6667" + }, + { + "fiscalDateEnding": "2009-07-31", + "reportedDate": "2009-08-20", + "reportedEPS": "0.23", + "estimatedEPS": "0.28", + "surprise": "-0.05", + "surprisePercentage": "-17.8571" + }, + { + "fiscalDateEnding": "2009-04-30", + "reportedDate": "2009-05-21", + "reportedEPS": "0.43", + "estimatedEPS": "0.42", + "surprise": "0.01", + "surprisePercentage": "2.381" + }, + { + "fiscalDateEnding": "2009-01-31", + "reportedDate": "2009-03-26", + "reportedEPS": "1.34", + "estimatedEPS": "1.34", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2008-10-31", + "reportedDate": "2008-11-20", + "reportedEPS": "0.34", + "estimatedEPS": "0.37", + "surprise": "-0.03", + "surprisePercentage": "-8.1081" + }, + { + "fiscalDateEnding": "2008-07-31", + "reportedDate": "2008-08-21", + "reportedEPS": "0.34", + "estimatedEPS": "0.28", + "surprise": "0.06", + "surprisePercentage": "21.4286" + }, + { + "fiscalDateEnding": "2008-04-30", + "reportedDate": "2008-05-22", + "reportedEPS": "0.38", + "estimatedEPS": "0.35", + "surprise": "0.03", + "surprisePercentage": "8.5714" + }, + { + "fiscalDateEnding": "2008-01-31", + "reportedDate": "2008-03-18", + "reportedEPS": "1.14", + "estimatedEPS": "1.12", + "surprise": "0.02", + "surprisePercentage": "1.7857" + }, + { + "fiscalDateEnding": "2007-10-31", + "reportedDate": "2007-11-20", + "reportedEPS": "0.33", + "estimatedEPS": "0.23", + "surprise": "0.1", + "surprisePercentage": "43.4783" + }, + { + "fiscalDateEnding": "2007-07-31", + "reportedDate": "2007-08-23", + "reportedEPS": "0.14", + "estimatedEPS": "0.09", + "surprise": "0.05", + "surprisePercentage": "55.5556" + }, + { + "fiscalDateEnding": "2007-04-30", + "reportedDate": "2007-05-23", + "reportedEPS": "0.18", + "estimatedEPS": "0.16", + "surprise": "0.02", + "surprisePercentage": "12.5" + }, + { + "fiscalDateEnding": "2007-01-31", + "reportedDate": "2007-03-27", + "reportedEPS": "0.82", + "estimatedEPS": "0.8", + "surprise": "0.02", + "surprisePercentage": "2.5" + }, + { + "fiscalDateEnding": "2006-10-31", + "reportedDate": "2006-11-21", + "reportedEPS": "0.11", + "estimatedEPS": "0.11", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2006-07-31", + "reportedDate": "2006-08-17", + "reportedEPS": "0.03", + "estimatedEPS": "0.03", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2006-04-30", + "reportedDate": "2006-05-18", + "reportedEPS": "0.08", + "estimatedEPS": "0.03", + "surprise": "0.05", + "surprisePercentage": "166.6667" + }, + { + "fiscalDateEnding": "2006-01-31", + "reportedDate": "2006-03-21", + "reportedEPS": "0.55", + "estimatedEPS": "0.54", + "surprise": "0.01", + "surprisePercentage": "1.8519" + }, + { + "fiscalDateEnding": "2005-10-31", + "reportedDate": "2005-11-29", + "reportedEPS": "0.08", + "estimatedEPS": "0.07", + "surprise": "0.01", + "surprisePercentage": "14.2857" + }, + { + "fiscalDateEnding": "2005-07-31", + "reportedDate": "2005-08-18", + "reportedEPS": "0.07", + "estimatedEPS": "0.08", + "surprise": "-0.01", + "surprisePercentage": "-12.5" + }, + { + "fiscalDateEnding": "2005-04-30", + "reportedDate": "2005-05-24", + "reportedEPS": "0.1", + "estimatedEPS": "0.08", + "surprise": "0.02", + "surprisePercentage": "25" + }, + { + "fiscalDateEnding": "2005-01-31", + "reportedDate": "2005-03-23", + "reportedEPS": "0.35", + "estimatedEPS": "0.35", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2004-10-31", + "reportedDate": "2004-11-15", + "reportedEPS": "0.12", + "estimatedEPS": "0.12", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2004-07-31", + "reportedDate": "2004-08-17", + "reportedEPS": "0.07", + "estimatedEPS": "0.06", + "surprise": "0.01", + "surprisePercentage": "16.6667" + }, + { + "fiscalDateEnding": "2004-04-30", + "reportedDate": "2004-05-18", + "reportedEPS": "0.07", + "estimatedEPS": "0.07", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2004-01-31", + "reportedDate": "2004-03-17", + "reportedEPS": "0.34", + "estimatedEPS": "0.34", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2003-10-31", + "reportedDate": "2003-11-19", + "reportedEPS": "0.09", + "estimatedEPS": "0.09", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2003-07-31", + "reportedDate": "2003-08-18", + "reportedEPS": "0.06", + "estimatedEPS": "0.05", + "surprise": "0.01", + "surprisePercentage": "20" + }, + { + "fiscalDateEnding": "2003-04-30", + "reportedDate": "2003-05-21", + "reportedEPS": "0.06", + "estimatedEPS": "0.05", + "surprise": "0.01", + "surprisePercentage": "20" + }, + { + "fiscalDateEnding": "2003-01-31", + "reportedDate": "2003-03-19", + "reportedEPS": "0.26", + "estimatedEPS": "0.26", + "surprise": "0", + "surprisePercentage": "0" + }, + { + "fiscalDateEnding": "2002-10-31", + "reportedDate": "2002-11-18", + "reportedEPS": "0.08", + "estimatedEPS": "0.07", + "surprise": "0.01", + "surprisePercentage": "14.2857" + }, + { + "fiscalDateEnding": "2002-07-31", + "reportedDate": "2002-08-19", + "reportedEPS": "0.05", + "estimatedEPS": "0.03", + "surprise": "0.02", + "surprisePercentage": "66.6667" + }, + { + "fiscalDateEnding": "2002-04-30", + "reportedDate": "2002-05-20", + "reportedEPS": "0.05", + "estimatedEPS": "0.03", + "surprise": "0.02", + "surprisePercentage": "66.6667" + }, + { + "fiscalDateEnding": "2002-01-31", + "reportedDate": "2002-03-12", + "reportedEPS": "0.1654", + "estimatedEPS": "None", + "surprise": "None", + "surprisePercentage": "None" + } + ] +} diff --git a/tests/data/json/fa_av_income.json b/tests/data/json/fa_av_income.json new file mode 100644 index 00000000000..967f1f44764 --- /dev/null +++ b/tests/data/json/fa_av_income.json @@ -0,0 +1,707 @@ +{ + "symbol": "GME", + "annualReports": [ + { + "fiscalDateEnding": "2021-01-30", + "reportedCurrency": "USD", + "grossProfit": "1259500000", + "totalRevenue": "5089800000", + "costOfRevenue": "3830300000", + "costofGoodsAndServicesSold": "3830300000", + "operatingIncome": "-237800000", + "sellingGeneralAndAdministrative": "1514200000", + "researchAndDevelopment": "None", + "operatingExpenses": "1577300000", + "investmentIncomeNet": "1900000", + "netInterestIncome": "-34000000", + "interestIncome": "1900000", + "interestExpense": "34000000", + "nonInterestIncome": "5117100000", + "otherNonOperatingIncome": "None", + "depreciation": "76800000", + "depreciationAndAmortization": "80000000", + "incomeBeforeTax": "-270600000", + "incomeTaxExpense": "-55300000", + "interestAndDebtExpense": "34000000", + "netIncomeFromContinuingOperations": "-214600000", + "comprehensiveIncomeNetOfTax": "-185800000", + "ebit": "-236600000", + "ebitda": "-156600000", + "netIncome": "-215300000" + }, + { + "fiscalDateEnding": "2020-02-01", + "reportedCurrency": "USD", + "grossProfit": "1908700000", + "totalRevenue": "6466000000", + "costOfRevenue": "4557300000", + "costofGoodsAndServicesSold": "4557300000", + "operatingIncome": "-399600000", + "sellingGeneralAndAdministrative": "1922700000", + "researchAndDevelopment": "None", + "operatingExpenses": "2403500000", + "investmentIncomeNet": "11300000", + "netInterestIncome": "-38500000", + "interestIncome": "11300000", + "interestExpense": "38500000", + "nonInterestIncome": "6455000000", + "otherNonOperatingIncome": "11300000", + "depreciation": "90800000", + "depreciationAndAmortization": "95200000", + "incomeBeforeTax": "-433300000", + "incomeTaxExpense": "37600000", + "interestAndDebtExpense": "38500000", + "netIncomeFromContinuingOperations": "-464400000", + "comprehensiveIncomeNetOfTax": "-495400000", + "ebit": "-394800000", + "ebitda": "-299600000", + "netIncome": "-470900000" + }, + { + "fiscalDateEnding": "2019-02-02", + "reportedCurrency": "USD", + "grossProfit": "2308100000", + "totalRevenue": "8285300000", + "costOfRevenue": "5977200000", + "costofGoodsAndServicesSold": "5977200000", + "operatingIncome": "-702000000", + "sellingGeneralAndAdministrative": "1994200000", + "researchAndDevelopment": "None", + "operatingExpenses": "3016900000", + "investmentIncomeNet": "5700000", + "netInterestIncome": "-56800000", + "interestIncome": "5700000", + "interestExpense": "56800000", + "nonInterestIncome": "8384100000", + "otherNonOperatingIncome": "5700000", + "depreciation": "96700000", + "depreciationAndAmortization": "105600000", + "incomeBeforeTax": "-631300000", + "incomeTaxExpense": "41700000", + "interestAndDebtExpense": "56800000", + "netIncomeFromContinuingOperations": "-794800000", + "comprehensiveIncomeNetOfTax": "-739500000", + "ebit": "-574500000", + "ebitda": "-468900000", + "netIncome": "-673000000" + }, + { + "fiscalDateEnding": "2018-02-03", + "reportedCurrency": "USD", + "grossProfit": "2484900000", + "totalRevenue": "8547100000", + "costOfRevenue": "6062200000", + "costofGoodsAndServicesSold": "6121300000", + "operatingIncome": "439200000", + "sellingGeneralAndAdministrative": "2031900000", + "researchAndDevelopment": "None", + "operatingExpenses": "2429100000", + "investmentIncomeNet": "1500000", + "netInterestIncome": "-56800000", + "interestIncome": "1500000", + "interestExpense": "56800000", + "nonInterestIncome": "8545000000", + "otherNonOperatingIncome": "1500000", + "depreciation": "110100000", + "depreciationAndAmortization": "122300000", + "incomeBeforeTax": "188200000", + "incomeTaxExpense": "153500000", + "interestAndDebtExpense": "56800000", + "netIncomeFromContinuingOperations": "230400000", + "comprehensiveIncomeNetOfTax": "94200000", + "ebit": "245000000", + "ebitda": "367300000", + "netIncome": "34700000" + }, + { + "fiscalDateEnding": "2017-01-28", + "reportedCurrency": "USD", + "grossProfit": "2499900000", + "totalRevenue": "8543700000", + "costOfRevenue": "8050200000", + "costofGoodsAndServicesSold": "5598600000", + "operatingIncome": "481700000", + "sellingGeneralAndAdministrative": "1861900000", + "researchAndDevelopment": "None", + "operatingExpenses": "2462000000", + "investmentIncomeNet": "800000", + "netInterestIncome": "-53800000", + "interestIncome": "-53000000", + "interestExpense": "53800000", + "nonInterestIncome": "-10400000", + "otherNonOperatingIncome": "800000", + "depreciation": "123300000", + "depreciationAndAmortization": "136700000", + "incomeBeforeTax": "477400000", + "incomeTaxExpense": "124200000", + "interestAndDebtExpense": "53800000", + "netIncomeFromContinuingOperations": "304500000", + "comprehensiveIncomeNetOfTax": "394700000", + "ebit": "531200000", + "ebitda": "667900000", + "netIncome": "353200000" + } + ], + "quarterlyReports": [ + { + "fiscalDateEnding": "2021-05-01", + "reportedCurrency": "USD", + "grossProfit": "330100000", + "totalRevenue": "1276800000", + "costOfRevenue": "946700000", + "costofGoodsAndServicesSold": "946700000", + "operatingIncome": "-40800000", + "sellingGeneralAndAdministrative": "370300000", + "researchAndDevelopment": "None", + "operatingExpenses": "390000000", + "investmentIncomeNet": "100000", + "netInterestIncome": "-24800000", + "interestIncome": "100000", + "interestExpense": "24800000", + "nonInterestIncome": "1258200000", + "otherNonOperatingIncome": "100000", + "depreciation": "None", + "depreciationAndAmortization": "18700000", + "incomeBeforeTax": "-65500000", + "incomeTaxExpense": "1300000", + "interestAndDebtExpense": "43000000", + "netIncomeFromContinuingOperations": "-66800000", + "comprehensiveIncomeNetOfTax": "-64700000", + "ebit": "-40700000", + "ebitda": "-22000000", + "netIncome": "-66800000" + }, + { + "fiscalDateEnding": "2021-01-30", + "reportedCurrency": "USD", + "grossProfit": "448600000", + "totalRevenue": "2122100000", + "costOfRevenue": "1673500000", + "costofGoodsAndServicesSold": "1673500000", + "operatingIncome": "18800000", + "sellingGeneralAndAdministrative": "419100000", + "researchAndDevelopment": "None", + "operatingExpenses": "448700000", + "investmentIncomeNet": "300000", + "netInterestIncome": "-8500000", + "interestIncome": "300000", + "interestExpense": "8500000", + "nonInterestIncome": "2118800000", + "otherNonOperatingIncome": "None", + "depreciation": "None", + "depreciationAndAmortization": "18900000", + "incomeBeforeTax": "10800000", + "incomeTaxExpense": "-69700000", + "interestAndDebtExpense": "8500000", + "netIncomeFromContinuingOperations": "80300000", + "comprehensiveIncomeNetOfTax": "98600000", + "ebit": "19300000", + "ebitda": "38200000", + "netIncome": "80500000" + }, + { + "fiscalDateEnding": "2020-10-31", + "reportedCurrency": "USD", + "grossProfit": "276300000", + "totalRevenue": "1004700000", + "costOfRevenue": "728400000", + "costofGoodsAndServicesSold": "728400000", + "operatingIncome": "-63000000", + "sellingGeneralAndAdministrative": "360400000", + "researchAndDevelopment": "None", + "operatingExpenses": "339300000", + "investmentIncomeNet": "300000", + "netInterestIncome": "-10000000", + "interestIncome": "-7500000", + "interestExpense": "10000000", + "nonInterestIncome": "1004700000", + "otherNonOperatingIncome": "300000", + "depreciation": "None", + "depreciationAndAmortization": "19400000", + "incomeBeforeTax": "-72700000", + "incomeTaxExpense": "-53900000", + "interestAndDebtExpense": "10000000", + "netIncomeFromContinuingOperations": "-18800000", + "comprehensiveIncomeNetOfTax": "-22300000", + "ebit": "-62700000", + "ebitda": "-64700000", + "netIncome": "-18800000" + }, + { + "fiscalDateEnding": "2020-08-01", + "reportedCurrency": "USD", + "grossProfit": "252200000", + "totalRevenue": "942000000", + "costOfRevenue": "689800000", + "costofGoodsAndServicesSold": "689800000", + "operatingIncome": "-85600000", + "sellingGeneralAndAdministrative": "348200000", + "researchAndDevelopment": "None", + "operatingExpenses": "337800000", + "investmentIncomeNet": "None", + "netInterestIncome": "-7500000", + "interestIncome": "400000", + "interestExpense": "7900000", + "nonInterestIncome": "None", + "otherNonOperatingIncome": "None", + "depreciation": "None", + "depreciationAndAmortization": "20200000", + "incomeBeforeTax": "-93400000", + "incomeTaxExpense": "17900000", + "interestAndDebtExpense": "None", + "netIncomeFromContinuingOperations": "-111000000", + "comprehensiveIncomeNetOfTax": "-84300000", + "ebit": "-85500000", + "ebitda": "-65400000", + "netIncome": "-111300000" + }, + { + "fiscalDateEnding": "2020-05-02", + "reportedCurrency": "USD", + "grossProfit": "282400000", + "totalRevenue": "1021000000", + "costOfRevenue": "738600000", + "costofGoodsAndServicesSold": "738600000", + "operatingIncome": "-108000000", + "sellingGeneralAndAdministrative": "386500000", + "researchAndDevelopment": "None", + "operatingExpenses": "412200000", + "investmentIncomeNet": "900000", + "netInterestIncome": "-7600000", + "interestIncome": "900000", + "interestExpense": "7600000", + "nonInterestIncome": "1021400000", + "otherNonOperatingIncome": "900000", + "depreciation": "None", + "depreciationAndAmortization": "21500000", + "incomeBeforeTax": "-115300000", + "incomeTaxExpense": "50400000", + "interestAndDebtExpense": "6900000", + "netIncomeFromContinuingOperations": "-165100000", + "comprehensiveIncomeNetOfTax": "-177800000", + "ebit": "-107700000", + "ebitda": "-86200000", + "netIncome": "-165700000" + }, + { + "fiscalDateEnding": "2020-02-01", + "reportedCurrency": "USD", + "grossProfit": "597300000", + "totalRevenue": "2194100000", + "costOfRevenue": "1596800000", + "costofGoodsAndServicesSold": "1596800000", + "operatingIncome": "75200000", + "sellingGeneralAndAdministrative": "511700000", + "researchAndDevelopment": "None", + "operatingExpenses": "10400000", + "investmentIncomeNet": "1400000", + "netInterestIncome": "-7900000", + "interestIncome": "900000", + "interestExpense": "7900000", + "nonInterestIncome": "2186300000", + "otherNonOperatingIncome": "1400000", + "depreciation": "None", + "depreciationAndAmortization": "25900000", + "incomeBeforeTax": "64800000", + "incomeTaxExpense": "43800000", + "interestAndDebtExpense": "7900000", + "netIncomeFromContinuingOperations": "24900000", + "comprehensiveIncomeNetOfTax": "13700000", + "ebit": "72700000", + "ebitda": "98600000", + "netIncome": "21000000" + }, + { + "fiscalDateEnding": "2019-11-02", + "reportedCurrency": "USD", + "grossProfit": "441100000", + "totalRevenue": "1438500000", + "costOfRevenue": "997400000", + "costofGoodsAndServicesSold": "997400000", + "operatingIncome": "-45600000", + "sellingGeneralAndAdministrative": "475400000", + "researchAndDevelopment": "None", + "operatingExpenses": "11300000", + "investmentIncomeNet": "2000000", + "netInterestIncome": "-8000000", + "interestIncome": "1400000", + "interestExpense": "8000000", + "nonInterestIncome": "1438500000", + "otherNonOperatingIncome": "2000000", + "depreciation": "None", + "depreciationAndAmortization": "23600000", + "incomeBeforeTax": "-51800000", + "incomeTaxExpense": "31600000", + "interestAndDebtExpense": "8000000", + "netIncomeFromContinuingOperations": "-83200000", + "comprehensiveIncomeNetOfTax": "-79800000", + "ebit": "-43800000", + "ebitda": "-20200000", + "netIncome": "-83400000" + }, + { + "fiscalDateEnding": "2019-08-03", + "reportedCurrency": "USD", + "grossProfit": "399100000", + "totalRevenue": "1285700000", + "costOfRevenue": "886600000", + "costofGoodsAndServicesSold": "886600000", + "operatingIncome": "-446700000", + "sellingGeneralAndAdministrative": "481900000", + "researchAndDevelopment": "None", + "operatingExpenses": "363900000", + "investmentIncomeNet": "2600000", + "netInterestIncome": "-9600000", + "interestIncome": "-7000000", + "interestExpense": "9600000", + "nonInterestIncome": "1285700000", + "otherNonOperatingIncome": "2600000", + "depreciation": "None", + "depreciationAndAmortization": "22600000", + "incomeBeforeTax": "-455400000", + "incomeTaxExpense": "-40100000", + "interestAndDebtExpense": "9600000", + "netIncomeFromContinuingOperations": "-413600000", + "comprehensiveIncomeNetOfTax": "-422200000", + "ebit": "-445800000", + "ebitda": "-423200000", + "netIncome": "-415300000" + }, + { + "fiscalDateEnding": "2019-05-04", + "reportedCurrency": "USD", + "grossProfit": "471200000", + "totalRevenue": "1547700000", + "costOfRevenue": "1076500000", + "costofGoodsAndServicesSold": "9600000", + "operatingIncome": "17500000", + "sellingGeneralAndAdministrative": "453700000", + "researchAndDevelopment": "None", + "operatingExpenses": "477700000", + "investmentIncomeNet": "5300000", + "netInterestIncome": "-13000000", + "interestIncome": "2600000", + "interestExpense": "13000000", + "nonInterestIncome": "1547000000", + "otherNonOperatingIncome": "5300000", + "depreciation": "None", + "depreciationAndAmortization": "23100000", + "incomeBeforeTax": "9100000", + "incomeTaxExpense": "2300000", + "interestAndDebtExpense": "13000000", + "netIncomeFromContinuingOperations": "7500000", + "comprehensiveIncomeNetOfTax": "-7100000", + "ebit": "22100000", + "ebitda": "45200000", + "netIncome": "6800000" + }, + { + "fiscalDateEnding": "2019-02-02", + "reportedCurrency": "USD", + "grossProfit": "748800000", + "totalRevenue": "3063000000", + "costOfRevenue": "2314200000", + "costofGoodsAndServicesSold": "2256300000", + "operatingIncome": "-232100000", + "sellingGeneralAndAdministrative": "633000000", + "researchAndDevelopment": "None", + "operatingExpenses": "428400000", + "investmentIncomeNet": "3600000", + "netInterestIncome": "-14100000", + "interestIncome": "None", + "interestExpense": "14100000", + "nonInterestIncome": "3163200000", + "otherNonOperatingIncome": "3600000", + "depreciation": "None", + "depreciationAndAmortization": "25100000", + "incomeBeforeTax": "-161800000", + "incomeTaxExpense": "25900000", + "interestAndDebtExpense": "14100000", + "netIncomeFromContinuingOperations": "-268500000", + "comprehensiveIncomeNetOfTax": "-188000000", + "ebit": "-147700000", + "ebitda": "-122600000", + "netIncome": "-187700000" + }, + { + "fiscalDateEnding": "2018-11-03", + "reportedCurrency": "USD", + "grossProfit": "558200000", + "totalRevenue": "1935400000", + "costOfRevenue": "1377200000", + "costofGoodsAndServicesSold": "16800000", + "operatingIncome": "-517900000", + "sellingGeneralAndAdministrative": "463600000", + "researchAndDevelopment": "None", + "operatingExpenses": "587500000", + "investmentIncomeNet": "1100000", + "netInterestIncome": "-14100000", + "interestIncome": "None", + "interestExpense": "14100000", + "nonInterestIncome": "1935400000", + "otherNonOperatingIncome": "1100000", + "depreciation": "None", + "depreciationAndAmortization": "25000000", + "incomeBeforeTax": "-512600000", + "incomeTaxExpense": "-24000000", + "interestAndDebtExpense": "14100000", + "netIncomeFromContinuingOperations": "-506900000", + "comprehensiveIncomeNetOfTax": "-502200000", + "ebit": "-498500000", + "ebitda": "-473500000", + "netIncome": "-488600000" + }, + { + "fiscalDateEnding": "2018-08-04", + "reportedCurrency": "USD", + "grossProfit": "470000000", + "totalRevenue": "1501100000", + "costOfRevenue": "1031100000", + "costofGoodsAndServicesSold": "9000000", + "operatingIncome": "1500000", + "sellingGeneralAndAdministrative": "441500000", + "researchAndDevelopment": "None", + "operatingExpenses": "468500000", + "investmentIncomeNet": "500000", + "netInterestIncome": "-14400000", + "interestIncome": "None", + "interestExpense": "14400000", + "nonInterestIncome": "1501100000", + "otherNonOperatingIncome": "500000", + "depreciation": "None", + "depreciationAndAmortization": "27000000", + "incomeBeforeTax": "2500000", + "incomeTaxExpense": "27400000", + "interestAndDebtExpense": "14400000", + "netIncomeFromContinuingOperations": "-39800000", + "comprehensiveIncomeNetOfTax": "-42300000", + "ebit": "16900000", + "ebitda": "43900000", + "netIncome": "-24900000" + }, + { + "fiscalDateEnding": "2018-05-05", + "reportedCurrency": "USD", + "grossProfit": "531100000", + "totalRevenue": "1785800000", + "costOfRevenue": "1254700000", + "costofGoodsAndServicesSold": "16600000", + "operatingIncome": "46500000", + "sellingGeneralAndAdministrative": "456100000", + "researchAndDevelopment": "None", + "operatingExpenses": "485000000", + "investmentIncomeNet": "500000", + "netInterestIncome": "-14200000", + "interestIncome": "None", + "interestExpense": "14200000", + "nonInterestIncome": "1785400000", + "otherNonOperatingIncome": "500000", + "depreciation": "None", + "depreciationAndAmortization": "28500000", + "incomeBeforeTax": "40600000", + "incomeTaxExpense": "12400000", + "interestAndDebtExpense": "14200000", + "netIncomeFromContinuingOperations": "20400000", + "comprehensiveIncomeNetOfTax": "-7000000", + "ebit": "54800000", + "ebitda": "83300000", + "netIncome": "28200000" + }, + { + "fiscalDateEnding": "2018-02-03", + "reportedCurrency": "USD", + "grossProfit": "864700000", + "totalRevenue": "2864000000", + "costOfRevenue": "572400000", + "costofGoodsAndServicesSold": "2414800000", + "operatingIncome": "251100000", + "sellingGeneralAndAdministrative": "360900000", + "researchAndDevelopment": "None", + "operatingExpenses": "13800000", + "investmentIncomeNet": "1100000", + "netInterestIncome": "-14200000", + "interestIncome": "None", + "interestExpense": "14200000", + "nonInterestIncome": "8541400000", + "otherNonOperatingIncome": "1100000", + "depreciation": "None", + "depreciationAndAmortization": "10000000", + "incomeBeforeTax": "-1900000", + "incomeTaxExpense": "104000000", + "interestAndDebtExpense": "14200000", + "netIncomeFromContinuingOperations": "116900000", + "comprehensiveIncomeNetOfTax": "-69400000", + "ebit": "12300000", + "ebitda": "22300000", + "netIncome": "-105900000" + }, + { + "fiscalDateEnding": "2017-10-28", + "reportedCurrency": "USD", + "grossProfit": "559800000", + "totalRevenue": "1974500000", + "costOfRevenue": "1901000000", + "costofGoodsAndServicesSold": "1299200000", + "operatingIncome": "71900000", + "sellingGeneralAndAdministrative": "565100000", + "researchAndDevelopment": "None", + "operatingExpenses": "601800000", + "investmentIncomeNet": "200000", + "netInterestIncome": "-14100000", + "interestIncome": "None", + "interestExpense": "14100000", + "nonInterestIncome": "1988600000", + "otherNonOperatingIncome": "200000", + "depreciation": "None", + "depreciationAndAmortization": "36700000", + "incomeBeforeTax": "73700000", + "incomeTaxExpense": "14300000", + "interestAndDebtExpense": "14100000", + "netIncomeFromContinuingOperations": "49700000", + "comprehensiveIncomeNetOfTax": "36200000", + "ebit": "87800000", + "ebitda": "124500000", + "netIncome": "59400000" + }, + { + "fiscalDateEnding": "2017-07-29", + "reportedCurrency": "USD", + "grossProfit": "493200000", + "totalRevenue": "1673200000", + "costOfRevenue": "1644000000", + "costofGoodsAndServicesSold": "1063900000", + "operatingIncome": "26900000", + "sellingGeneralAndAdministrative": "542400000", + "researchAndDevelopment": "None", + "operatingExpenses": "580100000", + "investmentIncomeNet": "0", + "netInterestIncome": "-14400000", + "interestIncome": "None", + "interestExpense": "14400000", + "nonInterestIncome": "1687600000", + "otherNonOperatingIncome": "None", + "depreciation": "None", + "depreciationAndAmortization": "37700000", + "incomeBeforeTax": "29200000", + "incomeTaxExpense": "7000000", + "interestAndDebtExpense": "14400000", + "netIncomeFromContinuingOperations": "12000000", + "comprehensiveIncomeNetOfTax": "76600000", + "ebit": "43600000", + "ebitda": "81300000", + "netIncome": "22200000" + }, + { + "fiscalDateEnding": "2017-04-29", + "reportedCurrency": "USD", + "grossProfit": "567200000", + "totalRevenue": "2029500000", + "costOfRevenue": "1944800000", + "costofGoodsAndServicesSold": "1343400000", + "operatingIncome": "89300000", + "sellingGeneralAndAdministrative": "563500000", + "researchAndDevelopment": "None", + "operatingExpenses": "603700000", + "investmentIncomeNet": "200000", + "netInterestIncome": "-14100000", + "interestIncome": "None", + "interestExpense": "14100000", + "nonInterestIncome": "-2300000", + "otherNonOperatingIncome": "200000", + "depreciation": "None", + "depreciationAndAmortization": "37900000", + "incomeBeforeTax": "87200000", + "incomeTaxExpense": "28200000", + "interestAndDebtExpense": "14100000", + "netIncomeFromContinuingOperations": "51800000", + "comprehensiveIncomeNetOfTax": "50800000", + "ebit": "101300000", + "ebitda": "139200000", + "netIncome": "59000000" + }, + { + "fiscalDateEnding": "2017-01-28", + "reportedCurrency": "USD", + "grossProfit": "1007900000", + "totalRevenue": "3045400000", + "costOfRevenue": "33800000", + "costofGoodsAndServicesSold": "2037500000", + "operatingIncome": "286600000", + "sellingGeneralAndAdministrative": "255600000", + "researchAndDevelopment": "None", + "operatingExpenses": "33800000", + "investmentIncomeNet": "300000", + "netInterestIncome": "-14100000", + "interestIncome": "None", + "interestExpense": "14100000", + "nonInterestIncome": "-5800000", + "otherNonOperatingIncome": "300000", + "depreciation": "None", + "depreciationAndAmortization": "12700000", + "incomeBeforeTax": "245500000", + "incomeTaxExpense": "36800000", + "interestAndDebtExpense": "14100000", + "netIncomeFromContinuingOperations": "160000000", + "comprehensiveIncomeNetOfTax": "207100000", + "ebit": "259600000", + "ebitda": "272300000", + "netIncome": "208700000" + }, + { + "fiscalDateEnding": "2016-10-29", + "reportedCurrency": "USD", + "grossProfit": "708200000", + "totalRevenue": "1944400000", + "costOfRevenue": "1860400000", + "costofGoodsAndServicesSold": "1251000000", + "operatingIncome": "98800000", + "sellingGeneralAndAdministrative": "567100000", + "researchAndDevelopment": "None", + "operatingExpenses": "609400000", + "investmentIncomeNet": "0", + "netInterestIncome": "-14800000", + "interestIncome": "None", + "interestExpense": "14800000", + "nonInterestIncome": "-700000", + "otherNonOperatingIncome": "None", + "depreciation": "None", + "depreciationAndAmortization": "42300000", + "incomeBeforeTax": "84000000", + "incomeTaxExpense": "33200000", + "interestAndDebtExpense": "14800000", + "netIncomeFromContinuingOperations": "50800000", + "comprehensiveIncomeNetOfTax": "43900000", + "ebit": "98800000", + "ebitda": "141100000", + "netIncome": "50800000" + }, + { + "fiscalDateEnding": "2016-07-30", + "reportedCurrency": "USD", + "grossProfit": "617700000", + "totalRevenue": "1617900000", + "costOfRevenue": "1573500000", + "costofGoodsAndServicesSold": "1014100000", + "operatingIncome": "58300000", + "sellingGeneralAndAdministrative": "518400000", + "researchAndDevelopment": "None", + "operatingExpenses": "559400000", + "investmentIncomeNet": "300000", + "netInterestIncome": "-13900000", + "interestIncome": "None", + "interestExpense": "13900000", + "nonInterestIncome": "-2000000", + "otherNonOperatingIncome": "300000", + "depreciation": "None", + "depreciationAndAmortization": "41000000", + "incomeBeforeTax": "44700000", + "incomeTaxExpense": "16800000", + "interestAndDebtExpense": "13900000", + "netIncomeFromContinuingOperations": "27900000", + "comprehensiveIncomeNetOfTax": "28700000", + "ebit": "58600000", + "ebitda": "99600000", + "netIncome": "27900000" + } + ] +} diff --git a/tests/data/json/fa_av_key.json b/tests/data/json/fa_av_key.json new file mode 100644 index 00000000000..f055f61f712 --- /dev/null +++ b/tests/data/json/fa_av_key.json @@ -0,0 +1,61 @@ +{ + "Symbol": "GME", + "AssetType": "Common Stock", + "Name": "GameStop Corp", + "Description": "GameStop Corp. The company is headquartered in Grapevine, Texas.", + "CIK": "1326380", + "Exchange": "NYSE", + "Currency": "USD", + "Country": "USA", + "Sector": "TRADE & SERVICES", + "Industry": "RETAIL-COMPUTER & COMPUTER SOFTWARE STORES", + "Address": "625 WESTPORT PARKWAY, GRAPEVINE, TX, US", + "FiscalYearEnd": "January", + "LatestQuarter": "2021-04-30", + "MarketCapitalization": "11292251000", + "EBITDA": "111300000", + "PERatio": "None", + "PEGRatio": "0.86", + "BookValue": "12.69", + "DividendPerShare": "0", + "DividendYield": "0", + "EPS": "-1.78", + "RevenuePerShareTTM": "81.77", + "ProfitMargin": "-0.0218", + "OperatingMarginTTM": "-0.0348", + "ReturnOnAssetsTTM": "-0.0462", + "ReturnOnEquityTTM": "-0.177", + "RevenueTTM": "5345600000", + "GrossProfitTTM": "1259500000", + "DilutedEPSTTM": "-1.78", + "QuarterlyEarningsGrowthYOY": "2.689", + "QuarterlyRevenueGrowthYOY": "0.251", + "AnalystTargetPrice": "88.33", + "TrailingPE": "0", + "ForwardPE": "36.76", + "PriceToSalesRatioTTM": "1.97", + "PriceToBookRatio": "13.63", + "EVToRevenue": "2.245", + "EVToEBITDA": "0", + "Beta": "-2.004", + "52WeekHigh": "483", + "52WeekLow": "4.06", + "50DayMovingAverage": "191.82", + "200DayMovingAverage": "170.24", + "SharesOutstanding": "74379000", + "SharesFloat": "56412000", + "SharesShort": "8075500", + "SharesShortPriorMonth": "9670700", + "ShortRatio": "1.89", + "ShortPercentOutstanding": "0.11", + "ShortPercentFloat": "0.143", + "PercentInsiders": "18.97", + "PercentInstitutions": "40.8", + "ForwardAnnualDividendRate": "0", + "ForwardAnnualDividendYield": "0", + "PayoutRatio": "0", + "DividendDate": "2019-03-29", + "ExDividendDate": "2019-03-14", + "LastSplitFactor": "2:1", + "LastSplitDate": "2007-03-19" +} diff --git a/tests/data/json/fa_av_overview.json b/tests/data/json/fa_av_overview.json new file mode 100644 index 00000000000..f055f61f712 --- /dev/null +++ b/tests/data/json/fa_av_overview.json @@ -0,0 +1,61 @@ +{ + "Symbol": "GME", + "AssetType": "Common Stock", + "Name": "GameStop Corp", + "Description": "GameStop Corp. The company is headquartered in Grapevine, Texas.", + "CIK": "1326380", + "Exchange": "NYSE", + "Currency": "USD", + "Country": "USA", + "Sector": "TRADE & SERVICES", + "Industry": "RETAIL-COMPUTER & COMPUTER SOFTWARE STORES", + "Address": "625 WESTPORT PARKWAY, GRAPEVINE, TX, US", + "FiscalYearEnd": "January", + "LatestQuarter": "2021-04-30", + "MarketCapitalization": "11292251000", + "EBITDA": "111300000", + "PERatio": "None", + "PEGRatio": "0.86", + "BookValue": "12.69", + "DividendPerShare": "0", + "DividendYield": "0", + "EPS": "-1.78", + "RevenuePerShareTTM": "81.77", + "ProfitMargin": "-0.0218", + "OperatingMarginTTM": "-0.0348", + "ReturnOnAssetsTTM": "-0.0462", + "ReturnOnEquityTTM": "-0.177", + "RevenueTTM": "5345600000", + "GrossProfitTTM": "1259500000", + "DilutedEPSTTM": "-1.78", + "QuarterlyEarningsGrowthYOY": "2.689", + "QuarterlyRevenueGrowthYOY": "0.251", + "AnalystTargetPrice": "88.33", + "TrailingPE": "0", + "ForwardPE": "36.76", + "PriceToSalesRatioTTM": "1.97", + "PriceToBookRatio": "13.63", + "EVToRevenue": "2.245", + "EVToEBITDA": "0", + "Beta": "-2.004", + "52WeekHigh": "483", + "52WeekLow": "4.06", + "50DayMovingAverage": "191.82", + "200DayMovingAverage": "170.24", + "SharesOutstanding": "74379000", + "SharesFloat": "56412000", + "SharesShort": "8075500", + "SharesShortPriorMonth": "9670700", + "ShortRatio": "1.89", + "ShortPercentOutstanding": "0.11", + "ShortPercentFloat": "0.143", + "PercentInsiders": "18.97", + "PercentInstitutions": "40.8", + "ForwardAnnualDividendRate": "0", + "ForwardAnnualDividendYield": "0", + "PayoutRatio": "0", + "DividendDate": "2019-03-29", + "ExDividendDate": "2019-03-14", + "LastSplitFactor": "2:1", + "LastSplitDate": "2007-03-19" +} diff --git a/tests/test_ba/__init__.py b/tests/test_ba/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_ba_finbrain_api.py b/tests/test_ba/test_ba_finbrain_api.py similarity index 78% rename from tests/test_ba_finbrain_api.py rename to tests/test_ba/test_ba_finbrain_api.py index 03893ac0166..de1c855a604 100644 --- a/tests/test_ba_finbrain_api.py +++ b/tests/test_ba/test_ba_finbrain_api.py @@ -1,10 +1,10 @@ """ behavioural_analysis/finbrain_view.py tests """ -import unittest +from unittest import TestCase # from gamestonk_terminal.behavioural_analysis.finbrain_view import sentiment_analysis -class TestBaFinbrainApi(unittest.TestCase): +class TestBaFinbrainApi(TestCase): def test_sentiment_analysis(self): # sentiment_analysis([], "TSLA") print("") diff --git a/tests/test_coingecko_crypto.py b/tests/test_coingecko_crypto.py deleted file mode 100644 index 0367a297669..00000000000 --- a/tests/test_coingecko_crypto.py +++ /dev/null @@ -1,54 +0,0 @@ -from unittest import mock, TestCase -import json -from pycoingecko import CoinGeckoAPI -from gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_view import load, ta -from gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_coin_model import Coin - -# pylint: disable=unused-import - - -class TestCoinGeckoAPI(TestCase): - @mock.patch( - "gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_view.CoinGeckoAPI.get_coin_market_chart_by_id" - ) - def test_coin_api_load(self, mock_load): - """ - Mock load function through get_coin_market_chart_by_id. - Mock returns a dict saved as .json - - """ - with open("tests/data/btc_usd_test_data.json") as f: - sample_return = json.load(f) - - mock_load.return_value = sample_return - coin = load(["-c", "bitcoin"]) - self.assertEqual(coin.coin_symbol, "bitcoin") - self.assertIsInstance(coin, Coin) - - @mock.patch( - "gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_view.CoinGeckoAPI.get_coin_market_chart_by_id" - ) - def test_coin_api_load_df_for_ta(self, mock_load): - """ - Mock load function through get_coin_market_chart_by_id. - Mock returns a dict saved as .json - - """ - - with open("tests/data/btc_usd_test_data.json") as f: - sample_return = json.load(f) - - mock_load.return_value = sample_return - coin = load(["-c", "bitcoin"]) - mock_return, vs = ta(coin, ["--vs", "usd"]) - self.assertTrue(mock_return.shape == (722, 2)) - self.assertTrue(vs == "usd") - - def test_coin(self): - """Test that pycoingecko retrieves the major coins""" - - coins = CoinGeckoAPI().get_coins() - coin_list = [coin["id"] for coin in coins] - test_coins = ["bitcoin", "ethereum", "dogecoin"] - for test in test_coins: - self.assertIn(test, coin_list) diff --git a/tests/test_cryptocurrency/__init__.py b/tests/test_cryptocurrency/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_cryptocurrency/test_coingecko_crypto.py b/tests/test_cryptocurrency/test_coingecko_crypto.py new file mode 100644 index 00000000000..729a130b0a7 --- /dev/null +++ b/tests/test_cryptocurrency/test_coingecko_crypto.py @@ -0,0 +1,391 @@ +from unittest import mock, TestCase +import json +import sys +import io + +from pycoingecko import CoinGeckoAPI +from gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_view import ( + load, + ta, + chart, + info, + web, + social, + dev, + ath, + atl, + score, + bc, + market, + holdings_overview, + holdings_companies_list, + gainers, + losers, + discover, + news, + categories, + recently_added, + stablecoins, + yfarms, + top_volume_coins, + top_defi_coins, + top_dex, + top_nft, + nft_of_the_day, + nft_market_status, + exchanges, + platforms, + products, + indexes, + derivatives, + exchange_rates, + global_market_info, + global_defi_info, + coin_list, + find, +) +from gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_coin_model import Coin + +# pylint: disable=unused-import + + +@mock.patch( + "gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_view.CoinGeckoAPI.get_coin_market_chart_by_id" +) +def get_bitcoin(mock_load): + # pylint: disable=unused-argument + with open("tests/data/btc_usd_test_data.json") as f: + sample_return = json.load(f) + mock_load.return_value = sample_return + return load(["-c", "bitcoin"]) + + +# pylint: disable=R0904 +class TestCoinGeckoAPI(TestCase): + # pylint: disable = no-value-for-parameter + coin = get_bitcoin() + + def test_coin_api_load(self): + """ + Mock load function through get_coin_market_chart_by_id. + Mock returns a dict saved as .json + + """ + self.assertEqual(self.coin.coin_symbol, "bitcoin") + self.assertIsInstance(self.coin, Coin) + + @mock.patch( + "gamestonk_terminal.cryptocurrency.coingecko.pycoingecko_view.CoinGeckoAPI.get_coin_market_chart_by_id" + ) + def test_coin_api_load_df_for_ta(self, mock_load): + """ + Mock load function through get_coin_market_chart_by_id. + Mock returns a dict saved as .json + """ + + with open("tests/data/btc_usd_test_data.json") as f: + sample_return = json.load(f) + + mock_load.return_value = sample_return + coin = load(["-c", "bitcoin"]) + mock_return, vs = ta(coin, ["--vs", "usd"]) + self.assertTrue(mock_return.shape == (722, 2)) + self.assertTrue(vs == "usd") + + def test_get_coins(self): + """Test that pycoingecko retrieves the major coins""" + coins = CoinGeckoAPI().get_coins() + bitcoin_list = [coin["id"] for coin in coins] + test_coins = ["bitcoin", "ethereum", "dogecoin"] + for test in test_coins: + self.assertIn(test, bitcoin_list) + + @mock.patch("matplotlib.pyplot.show") + def test_coin_chart(self, mock_matplot): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + chart(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertEqual("\n", capt) + + def test_coin_info(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + info(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("asset_platform_id", capt) + + def test_coin_web(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + web(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("homepage", capt) + + def test_coin_social(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + social(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("telegram", capt) + + def test_coin_dev(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + dev(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("forks", capt) + + def test_coin_ath(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + ath(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("ath_date_btc", capt) + + def test_coin_atl(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + atl(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("atl_date_btc", capt) + + def test_coin_score(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + score(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("twitter_followers", capt) + + def test_coin_bc(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + bc(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Metric", capt) + + def test_coin_market(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + market(self.coin, []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("max_supply", capt) + + def test_coin_holdings_overview(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + holdings_overview([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Total Bitcoin Holdings", capt) + + def test_coin_holdings_companies_list(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + holdings_companies_list([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("country", capt) + + def test_coin_gainers(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + gainers([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("rank", capt) + + def test_coin_losers(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + losers([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("rank", capt) + + def test_coin_discover(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + discover("trending", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("CryptoBlades", capt) + + def test_coin_news(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + news([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("author", capt) + + def test_coin_categories(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + categories([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Decentralized Finance", capt) + + def test_coin_recently_added(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + recently_added([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("rank", capt) + + def test_coin_stablecoins(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + stablecoins([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_yfarms(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + yfarms([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_top_volume_coins(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + top_volume_coins([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_top_defi_coins(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + top_defi_coins([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_top_dex(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + top_dex([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_top_nft(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + top_nft([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_nft_of_the_day(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + nft_of_the_day([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Metric", capt) + + def test_coin_nft_market_status(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + nft_market_status([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Metric", capt) + + def test_coin_exchanges(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + exchanges([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_platforms(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + platforms([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_products(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + products([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("platform", capt) + + def test_coin_indexes(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + indexes([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_derivatives(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + derivatives([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("price", capt) + + def test_coin_exchange_rates(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + exchange_rates([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_global_market_info(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + global_market_info([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Metric", capt) + + def test_coin_global_defi_info(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + global_defi_info([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_coin_list(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coin_list([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_coin_find(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + find(["-c", "bitcoin"]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) diff --git a/tests/test_cryptocurrency/test_coinpaprika_view.py b/tests/test_cryptocurrency/test_coinpaprika_view.py new file mode 100644 index 00000000000..652309dc107 --- /dev/null +++ b/tests/test_cryptocurrency/test_coinpaprika_view.py @@ -0,0 +1,154 @@ +from unittest import TestCase, mock +import sys +import io + +from gamestonk_terminal.cryptocurrency.coinpaprika import coinpaprika_view + + +class TestCoinPaprikaView(TestCase): + def test_global_markets(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.global_market([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("market_cap_usd", capt) + + def test_coins(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.coins([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("rank", capt) + + def test_all_coins_market_info(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.all_coins_market_info([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Displaying data vs USD", capt) + + def test_all_coins_info(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.all_coins_info([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Displaying data vs USD", capt) + + def test_all_exchanges(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.all_exchanges([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Displaying data vs USD", capt) + + def test_search(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.search(["-q", "bt"]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("category", capt) + + def test_all_platforms(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.all_platforms([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("platform_id", capt) + + def test_contracts(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.contracts([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("active", capt) + + def test_find(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.find(["-c", "BTC"]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("index", capt) + + def test_twitter(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.twitter("eth-ethereum", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Couldn't find", capt) + + def test_events(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.events("eth-ethereum", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("description", capt) + + def test_exchanges(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.exchanges("btc-bitcoin", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("name", capt) + + def test_markets(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.markets("eth-ethereum", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("exchange", capt) + + @mock.patch("matplotlib.pyplot.show") + def test_chart(self, mock_matplot): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.chart("btc-bitcoin", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("\n", capt) + + def test_exchange_markets(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.exchange_markets([]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("base_currency_name", capt) + + def price_supply(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.price_supply("btc", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("asset_platform_id", capt) + + def test_load(self): + value = coinpaprika_view.load(["-c", "BTC"]) + self.assertEqual(value, "btc-bitcoin") + + def test_ta(self): + value = coinpaprika_view.ta("eth-ethereum", []) + print(value[0]) + self.assertIn("Open", value[0]) + + def test_basic(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + coinpaprika_view.basic("BTC", []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Metric", capt) diff --git a/tests/test_dd/__init__.py b/tests/test_dd/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_dd_financial_modeling_prep_view.py b/tests/test_dd/test_dd_financial_modeling_prep_view.py similarity index 100% rename from tests/test_dd_financial_modeling_prep_view.py rename to tests/test_dd/test_dd_financial_modeling_prep_view.py diff --git a/tests/test_dd_finviz_view.py b/tests/test_dd/test_dd_finviz_view.py similarity index 100% rename from tests/test_dd_finviz_view.py rename to tests/test_dd/test_dd_finviz_view.py diff --git a/tests/test_discovery/__init__.py b/tests/test_discovery/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_discovery_ark_api.py b/tests/test_discovery/test_discovery_ark_api.py similarity index 100% rename from tests/test_discovery_ark_api.py rename to tests/test_discovery/test_discovery_ark_api.py diff --git a/tests/test_discovery_ark_model.py b/tests/test_discovery/test_discovery_ark_model.py similarity index 100% rename from tests/test_discovery_ark_model.py rename to tests/test_discovery/test_discovery_ark_model.py diff --git a/tests/test_discovery_ark_view.py b/tests/test_discovery/test_discovery_ark_view.py similarity index 100% rename from tests/test_discovery_ark_view.py rename to tests/test_discovery/test_discovery_ark_view.py diff --git a/tests/test_discovery_fidelity_api.py b/tests/test_discovery/test_discovery_fidelity_api.py similarity index 100% rename from tests/test_discovery_fidelity_api.py rename to tests/test_discovery/test_discovery_fidelity_api.py diff --git a/tests/test_discovery_fidelity_model.py b/tests/test_discovery/test_discovery_fidelity_model.py similarity index 100% rename from tests/test_discovery_fidelity_model.py rename to tests/test_discovery/test_discovery_fidelity_model.py diff --git a/tests/test_discovery_seeing_alpha_model.py b/tests/test_discovery/test_discovery_seeing_alpha_model.py similarity index 100% rename from tests/test_discovery_seeing_alpha_model.py rename to tests/test_discovery/test_discovery_seeing_alpha_model.py diff --git a/tests/test_discovery_short_interest_model.py b/tests/test_discovery/test_discovery_short_interest_model.py similarity index 100% rename from tests/test_discovery_short_interest_model.py rename to tests/test_discovery/test_discovery_short_interest_model.py diff --git a/tests/test_fa/__init__.py b/tests/test_fa/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_fa/test_fa_av_view.py b/tests/test_fa/test_fa_av_view.py new file mode 100644 index 00000000000..9bd6d2785c4 --- /dev/null +++ b/tests/test_fa/test_fa_av_view.py @@ -0,0 +1,135 @@ +""" fundamental_analysis/av_view.py tests """ +# Not testing these tests further. I do not have a fmp key +from contextlib import contextmanager +import unittest +from unittest import mock +import io +import sys +import json + +# pylint: disable=unused-import +from gamestonk_terminal.stocks.fundamental_analysis import av_view + +from gamestonk_terminal import config_terminal as cfg + + +@contextmanager +def replace_stdin(target): + orig = sys.stdin + sys.stdin = target + yield + sys.stdin = orig + + +def mocked_requests_get(*args, **kwargs): + # pylint: disable=unused-argument + class MockResponse: + def __init__(self, json_data, status_code): + self.json_data = json_data + self.status_code = status_code + + def json(self): + return self.json_data + + base = "https://www.alphavantage.co/query?function=" + if args[0] == f"{base}OVERVIEW&symbol=GME&apikey={cfg.API_KEY_ALPHAVANTAGE}": + with open("tests/data/json/fa_av_overview.json") as f: + data = json.load(f) + return MockResponse(data, 200) + + if ( + args[0] + == f"{base}INCOME_STATEMENT&symbol=GME&apikey={cfg.API_KEY_ALPHAVANTAGE}" + ): + with open("tests/data/json/fa_av_income.json") as f: + data = json.load(f) + return MockResponse(data, 200) + + if args[0] == f"{base}BALANCE_SHEET&symbol=GME&apikey={cfg.API_KEY_ALPHAVANTAGE}": + with open("tests/data/json/fa_av_balance.json") as f: + data = json.load(f) + return MockResponse(data, 200) + + if args[0] == f"{base}CASH_FLOW&symbol=GME&apikey={cfg.API_KEY_ALPHAVANTAGE}": + with open("tests/data/json/fa_av_cash.json") as f: + data = json.load(f) + return MockResponse(data, 200) + + if args[0] == f"{base}EARNINGS&symbol=GME&apikey={cfg.API_KEY_ALPHAVANTAGE}": + with open("tests/data/json/fa_av_earnings.json") as f: + data = json.load(f) + return MockResponse(data, 200) + + return MockResponse(None, 404) + + +class TestAVView(unittest.TestCase): + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_av_overview(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.overview([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Price to sales ratio", capt) + + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_av_key(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.key([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Market capitalization", capt) + + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_income_statement(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.income_statement([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Gross profit", capt) + + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_balance_sheet(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.balance_sheet([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Total assets", capt) + + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_cash_flow(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.cash_flow([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Operating cashflow", capt) + + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_earnings(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.earnings([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Reported EPS", capt) + + @mock.patch("requests.get", side_effect=mocked_requests_get) + def test_fraud(self, mock_get): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + av_view.fraud([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Mscore Sub Stats", capt) diff --git a/tests/test_fa_business_insider_view.py b/tests/test_fa/test_fa_business_insider_view.py similarity index 100% rename from tests/test_fa_business_insider_view.py rename to tests/test_fa/test_fa_business_insider_view.py diff --git a/tests/test_fa/test_fa_controller.py b/tests/test_fa/test_fa_controller.py new file mode 100644 index 00000000000..9b82fc82c84 --- /dev/null +++ b/tests/test_fa/test_fa_controller.py @@ -0,0 +1,50 @@ +""" fundamental_analysis/fa_controller.py tests """ +from datetime import datetime, timedelta +from contextlib import contextmanager +import unittest +import io +import sys + +# pylint: disable=unused-import +from gamestonk_terminal.stocks.fundamental_analysis import fa_controller + + +@contextmanager +def replace_stdin(target): + orig = sys.stdin + sys.stdin = target + yield + sys.stdin = orig + + +class TestFaController(unittest.TestCase): + start = datetime.now() - timedelta(days=200) + menuClass = fa_controller.FundamentalAnalysisController("GME", start, "1440min") # type: ignore + choices = fa_controller.FundamentalAnalysisController.CHOICES + + def test_fa_controller_help(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + self.menuClass.print_help() + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + for item in self.choices: + self.assertIn(item, capt) + + def key_metrics_explained(self): + # Is this base function ever even used? + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + fa_controller.key_metrics_explained([""]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("RETURN ON EQUITY", capt) + + def test_menu(self): + with replace_stdin(io.StringIO("q")): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + fa_controller.menu("GME", self.start, "1440min") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("fraud", capt) diff --git a/tests/test_fa/test_fa_fmp_view.py b/tests/test_fa/test_fa_fmp_view.py new file mode 100644 index 00000000000..fa0cf64964d --- /dev/null +++ b/tests/test_fa/test_fa_fmp_view.py @@ -0,0 +1,30 @@ +""" fundamental_analysis/financial_modeling_prep/fmp_view.py tests """ +# Not testing these tests further. I do not have a fmp key +from contextlib import contextmanager +import unittest +import io +import sys + +# pylint: disable=unused-import +from gamestonk_terminal.stocks.fundamental_analysis.financial_modeling_prep import ( + fmp_view, +) + + +@contextmanager +def replace_stdin(target): + orig = sys.stdin + sys.stdin = target + yield + sys.stdin = orig + + +class TestFMPView(unittest.TestCase): + def test_fmp_valinvest_score(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + fmp_view.valinvest_score([], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + print(capt) + self.assertIn("Ticker should be a NASDAQ", capt) diff --git a/tests/test_fa_market_watch_model.py b/tests/test_fa/test_fa_market_watch_model.py similarity index 100% rename from tests/test_fa_market_watch_model.py rename to tests/test_fa/test_fa_market_watch_model.py diff --git a/tests/test_fa_market_watch_view.py b/tests/test_fa/test_fa_market_watch_view.py similarity index 100% rename from tests/test_fa_market_watch_view.py rename to tests/test_fa/test_fa_market_watch_view.py diff --git a/tests/test_fa_yahoo_finance_view.py b/tests/test_fa/test_fa_yahoo_finance_view.py similarity index 100% rename from tests/test_fa_yahoo_finance_view.py rename to tests/test_fa/test_fa_yahoo_finance_view.py diff --git a/tests/test_fa_yield_curve_model.py b/tests/test_fa/test_fa_yield_curve_model.py similarity index 100% rename from tests/test_fa_yield_curve_model.py rename to tests/test_fa/test_fa_yield_curve_model.py diff --git a/tests/test_main/__init__.py b/tests/test_main/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_main/test_main_helper.py b/tests/test_main/test_main_helper.py new file mode 100644 index 00000000000..6ec4b00db91 --- /dev/null +++ b/tests/test_main/test_main_helper.py @@ -0,0 +1,115 @@ +from datetime import datetime, timedelta +from contextlib import contextmanager +import unittest +from unittest.mock import patch +import sys +import io + +import pandas as pd + +from gamestonk_terminal import terminal_helper +from gamestonk_terminal.stocks import stocks_helper + + +def return_val(x, shell, check): + # pylint: disable=unused-argument + # pylint: disable=R0903 + class ReturnVal: + def __init__(self, code): + self.returncode = code + + return ReturnVal(2) + + +@contextmanager +def replace_stdin(target): + orig = sys.stdin + sys.stdin = target + yield + sys.stdin = orig + + +class TestMainHelper(unittest.TestCase): + start = datetime.now() - timedelta(days=200) + + def test_load(self): + values = stocks_helper.load( + ["GME"], "GME", self.start, "1440min", pd.DataFrame() + ) + self.assertEqual(values[0], "GME") + self.assertNotEqual(values[1], None) + self.assertEqual(values[2], "1440min") + + def test_load_clear(self): + stocks_helper.load(["GME"], "GME", self.start, "1440min", pd.DataFrame()) + values = stocks_helper.clear([], "GME", self.start, "1440min", pd.DataFrame()) + self.assertEqual(values[0], "") + self.assertEqual(values[1], "") + self.assertEqual(values[2], "") + + @patch("matplotlib.pyplot.show") + def test_candle(self, mock): + # pylint: disable=unused-argument + stocks_helper.candle("GME", ["GME"]) + + def test_quote(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + stocks_helper.quote(["GME"], "GME") + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Price", capt) + + @patch("matplotlib.pyplot.show") + def test_view(self, mock): + # pylint: disable=unused-argument + stocks_helper.view(["GME"], "GME", "1440min", pd.DataFrame()) + + def test_check_api_keys(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + terminal_helper.check_api_keys() + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("ALPHA", capt) + + def test_print_goodbye(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + terminal_helper.print_goodbye() + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertTrue(len(capt) > 0) + + @patch("subprocess.run", side_effect=return_val) + def test_update_terminal(self, mock): + # pylint: disable=unused-argument + value = terminal_helper.update_terminal() + print(f"Fail value: {value}") + self.assertEqual(value, 2) + + def test_about_us(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + terminal_helper.about_us() + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Thanks for using Gamestonk Terminal.", capt) + + def test_bootup(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + terminal_helper.bootup() + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Welcome to Gamestonk Terminal Beta", capt) + + @patch("subprocess.run", side_effect=return_val) + def test_reset(self, mock): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + terminal_helper.reset() + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("Unfortunately, resetting wasn't", capt) diff --git a/tests/test_portfolio_optimization/__init__.py b/tests/test_portfolio_optimization/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_portfolio_optimization/test_optimizer_view.py b/tests/test_portfolio_optimization/test_optimizer_view.py new file mode 100644 index 00000000000..f5f087c81e0 --- /dev/null +++ b/tests/test_portfolio_optimization/test_optimizer_view.py @@ -0,0 +1,73 @@ +from unittest import TestCase, mock +import sys +import io + +from gamestonk_terminal.portfolio.portfolio_optimization import optimizer_view + + +class TestOptimizerView(TestCase): + def test_equal_weights(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.equal_weight(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("TSLA", capt) + + def test_property_weighting(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.property_weighting(["TSLA", "GME"], ["-p", "previousClose"]) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("TSLA", capt) + + def test_max_sharpe(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.max_sharpe(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("TSLA", capt) + + def test_min_volatility(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.min_volatility(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("TSLA", capt) + + def test_max_quadratic_utility(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.max_quadratic_utility(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("TSLA", capt) + + def test_efficient_risk(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.efficient_risk(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("The minimum volatility", capt) + + def test_efficient_return(self): + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.efficient_return(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("TSLA", capt) + + @mock.patch("matplotlib.pyplot.show") + def test_show_ef(self, mock_mlp): + # pylint: disable=unused-argument + capturedOutput = io.StringIO() + sys.stdout = capturedOutput + optimizer_view.show_ef(["TSLA", "GME"], []) + sys.stdout = sys.__stdout__ + capt = capturedOutput.getvalue() + self.assertIn("\n", capt)