Macrotrends =========== .. important:: In each result dataframe, only the first 5 rows of the DataFrame are shown at most to keep the documentation concise. The actual DataFrame returned by each function may contain more rows. Income Statement ---------------- Retrieves detailed income statement data including revenue, expenses, and profit metrics. Pass frequency as "annual" or "quarterly". Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="AAPL") result = ticker.macrotrends_income_statement(frequency="annual") **Results**: +-------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | field_name | 2024-09-30 | 2023-09-30 | 2022-09-30 | 2021-09-30 | 2020-09-30 | 2019-09-30 | 2018-09-30 | 2017-09-30 | 2016-09-30 | 2015-09-30 | 2014-09-30 | 2013-09-30 | 2012-09-30 | 2011-09-30 | 2010-09-30 | 2009-09-30 | +=====================================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+ | Revenue | 391035 | 383285 | 394328 | 365817 | 274515 | 260174 | 265595 | 229234 | 215639 | 233715 | 182795 | 170910 | 156508 | 108249 | 65225 | 42905 | +-------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Cost Of Goods Sold | 210352 | 214137 | 223546 | 212981 | 169559 | 161782 | 163756 | 141048 | 131376 | 140089 | 112258 | 106606 | 87846 | 64431 | 39541 | 25683 | +-------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Gross Profit | 180683 | 169148 | 170782 | 152836 | 104956 | 98392 | 101839 | 88186 | 84263 | 93626 | 70537 | 64304 | 68662 | 43818 | 25684 | 17222 | +-------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Research And Development Expenses | 31370 | 29915 | 26251 | 21914 | 18752 | 16217 | 14236 | 11581 | 10045 | 8067 | 6041 | 4475 | 3381 | 2429 | 1782 | 1333 | +-------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | SG&A Expenses | 26097 | 24932 | 25094 | 21973 | 19916 | 18245 | 16705 | 15261 | 14194 | 14329 | 11993 | 10830 | 10040 | 7599 | 5517 | 4149 | +-------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ Balance Sheet ---------------- Retrieves balance sheet data showing assets, liabilities, and equity. Pass frequency as "annual" or "quarterly". Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="CAT") result = ticker.macrotrends_balance_sheet(frequency="annual") **Results:** +------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | field_name | 2024-12-31 | 2023-12-31 | 2022-12-31 | 2021-12-31 | 2020-12-31 | 2019-12-31 | 2018-12-31 | 2017-12-31 | 2016-12-31 | 2015-12-31 | 2014-12-31 | 2013-12-31 | 2012-12-31 | 2011-12-31 | 2010-12-31 | 2009-12-31 | +========================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+ | Cash On Hand | 6889.00000 | 6978.00000 | 7004.00000 | 9254.00000 | 9352.00000 | 8284.00000 | 7857.00000 | 8261.00000 | 7168.00000 | 6460.00000 | 7341.00000 | 6081.00000 | 5490.00000 | 3057.00000 | 3592.00000 | 4867.00000 | +------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Receivables | 18847.00000 | 18820.00000 | 17869.00000 | 17375.00000 | 16780.00000 | 17904.00000 | 17452.00000 | 16193.00000 | 14503.00000 | 15686.00000 | 16764.00000 | 17176.00000 | 18566.00000 | 17725.00000 | 16792.00000 | 13912.00000 | +------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Inventory | 16827.00000 | 16565.00000 | 16270.00000 | 14038.00000 | 11402.00000 | 11266.00000 | 11529.00000 | 10018.00000 | 8614.00000 | 9700.00000 | 12205.00000 | 12625.00000 | 15547.00000 | 14544.00000 | 9587.00000 | 6360.00000 | +------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Pre-Paid Expenses | 3119.00000 | 4586.00000 | 2642.00000 | 2788.00000 | 1930.00000 | 1739.00000 | 1765.00000 | 1772.00000 | 1682.00000 | 1662.00000 | 818.00000 | 900.00000 | 988.00000 | 994.00000 | 908.00000 | 862.00000 | +------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Other Current Assets | | | | | | | | | | | | | | | | | +------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ Cash Flow ---------------- Retrieves cash flow statement data showing operating, investing, and financing cash flows. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="TSLA") result = ticker.macrotrends_cash_flow(frequency="annual") **Results:** +---------------------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | field_name | 2024-12-31 | 2023-12-31 | 2022-12-31 | 2021-12-31 | 2020-12-31 | 2019-12-31 | 2018-12-31 | 2017-12-31 | 2016-12-31 | 2015-12-31 | 2014-12-31 | 2013-12-31 | 2012-12-31 | 2011-12-31 | 2010-12-31 | 2009-12-31 | +===================================================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+ | Net Income/Loss | 7153 | 14974 | 12587 | 5644 | 862 | -775 | -1063 | -2241 | -773.046 | -888.663 | -294.04 | -74.014 | -396.213 | -254.411 | -154.328 | -55.74 | +---------------------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Total Depreciation And Amortization - Cash Flow | 5368 | 4667 | 3747 | 2911 | 2322 | 2154 | 2060 | 1727 | 1041.79 | 500.644 | 301.665 | 120.784 | 28.825 | 16.919 | 10.623 | 6.94 | +---------------------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Other Non-Cash Items | 2321 | -4137 | 2102 | 2275 | 2575 | 1375 | 1043 | 950 | 301.289 | 356.809 | 191.863 | 69.076 | 58.631 | 34.23 | 27.063 | 5.518 | +---------------------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Total Non-Cash Items | 7689 | 530 | 5849 | 5186 | 4897 | 3529 | 3103 | 2677 | 1343.08 | 857.453 | 493.528 | 189.86 | 87.456 | 51.149 | 37.686 | 12.458 | +---------------------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Change In Accounts Receivable | -1083 | -586 | -1124 | -130 | -652 | -367 | -497 | -25 | -216.565 | 46.267 | -183.658 | -21.705 | -17.303 | -2.829 | -3.222 | -0.168 | +---------------------------------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ Key Financial Ratios --------------------- Retrieves key financial ratios including liquidity, leverage, and profitability metrics over multiple periods. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="TSLA") result = ticker.macrotrends_key_financial_ratios **Results:** +----------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | field_name | 2024-12-31 | 2023-12-31 | 2022-12-31 | 2021-12-31 | 2020-12-31 | 2019-12-31 | 2018-12-31 | 2017-12-31 | 2016-12-31 | 2015-12-31 | 2014-12-31 | 2013-12-31 | 2012-12-31 | 2011-12-31 | 2010-12-31 | 2009-12-31 | +============================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+================+ | Current Ratio | 2.0249 | 1.7259 | 1.532 | 1.3753 | 1.8751 | 1.1346 | 0.8313 | 0.8561 | 1.0743 | 0.9897 | 1.5092 | 1.875 | 0.9734 | 1.9486 | 2.7568 | 1.7492 | +----------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Long-term Debt / Capital | 0.0725 | 0.0431 | 0.0339 | 0.1446 | 0.294 | 0.6091 | 0.6203 | 0.6428 | 0.5149 | 0.6562 | 0.6731 | 0.4731 | 0.7674 | 0.5476 | 0.2589 | -0.0032 | +----------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Debt/Equity Ratio | 0.1116 | 0.0825 | 0.0681 | 0.2203 | 0.5087 | 1.7971 | 2.0796 | 1.9705 | 1.2693 | 2.488 | 2.729 | 0.9097 | 3.7423 | 1.2504 | 0.3507 | -0.0043 | +----------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Gross Margin | 17.8626 | 18.2489 | 25.5984 | 25.2792 | 21.0236 | 16.5555 | 18.8342 | 18.9047 | 22.8461 | 22.825 | 27.5664 | 22.6602 | 7.2756 | 30.1579 | 26.3234 | 8.5177 | +----------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ | Operating Margin | 7.2433 | 9.1875 | 16.7636 | 12.1194 | 6.3229 | -0.2807 | -1.8079 | -13.8787 | -9.5333 | -17.7119 | -5.837 | -3.0436 | -95.4089 | -123.132 | -125.778 | -46.3602 | +----------------------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+----------------+ Operating Margin --------------------- Retrieves operating margin data showing the percentage of revenue remaining after operating expenses. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="TSLA") result = ticker.macrotrends_operating_margin **Results:** +---+------------+-------------+----------------------+------------------+ | | Date | TTM Revenue | TTM Operating Income | Operating Margin | +===+============+=============+======================+==================+ | 0 | | | | | +---+------------+-------------+----------------------+------------------+ | 1 | 2025-06-30 | $92.72B | $5.62B | 6.06% | +---+------------+-------------+----------------------+------------------+ | 2 | 2025-03-31 | $95.72B | $6.30B | 6.59% | +---+------------+-------------+----------------------+------------------+ | 3 | 2024-12-31 | $97.69B | $7.08B | 7.24% | +---+------------+-------------+----------------------+------------------+ | 4 | 2024-09-30 | $97.15B | $7.56B | 7.78% | +---+------------+-------------+----------------------+------------------+ Gross Margin --------------------- Retrieves gross margin data showing the percentage of revenue remaining after cost of goods sold. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="MSFT") result = ticker.macrotrends_gross_margin **Results:** +---+------------+-------------+------------------+--------------+ | | Date | TTM Revenue | TTM Gross Profit | Gross Margin | +===+============+=============+==================+==============+ | 1 | 2025-06-30 | $281.72B | $193.89B | 68.82% | +---+------------+-------------+------------------+--------------+ | 2 | 2025-03-31 | $270.01B | $186.51B | 69.07% | +---+------------+-------------+------------------+--------------+ | 3 | 2024-12-31 | $261.80B | $181.72B | 69.41% | +---+------------+-------------+------------------+--------------+ | 4 | 2024-09-30 | $254.19B | $176.28B | 69.35% | +---+------------+-------------+------------------+--------------+ EBITDA Margin --------------------- Retrieves EBITDA margin data showing earnings before interest, taxes, depreciation, and amortization as a percentage of revenue. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="UNH") result = ticker.macrotrends_ebitda_margin **Results:** +---+------------+-------------+------------+---------------+ | | Date | TTM Revenue | TTM EBITDA | EBITDA Margin | +===+============+=============+============+===============+ | 1 | 2025-06-30 | $422.82B | $34.98B | 8.27% | +---+------------+-------------+------------+---------------+ | 2 | 2025-03-31 | $410.06B | $37.64B | 9.18% | +---+------------+-------------+------------+---------------+ | 3 | 2024-12-31 | $400.28B | $36.39B | 9.09% | +---+------------+-------------+------------+---------------+ | 4 | 2024-09-30 | $393.90B | $36.24B | 9.20% | +---+------------+-------------+------------+---------------+ Pre-Tax Margin --------------------- Retrieves pre-tax margin data showing the percentage of revenue remaining before taxes. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="AMZN") result = ticker.macrotrends_pre_tax_margin **Results:** +---+------------+-------------+--------------------+----------------+ | | Date | TTM Revenue | TTM Pre-Tax Income | Pre-Tax Margin | +===+============+=============+====================+================+ | 1 | 2025-06-30 | $670.04B | $82.92B | 12.38% | +---+------------+-------------+--------------------+----------------+ | 2 | 2025-03-31 | $650.31B | $77.31B | 11.89% | +---+------------+-------------+--------------------+----------------+ | 3 | 2024-12-31 | $637.96B | $68.61B | 10.76% | +---+------------+-------------+--------------------+----------------+ | 4 | 2024-09-30 | $620.13B | $59.95B | 9.67% | +---+------------+-------------+--------------------+----------------+ Net Margin --------------------- Retrieves net margin data showing the percentage of revenue remaining as net income after all expenses. Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="AMZN") result = ticker.macrotrends_net_margin **Results:** +---+------------+-------------+----------------+------------+ | | Date | TTM Revenue | TTM Net Income | Net Margin | +===+============+=============+================+============+ | 1 | 2025-06-30 | $670.04B | $70.62B | 10.54% | +---+------------+-------------+----------------+------------+ | 2 | 2025-03-31 | $650.31B | $65.94B | 10.14% | +---+------------+-------------+----------------+------------+ | 3 | 2024-12-31 | $637.96B | $59.25B | 9.29% | +---+------------+-------------+----------------+------------+ | 4 | 2024-09-30 | $620.13B | $49.87B | 8.04% | +---+------------+-------------+----------------+------------+ Revenue --------------------- Retrieves company revenue data over time. Pass frequency as "annual" or "quarterly". Returns a **DataFrame**. .. code-block:: python from stockdex import Ticker ticker = Ticker(ticker="AMZN") result = ticker.macrotrends_revenue(frequency="quarterly") **Results:** +---+---------------------------------------------+-----------------------------------------------+ | | Amazon Quarterly Revenue (Millions of US $) | Amazon Quarterly Revenue (Millions of US $).1 | +===+=============================================+===============================================+ | 0 | 2025-06-30 | $167,702 | +---+---------------------------------------------+-----------------------------------------------+ | 1 | 2025-03-31 | $155,667 | +---+---------------------------------------------+-----------------------------------------------+ | 2 | 2024-12-31 | $187,792 | +---+---------------------------------------------+-----------------------------------------------+ | 3 | 2024-09-30 | $158,877 | +---+---------------------------------------------+-----------------------------------------------+ | 4 | 2024-06-30 | $147,977 | +---+---------------------------------------------+-----------------------------------------------+