About US Fundamental Data
The US Fundamental Data by Morningstar tracks US Equity fundamentals. The data covers 8,000 US Equities, starts in January 1998, and is delivered on a daily frequency. This dataset is created by using a combination of string matching, Regular Expressions, and Machine Learning to gather the fundamental data published by companies.
For older symbols, the file date is approximated 45 days after the as of date. When a filing date is present on the Morningstar data, it is used. As we are a quant platform, all the data is loaded using "As Original Reported" figures. If there was a mistake reporting the figure, this will not be fixed later. The market typically responds quickly to these initially reported figures. Data is available for multiple periods depending on the property. Periods available include: 1 mo, 2 mo, 3 mo, 6 mo, 9 mo, 12 mo, 1 Yr, 2 Yr, 3 Yr, and 5 Yr. Morningstar symbols cover the NYSE, NASDAQ, AMEX, and BATS exchanges.
In live trading, Morningstar data is delivered to your algorithm at approximately 6 am each day. The majority of the fundamental data update occurs once per month. This includes updates to all of the key information for each security Morningstar supports. On top of this monthly update, there are daily updates of the financial ratios.
As Morningstar data arrives, it updates the master copy and is passed into your algorithm, similar to how TradeBars are fill-forwarded in your data feed. If there have been no updates for a day, you'll receive the same fundamental data.
This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.
QuantConnect/LEAN combines the data of this dataset with US Coarse Universe data in runtime.
About Morningstar
Morningstar was founded by Joe Mansueto in 1984 with the goal of empowering investors by connecting people to the investing information and tools they need. Morningstar provides access extensive line of products and services for individual investors, financial advisors, asset managers, and retirement plan providers. Morningstar provides data on approximately 525,000 investment offerings including stocks, mutual funds, and similar vehicles, along with real-time global market data on nearly 18 million equities, indexes, futures, options, commodities, and precious metals, in addition to foreign exchange and Treasury markets. Morningstar also offers investment management services through its investment advisory subsidiaries, with $244 billion in assets under advisement or management as of 2021.
About QuantConnect
QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.
Algorithm Example
from AlgorithmImports import *
from QuantConnect.DataSource import *
class MorningStarDataAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2021, 1, 1)
self.set_end_date(2021, 7, 1)
self.set_cash(100000)
self.universe_settings.resolution = Resolution.DAILY
self.universe_size = 10
# Add universe selection to filter with fundamental data
self.add_universe(self.fundamental_selection_function)
def fundamental_selection_function(self, fundamental: List[Fundamental]) -> List[Symbol]:
# Make sure fundamental data and PE ratio available
# To avoid penny stocks with high volatility, set price above $1
selected = [f for f in fundamental if f.has_fundamental_data and f.price > 1 and not np.isnan(f.valuation_ratios.pe_ratio)]
# Filter the top 100 high dollar volume equities to ensure liquidity
sorted_by_dollar_volume = sorted(selected, key=lambda f: f.dollar_volume, reverse=True)[:100]
# Get the top 10 PE Ratio stocks to follow speculations of a large number of capital
sorted_by_pe_ratio = sorted(sorted_by_dollar_volume, key=lambda f: f.valuation_ratios.pe_ratio, reverse=True)[:self.universe_size]
return [ f.symbol for f in sorted_by_pe_ratio ]
def on_data(self, slice: Slice) -> None:
# if we have no changes, do nothing
if self._changes is None: return
# liquidate removed securities, as not being the most popular stocks anymore
for security in self._changes.removed_securities:
if security.invested:
self.liquidate(security.symbol)
# we want 1/N allocation in each security in our universe to evenly dissipate risk
for security in self._changes.added_securities:
self.set_holdings(security.symbol, 1 / self.universe_size)
self._changes = None
def on_securities_changed(self, changes: SecurityChanges) -> None:
self._changes = changes
for security in changes.added_securities:
# Historical data
history = self.history(security.symbol, 7, Resolution.DAILY)
self.debug(f"We got {len(history)} from our history request for {security.symbol}")
Example Applications
The US Fundamentals dataset enables you to design strategies harnessing fundamental data points. Examples include the following strategies:
- Ranking a universe of securities by a value factor like the Piotroski F-score and buying a subset of the universe with the best factor ranking
- Using the Morningstar asset classification to target specific industries or to ensure your strategy is diversified across several sectors
- Trading securities that recently performed an IPO
Pricing
US Fundamental Cloud Access
Cloud access to Morning Star US Fundamental and Classification data since January 1998, available for research and universe selection.
Explore Other Datasets
Coinbase Crypto Price Data
Dataset by CoinAPI
US Energy Information Administration (EIA)
Dataset by Energy Information Administration
Insider Trading
Dataset by Quiver Quantitative