FinancialData

FinancialData["name"]

gives the last known price or value for the financial entity specified by "name".

FinancialData["name",start]

gives a list of dates and daily closing values for "name" from start until the current date.

FinancialData["name",{start,end}]

gives a list of dates and daily closing values for dates from start to end.

FinancialData["name",{start,end,period}]

gives a list of dates and prices for the specified periods lying between start and end.

FinancialData["name","prop"]

gives the value of the specified property for the financial entity "name".

FinancialData["name","prop",{start,end,}]

gives a list of dates and values of a property for a sequence of dates or periods.

Details

  • FinancialData can retrieve data on US and other stocks, mutual funds and other financial instruments, as well as indices, and currency exchange rates.
  • US stocks and other financial instruments can be specified by standard ticker symbols such as "GE".
  • Financial instruments can in general be specified by including the name of the exchange or listing, as in "NYSE:GE", "F:BMW", "OB:EGAN", etc. Indices are specified as "^IXIC" etc. The alternative form {"exchange","security"} can also be used for single stock symbols. FinancialData will also recognize "Financial" entities.
  • FinancialData[patt,"Lookup"] gives a list of financial instruments whose symbols or names match the string pattern patt. The search is by default done only for US financial instruments.
  • Individual prices and other quantitative values are given by default as Quantity objects. TimeSeries objects are returned by default for values over a given period. Specifying a value of "Legacy" for the Method option of FinancialData will restore legacy output, i.e. real numbers, lists of date-value pairs, etc.
  • Currency exchange rates are specified for example as "EUR/USD" or {"EUR","USD"}.
  • Times and dates can be given in any date format supported by DateObject or DateList. {y} specifies the beginning of a year.
  • Possible periods include: "Day", "Week", "Month", "Year".
  • All specifies every available date or time.
  • FinancialData["name",,{date}] gives results for a particular date.
  • FinancialData["name", "Properties"] gives a list of all properties available for a financial entity.
  • Properties related to the most recent available prices include:
  • "Ask"the lowest offer to sell currently available
    "AskSize"the size of the lowest-priced sell order currently available
    "Bid"the highest offer to buy currently available
    "BidSize"the size of the highest-priced buy order currently available
    "LatestTrade"the price and time for the most recent available trade
    "LastTradeSize"the size of the most recently completed trade
    "Price"the price for the most recent available trade
  • The default data sources used by FinancialData typically give data delayed by 15 minutes or more for US exchanges; end-of-day data is available for most other global exchanges.
  • All times are given for the location of the exchange on which a financial instrument is traded, or New York time for global instruments such as currencies.
  • Properties related to daily prices and trading include:
  • "Open"opening price for the day
    "High"highest price during the trading day
    "Low"lowest price during the trading day
    "Close"latest known closing price
    "Volume"number of units traded during the day
    "OHLC"list of open, high, low, and close values for the day
    "OHLCV"list of open, high, low, close, and volume for the day
    "Range"lowest and highest prices during the trading day
    "Change"price change from the previous closing price
    "FractionalChange"fractional price change from the previous closing price
    "Return"daily return on a particular day, allowing dividends
  • When markets are closed, daily information is given for the most recent trading day.
  • When historical price and trading properties are requested, daily values are given by default. Properties over longer periods can also be requested.
  • For historical data, properties such as "High", "Low", "Close" are adjusted for stock splits, spin-offs, share repurchases and other corporate actions, but not ordinary dividends.
  • Properties related to raw historical daily prices include:
  • "RawOpen"opening unadjusted price for a period
    "RawHigh"highest unadjusted price during a period
    "RawLow"lowest unadjusted price during a period
    "RawClose"closing unadjusted price for a period
    "RawVolume"unadjusted number of units traded for a period
    "RawOHLC"list of unadjusted open, high, low and close values for a period
    "RawOHLCV"list of unadjusted open, high, low, close and volume values for a period
    "RawRange"lowest and highest unadjusted prices during a period
  • For historical data, properties such as "RawHigh", "RawLow", "RawClose" do not include any retroactive adjustments; i.e. they return values as they were reported on the trading day in question.
  • Properties related to adjusted historical prices include:
  • "AdjustedOpen"opening price during a period adjusted for dividends
    "AdjustedHigh"highest price during a period adjusted for dividends
    "AdjustedLow"lowest price during a period adjusted for dividends
    "AdjustedClose"closing price adjusted for dividends
    "AdjustedOHLC"list of open, high, low and close values for a period adjusted for dividends
    "AdjustedOHLCV"list of open, high, low, close and volume values for a period adjusted for dividends
    "AdjustedRange"lowest and highest prices for a period adjusted for dividends
  • For historical data, properties such as "AdjustedHigh", "AdjustedLow", "AdjustedClose" are adjusted for stock splits, spin-offs, share repurchases and other corporate actions, as well as ordinary dividends.
  • Properties related to long-term historical prices and trends include:
  • "Average200Day"200-day moving average of closing prices
    "Average50Day"50-day moving average of closing prices
    "AverageVolume3Month"3-month average of daily trading volume
    "Change200Day"change in price from 200-day moving average
    "Change50Day"change in price from 50-day moving average
    "ChangeHigh52Week"change in price from 52-week high
    "ChangeLow52Week"change in price from 52-week low
    "CumulativeFractionalChange"cumulative fractional change over a given range of dates
    "CumulativeReturn"cumulative return over a given range of dates
    "FractionalChange200Day"fractional change in price from 200-day moving average
    "FractionalChange50Day"fractional change in price from 50-day moving average
    "FractionalChangeHigh52Week"fractional change from 52-week high
    "FractionalChangeLow52Week"fractional change from 52-week low
    "High52Week"highest price over preceding 52 weeks
    "Low52Week"lowest price over preceding 52 weeks
    "Range52Week"price range over preceding 52 weeks
    "Volatility20Day"price volatility over preceding 20 days
    "Volatility50Day"price volatility over preceding 50 days
    "Volatility250Day"price volatility over preceding 250 days
  • Name-related properties include:
  • "CIK"CIK number
    "Company"name of corporate entity (if applicable)
    "Exchange"exchange to which financial entity refers
    "IPODate"date on which the stock was first listed
    "Name"English name for a financial entity
    "StandardName"standard Wolfram Language name for a financial entity
    "Symbol"ticker symbol
  • Company-related properties include:
  • "Sector"industry sector in which a company operates
    "SICCode"primary SIC code for a company
    "Website"company website URL
  • Fundamentals-related properties for companies include:
  • "BookValuePerShare"book value per share
    "FloatShares"number of shares available for trade in the open market
    "MarketCap"market capitalization
    "PERatio"price-to-earnings ratio
    "PriceToBookRatio"price divided by book value
    "PriceToSalesRatio"price divided by annual sales
  • Earnings-related properties for companies include:
  • "EarningsPerShare"earnings for the most recent four quarters
    "EBITDA"standard cash flow measure
  • Dividends-related properties for companies include:
  • "DividendYield"ratio of annual dividend to current price
    "DividendPerShare"annual dividend per share
    "Dividend"dividend during a specified period
  • FinancialData["group","Members"] gives a list of the member entities of a specified group. FinancialData["Exchanges"] and FinancialData["Sectors"] return lists of entity classes.
  • Groups include companies in an index and companies on a particular exchange.
  • FinancialData["Classes"] gives a list of available classes.
  • FinancialData["name","property",,"form"] can give data in various forms, including:
  • "Value"value only
    "DateValue"list of the form {date,value}
  • FinancialData["name","property",,"ann"] gives various annotations associated with a property. Typical annotations include:
  • "Currency"currency
    "Description"description of the property
    "LongDescription"longer textual description of the property
    "Units"units in which the value is given
    "UnitsName"English name for the units used
    "UnitsNotation"notation for the units used
    "UnitsStandardName"Wolfram Language standard name for the units used
  • FinancialData provides gateways to external financial data sources. Its use is subject to any restrictions associated with those sources, and may require additional licensing.
  • FinancialData requires internet connectivity.
  • Note: FinancialData is intended for informational purposes only. Wolfram Research is not responsible for the accuracy or timeliness of any data.

