Formula Reference: Yahoo Finance

  • All Yahoo Finance formulas start with EPF.Yahoo so they can be easily referenced.
  • Formulas can either be entered manually or via the shortcut buttons on the Configuration Pane.

Yahoo Finance provides data from many different exchanges, some are real-time (such as the NYSE and NASDAQ) whilst others are delayed. For full details of coverage refer to Exchanges and data providers on Yahoo Finance on the Yahoo Finance website.

Excel Price Feed provides both live and historic price data as well as revenue and earnings data.

The table below is a full list of current Yahoo Finance Excel Formulas included with the Add-in:

Formula Description
EPF.Yahoo.Price Current mid price.
EPF.Yahoo.DayChange Change in price today.
EPF.Yahoo.DayChangePercent Percentage change in price today.
EPF.Yahoo.DayVolume Volume of shares traded today.
EPF.Yahoo.MarketCap Current market capitalisation.
EPF.Yahoo.TrailingAnnualDividendYield Trailing annual dividend yield
EPF.Yahoo.TrailingAnnualDividendRate Trailing annual dividend rate
EPF.Yahoo.EnterpriseValue Enterprise Value
EPF.Yahoo.Beta Beta
EPF.Yahoo.SharesOutstanding Number of shares outstanding
EPF.Yahoo.FloatingShares Number of floating shares
EPF.Yahoo.SharesShort Number of short shares
EPF.Yahoo.ShortRatio Short shares ratio
EPF.Yahoo.ShortPercentFloat Short shares as a % of float
EPF.Yahoo.HeldInsidersPercent % of shares held by insiders
EPF.Yahoo.HeldInstitutionsPercent % of shares held by institutions
EPF.Yahoo.AverageDailyVolume10Day Average daily volume over past 10 trading days.
EPF.Yahoo.AverageDailyVolume3Month Average daily volume over past 3 months.
EPF.Yahoo.AveragePrice200Day Average price over the past 200 trading days.
EPF.Yahoo.AveragePrice50Day Average price over the past 50 trading days
EPF.Yahoo.AnnualRevenue Annual revenue reported for the specified year
Note: this formula requires both a ticker and year.
Yahoo generally provides the past 4 years revenue figures).
EPF.Yahoo.AnnualEarnings Annual earnings reported for the specified year
Note: this formula requires both a ticker and year.
Yahoo generally provides the past 4 years revenue figures).
EPF.Yahoo.52WeekHigh 52 week high.
EPF.Yahoo.52WeekLow 52 week low.
EPF.Yahoo.PERatio PE Ratio TTM (Trailing Twelve Months)
EPF.Yahoo.PERatioForward PE Ratio Forward
EPF.Yahoo.EPS EPS TTM (Trailing Twelve Months)
EPF.Yahoo.Currency Currency code.
EPF.Yahoo.DayHigh Day high.
EPF.Yahoo.DayLow Day low.
EPF.Yahoo.MarketOpen Market open price.
EPF.Yahoo.PrevClose Previous market close price.
EPF.Yahoo.Name Company name.
EPF.Yahoo.QuoteType Quote type, for example "EQUITY" or "MUTUALFUND".
EPF.Yahoo.Historic.Close Close price on specified date.
Note: this formula requires both a ticker and date
EPF.Yahoo.Historic.Open Open price on specified date.
Note: this formula requires both a ticker and date
EPF.Yahoo.Historic.High High price on specified date.
Note: this formula requires both a ticker and date
EPF.Yahoo.Historic.Low Low price on specified date.
Note: this formula requires both a ticker and date
EPF.Yahoo.Historic.Volume Volume on specified date.
Note: this formula requires both a ticker and date

Examples

Formula Description
=EPF.Yahoo.Price("AAPL") Populate the Excel cell with the current stock price of Apple.
=EPF.Yahoo.Volume("MSFT") Populate the Excel cell with the current daily volume of Microsoft.
=EPF.Yahoo.52WeekHigh("VFIAX") Populate the Excel cell with the 52 week high price of the Vanguard 500 Index Mutual Fund.
=EPF.Yahoo.AnnualRevenue("GOOG",2018) Populate the Excel cell with the reported Google annual revenue for 2018.
=EPF.Yahoo.Historic.Close("TSLA", "1 May 2019") Populate the Excel cell with the Tesla stock close price on 1 May 2019.
=EPF.Yahoo.Historic.Volume("GE", "5 April 2019") Populate the Excel cell with the General Electric (GE) stock volume on 5 April 2019.


VBA Functions

All of the Yahoo Finance data which is available via Excel Formulas can also be accessed in VBA via a set of VBA functions. They all begin with EPF.Yahoo.VBA and can be used for market analysis, automated trading etc.

All Excel Price Feed VBA functions can be used from VBA by using the Application.Run function.

The list below is all the functions that can be called from VBA, see above for descriptions.

EPF.Yahoo.VBA.Price
EPF.Yahoo.VBA.DayChange
EPF.Yahoo.VBA.DayChangePercent
EPF.Yahoo.VBA.DayVolume
EPF.Yahoo.VBA.MarketCap
EPF.Yahoo.VBA.52WeekHigh
EPF.Yahoo.VBA.52WeekLow
EPF.Yahoo.VBA.PERatio
EPF.Yahoo.VBA.EPS
EPF.Yahoo.VBA.Currency
EPF.Yahoo.VBA.DayHigh
EPF.Yahoo.VBA.DayLow
EPF.Yahoo.VBA.MarketOpen
EPF.Yahoo.VBA.PrevClose
EPF.Yahoo.VBA.Name
EPF.Yahoo.VBA.QuoteType


VBA Yahoo Finance Examples

1. Return the live price of Microsoft stock:

Dim price As Variant
price = Application.Run("EPF.Yahoo.VBA.Price", "MSFT")


2. Return the day high price of Apple stock:

Dim bidPrice As Variant
bidPrice = Application.Run("EPF.Yahoo.VBA.DayHigh", "AAPL")


3. Sample Code for Apple stock quote and 52 week high in Excel VBA:

Yahoo Finance VBA Apple (AAPL) stock quote