Hello! I am working on a study on compressiblity of financial(mostly fundamental) data in QC notebook. My idea is first, get datas such as FinancialStatements, CashFlowStatements, ratios, and maybe sentiment too. Then run a dimension reduction algo to extract main features and use this model to value stocks.
So what I want is to get as much and diverse data(dimension) as possible, maybe hundreds. And I definitely cannot just name all of those like ↓.
fundamental = self.Fundamentals.GetFundamentalData(symbol)
fundamental.FinancialStatements.BalanceSheet.TotalDebtToEquity
fundamental.ValuationRatios.PERatio
.... and a lot more of these ....
Is there a way to fetch fundamental data in a chunk like this ↓ instead of calling every single field manually in QC notebook or the Algorithm env? I would be so thankful to find a way to.
Mia Alissi
In QuantConnect, you can access fundamental data in a few ways.
Fundamentals
property of theEquity
objects. This will give you the fundamental data for the current algorithm time. Here is an example:Source
Fundamentals
method. If you pass oneSymbol
, the method returns aFundamental
object. If you pass a list ofSymbol
objects, the method returns a list ofFundamental
objects. Here is an example:Source
Source
However, as per the information available in the knowledge sources, there isn't a direct way to fetch all the fundamental data in a chunk as you described. You might need to access each field individually. If you want to access a large number of fields, you might consider creating a list of the fields you're interested in and then looping over that list to access each one.
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.
Lance je
I get that I need to specify the field I am interested in. But where should I look for to search the field's name such as "ValuationRatios.SustainableGrowthRate". I don't know where ratios such as Roic, PER are located at
Mia Alissi
You can find the names of the fundamental fields in the QuantConnect documentation. Here are some examples:
ValuationRatios.SustainableGrowthRate
ValuationRatios.PayoutRatio
ValuationRatios.CashReturn
ValuationRatios.FCFRatio
ValuationRatios.EarningYield
ValuationRatios.SalesYield
ValuationRatios.BookValueYield
ValuationRatios.PEGRatio
ValuationRatios.PBRatio
ValuationRatios.BuyBackYield
ValuationRatios.PricetoEBITDA
ValuationRatios.ForwardPERatio
ValuationRatios.EVToEBITDA3YrAvgChange
ValuationRatios.EVtoFCF
ValuationRatios.EVtoEBIT
ValuationRatios.EVToForwardEBITDA
ValuationRatios.EVToForwardRevenue
ValuationRatios.ForwardROE
ValuationRatios.ForwardDividend
Source
You can also find a list of the currently supported fundamental data in the QuantConnect documentation.
Source
Please note that more data doesn't always lead to better results. You could try analyzing the correlation between some of these factors with returns to filter out the useful ones.
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.
Lance je
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!