Examples

open all close all

Basic Examples  (9)

Find the latest price for GE stock:

In[1]:=
Click for copyable input
Out[1]=

Get results consistent with earlier versions of FinancialData using the "Legacy" method:

In[2]:=
Click for copyable input
Out[2]=

Find the latest prices for multiple companies:

In[1]:=
Click for copyable input
Out[1]=

Find the latest market cap for GE:

In[1]:=
Click for copyable input
Out[1]=

Plot the stock price for GE since January 1, 2000:

In[1]:=
Click for copyable input
Out[1]=

Plot the trading volume for GE in the first quarter of 2000:

In[1]:=
Click for copyable input
Out[1]=

Find a list of NYSE stocks whose ticker symbols begin with UN:

In[1]:=
Click for copyable input
Out[1]=

Find the current net asset value for the Fidelity Magellan fund:

In[1]:=
Click for copyable input
Out[1]=

Find the current exchange rate between euros and US dollars:

In[1]:=
Click for copyable input
Out[1]=

Find the price of gold in US dollars:

In[1]:=
Click for copyable input
Out[1]=

Scope  (50)

Applications  (3)

Properties & Relations  (1)

Possible Issues  (4)

Neat Examples  (1)

Introduced in 2007
(6.0)
|
Updated in 2019
(12.0)