Stock Return Three Years Formula in Excel

Use the Stock Return Three Years formula in Excel with MarketXLS to quickly calculate a stock's performance over a three-year period. This powerful function pulls data through the MarketXLS database and automatically calculates either the total return or price return for a given symbol.

Understanding Stock Return Three Years

  • Purpose and Use Cases
    The StockReturnThreeYears function helps you measure the three-year performance of a given stock, index, or even crypto asset. It allows you to compare growth across multiple symbols, assisting in investment decision-making and portfolio analysis.

  • Key Benefits

    • Automatically retrieves long-term performance data.
    • Offers flexibility with return types (total return or price return).
    • Ideal for comparing investment performance over a consistent time horizon.
  • When to Use

    • Analyzing long-term stock performance for portfolio review.
    • Checking the three-year price return or total return (including dividends) for investment research.

Syntax and Parameters

=StockReturnThreeYears(symbol, [typeOfReturn])
Parameter Description Required Example
symbol The stock, index, option, or crypto ticker symbol. Yes "MSFT", "^SPX", "@MSFT 110122C00020000", "BTCUSD:DEFAULT"
typeOfReturn The type of return to calculate: "return", "price", or "total" (defaults to "return"). No "price"
  • Return Value
    By default, the function returns a numeric value representing the three-year return percentage. If there is an issue retrieving data or if the symbol isn't recognized, the function returns "NA".

? Pro Tip: Use "total" for a total return calculation that may factor in dividends or adjustments. Use "price" to solely consider price movement.

?? Note: If the symbol is invalid or data is unavailable, StockReturnThreeYears will return "NA".

Examples and Usage

Below are some practical examples illustrating common usage scenarios:

  1. Basic Example (Default Return)

    =StockReturnThreeYears("MSFT")
    • Returns the default three-year return percentage for Microsoft.
  2. Three-Year Return for an Index

    =StockReturnThreeYears("^SPX")
    • Retrieves the three-year return for the S&P 500.
  3. Option Symbol Example

    =StockReturnThreeYears("@MSFT 110122C00020000")
    • Calculates the three-year return for the specified Microsoft option contract.
  4. Crypto Example

    =StockReturnThreeYears("BTCUSD:DEFAULT")
    • Returns the three-year return for Bitcoin.
  5. Price Return Instead of Total

    =StockReturnThreeYears("MSFT","price")
    • Shows three-year price return for Microsoft, excluding dividends.
  • Real-World Applications
    • Compare multiple stocks’ performance over a uniform three-year timeline.
    • Incorporate the results into dashboards or pivot tables for deeper market analysis.

Common Questions

  1. Why am I getting "NA"?

    • An invalid symbol or lack of available data can result in "NA". Ensure the symbol is correct and the MarketXLS add-in is active.
  2. How often is the data updated?

    • Typically updated daily around 5PM EST. Results capture changes in closing prices up to the previous day.
  3. What if I only want price changes without dividends?

    • Use "price" as the typeOfReturn parameter to get the price return only.
  4. Does it handle large lists of symbols efficiently?

    • Yes, but note that each call fetches external data. For large batches, performance can be impacted by API response times.
  5. Can I use it in a VBA macro?

    • Absolutely. Insert the function into VBA code by referencing the cell formulas, or call it directly if the MarketXLS add-in is accessible to VBA.

?? Note: Always verify that your MarketXLS license is valid; otherwise, you may see "NA" results from this function.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Stock Return Three Years and Other Financial Formulas
How does MarketXLS work?