Back

How do I reference Morningstar Data?

Still trying to reach previous earnings dates for backtesting purposes. I see under the Data tab on your header bar, there is Fundamentals data (for the United States) that is provided by Morningstar. On that page, I see an EarningReports group, with FileDate as an option. How do I reference this???? Does it come in with

AddSecurity(SecurityType.Equity, symbol, Resolution.Daily);

If so, how do I reference it? Securities["symbol"].EarningReport.FileDate

 

Update Backtest








For debugging purposes, how would i log (or display) the next earnings date? The following gives error messages. I'm sure I'm not defining or accessing it correctly.

Debug("The next earnings date is " + Securities["symbol"].EarningReport.FileDate)

 

0

In QuantConnect/Lean, we deal with different types of data.
Securities[Symbol] is a Security object. It does not have fundamental information.

The objects that have fundamental information can only be accessed with a method that as argument of the AddUniverse:

// In Initialize:
AddUniverse(CoarseSelectionFunction, FineSelectionFunction);

In this case, the FineSelectionFunction method. There we can loop thought the fine enumerable and display the earnings date:

public IEnumerable<Symbol> FineSelectionFunction(
IEnumerable<FineFundamental> fine)
{
foreach (var x in fine)
{
Debug("The earnings were filed on " +
x.EarningReport.FileDate);
}

return fine
.OrderByDescending(x => x.ValuationRatios.PERatio)
.Take(NumberOfSymbolsFine)
.Select(x => x.Symbol);
}

 

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Let me add that we agree it should have access like that, since some strategies do need/use fundamental outside the scope of universe selection.

We've added this feature to our TODO list. ;-)

1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Thanks (again) Alexandre! I'm a veteran trader, but new to C#. I appreciate the extended explanation! I feel like a kid in a candy store with these backtesting opportunities!

0

Hi, in terms of the earnings report filing dates, I noticed your code uses past tense...

Debug("The earnings were filed on " + x.EarningReport.FileDate)

Are future file dates also included in the Morningstar data, and if so how far ahead? At minimum I am just looking to access the next date for any particular asset. Thanks in advance! @Alexandre Catarino 

0

Alexandre Catarino is there a reference document that lists all of the fundamental data available?  I can't seem to find one for QuantConnect?

0

Its in the data link in the page header under fundamentals.

1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed