Lean  $LEAN_TAG$
CompanyReference.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2023 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15 */
16 
17 using System;
18 using System.Linq;
19 using Python.Runtime;
20 using Newtonsoft.Json;
21 using System.Collections.Generic;
23 
25 {
26  /// <summary>
27  /// Definition of the CompanyReference class
28  /// </summary>
30  {
31  /// <summary>
32  /// 10-digit unique and unchanging Morningstar identifier assigned to every company.
33  /// </summary>
34  /// <remarks>
35  /// Morningstar DataId: 1
36  /// </remarks>
37  [JsonProperty("1")]
38  public string CompanyId => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_CompanyId);
39 
40  /// <summary>
41  /// 25-character max abbreviated name of the firm. In most cases, the short name will simply be the Legal Name less the "Corporation", "Corp.", "Inc.", "Incorporated", etc...
42  /// </summary>
43  /// <remarks>
44  /// Morningstar DataId: 2
45  /// </remarks>
46  [JsonProperty("2")]
47  public string ShortName => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_ShortName);
48 
49  /// <summary>
50  /// The English translation of the foreign legal name if/when applicable.
51  /// </summary>
52  /// <remarks>
53  /// Morningstar DataId: 3
54  /// </remarks>
55  [JsonProperty("3")]
56  public string StandardName => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_StandardName);
57 
58  /// <summary>
59  /// The full name of the registrant as specified in its charter, and most often found on the front cover of the 10K/10Q/20F filing.
60  /// </summary>
61  /// <remarks>
62  /// Morningstar DataId: 4
63  /// </remarks>
64  [JsonProperty("4")]
65  public string LegalName => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_LegalName);
66 
67  /// <summary>
68  /// 3 Character ISO code of the country where the firm is domiciled. See separate reference document for Country Mappings.
69  /// </summary>
70  /// <remarks>
71  /// Morningstar DataId: 5
72  /// </remarks>
73  [JsonProperty("5")]
74  public string CountryId => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_CountryId);
75 
76  /// <summary>
77  /// The Central Index Key; a corporate identifier assigned by the Securities and Exchange Commission (SEC).
78  /// </summary>
79  /// <remarks>
80  /// Morningstar DataId: 6
81  /// </remarks>
82  [JsonProperty("6")]
83  public string CIK => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_CIK);
84 
85  /// <summary>
86  /// At the Company level; each company is assigned to 1 of 3 possible status classifications; (U) Public, (V) Private, or (O) Obsolete: - Public-Firm is operating and currently has at least one common share class that is currently trading on a public exchange. - Private-Firm is operating but does not have any common share classes currently trading on a public exchange. - Obsolete-Firm is no longer operating because it closed its business, or was acquired.
87  /// </summary>
88  /// <remarks>
89  /// Morningstar DataId: 9
90  /// </remarks>
91  [JsonProperty("9")]
92  public string CompanyStatus => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_CompanyStatus);
93 
94  /// <summary>
95  /// The Month of the company's latest fiscal year.
96  /// </summary>
97  /// <remarks>
98  /// Morningstar DataId: 10
99  /// </remarks>
100  [JsonProperty("10")]
101  public int FiscalYearEnd => FundamentalService.Get<int>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_FiscalYearEnd);
102 
103  /// <summary>
104  /// This indicator will denote which one of the six industry data collection templates applies to the company. Each industry data collection template includes data elements that are commonly reported by companies in that industry. N=Normal (Manufacturing), M=Mining, U=Utility, T=Transportation, B=Bank, I=Insurance
105  /// </summary>
106  /// <remarks>
107  /// Morningstar DataId: 11
108  /// </remarks>
109  [JsonProperty("11")]
110  public string IndustryTemplateCode => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_IndustryTemplateCode);
111 
112  /// <summary>
113  /// The 10-digit unique and unchanging Morningstar identifier assigned to the Primary Share class of a company. The primary share of a company is defined as the first share that was traded publicly and is still actively trading. If this share is no longer trading, the primary share will be the share with the highest volume.
114  /// </summary>
115  /// <remarks>
116  /// Morningstar DataId: 12
117  /// </remarks>
118  [JsonProperty("12")]
119  public string PrimaryShareClassID => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_PrimaryShareClassID);
120 
121  /// <summary>
122  /// The symbol of the Primary Share of the company, composed of an arrangement of characters (often letters) representing a particular security listed on an exchange or otherwise traded publicly. The primary share of a company is defined as the first share that was traded publicly and is still actively trading. If this share is no longer trading, the primary share will be the share with the highest volume. Note: Morningstar's multi-share class symbols will often contain a "period" within the symbol; e.g. BRK.B for Berkshire Hathaway Class B.
123  /// </summary>
124  /// <remarks>
125  /// Morningstar DataId: 13
126  /// </remarks>
127  [JsonProperty("13")]
128  public string PrimarySymbol => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_PrimarySymbol);
129 
130  /// <summary>
131  /// The Id representing the stock exchange of the Primary Share of the company. See separate reference document for Exchange Mappings. The primary share of a company is defined as the first share that was traded publicly with and is still actively trading. If this share is no longer trading, the primary share will be the share with the highest volume.
132  /// </summary>
133  /// <remarks>
134  /// Morningstar DataId: 14
135  /// </remarks>
136  [JsonProperty("14")]
137  public string PrimaryExchangeID => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_PrimaryExchangeID);
138 
139  /// <summary>
140  /// In some cases, different from the country of domicile (CountryId; DataID 5). This element is a three (3) Character ISO code of the business country of the security. It is determined by a few factors, including:
141  /// </summary>
142  /// <remarks>
143  /// Morningstar DataId: 15
144  /// </remarks>
145  [JsonProperty("15")]
146  public string BusinessCountryID => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_BusinessCountryID);
147 
148  /// <summary>
149  /// The language code for the foreign legal name if/when applicable. Related to DataID 4 (LegalName).
150  /// </summary>
151  /// <remarks>
152  /// Morningstar DataId: 16
153  /// </remarks>
154  [JsonProperty("16")]
155  public string LegalNameLanguageCode => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_LegalNameLanguageCode);
156 
157  /// <summary>
158  /// The legal (registered) name of the company's current auditor. Distinct from DataID 28000 Period Auditor that identifies the Auditor related to that period's financial statements.
159  /// </summary>
160  /// <remarks>
161  /// Morningstar DataId: 17
162  /// </remarks>
163  [JsonProperty("17")]
164  public string Auditor => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_Auditor);
165 
166  /// <summary>
167  /// The ISO code denoting the language text for Auditor's name and contact information.
168  /// </summary>
169  /// <remarks>
170  /// Morningstar DataId: 18
171  /// </remarks>
172  [JsonProperty("18")]
173  public string AuditorLanguageCode => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_AuditorLanguageCode);
174 
175  /// <summary>
176  /// The legal (registered) name of the current legal Advisor of the company.
177  /// </summary>
178  /// <remarks>
179  /// Morningstar DataId: 19
180  /// </remarks>
181  [JsonProperty("19")]
182  public string Advisor => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_Advisor);
183 
184  /// <summary>
185  /// The ISO code denoting the language text for Advisor's name and contact information.
186  /// </summary>
187  /// <remarks>
188  /// Morningstar DataId: 20
189  /// </remarks>
190  [JsonProperty("20")]
191  public string AdvisorLanguageCode => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_AdvisorLanguageCode);
192 
193  /// <summary>
194  /// Indicator to denote if the company is a limited partnership, which is a form of business structure comprised of a general partner and limited partners. 1 denotes it is a LP; otherwise 0.
195  /// </summary>
196  /// <remarks>
197  /// Morningstar DataId: 21
198  /// </remarks>
199  [JsonProperty("21")]
200  public bool IsLimitedPartnership => FundamentalService.Get<bool>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_IsLimitedPartnership);
201 
202  /// <summary>
203  /// Indicator to denote if the company is a real estate investment trust (REIT). 1 denotes it is a REIT; otherwise 0.
204  /// </summary>
205  /// <remarks>
206  /// Morningstar DataId: 22
207  /// </remarks>
208  [JsonProperty("22")]
209  public bool IsREIT => FundamentalService.Get<bool>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_IsREIT);
210 
211  /// <summary>
212  /// The MIC (market identifier code) of the PrimarySymbol of the company. See Data Appendix A for the relevant MIC to exchange name mapping.
213  /// </summary>
214  /// <remarks>
215  /// Morningstar DataId: 23
216  /// </remarks>
217  [JsonProperty("23")]
218  public string PrimaryMIC => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_PrimaryMIC);
219 
220  /// <summary>
221  /// This refers to the financial template used to collect the company's financial statements. There are two report styles representing two different financial template structures. Report style "1" is most commonly used by US and Canadian companies, and Report style "3" is most commonly used by the rest of the universe. Contact your client manager for access to the respective templates.
222  /// </summary>
223  /// <remarks>
224  /// Morningstar DataId: 24
225  /// </remarks>
226  [JsonProperty("24")]
227  public int ReportStyle => FundamentalService.Get<int>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_ReportStyle);
228 
229  /// <summary>
230  /// The year a company was founded.
231  /// </summary>
232  /// <remarks>
233  /// Morningstar DataId: 25
234  /// </remarks>
235  [JsonProperty("25")]
236  public string YearofEstablishment => FundamentalService.Get<string>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_YearofEstablishment);
237 
238  /// <summary>
239  /// Indicator to denote if the company is a limited liability company. 1 denotes it is a LLC; otherwise 0.
240  /// </summary>
241  /// <remarks>
242  /// Morningstar DataId: 26
243  /// </remarks>
244  [JsonProperty("26")]
245  public bool IsLimitedLiabilityCompany => FundamentalService.Get<bool>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_IsLimitedLiabilityCompany);
246 
247  /// <summary>
248  /// The upcoming expected year end for the company. It is calculated based on current year end (from latest available annual report) + 1 year.
249  /// </summary>
250  /// <remarks>
251  /// Morningstar DataId: 27
252  /// </remarks>
253  [JsonProperty("27")]
254  public DateTime ExpectedFiscalYearEnd => FundamentalService.Get<DateTime>(_timeProvider.GetUtcNow(), _securityIdentifier, FundamentalProperty.CompanyReference_ExpectedFiscalYearEnd);
255 
256  /// <summary>
257  /// Creates a new instance for the given time and security
258  /// </summary>
259  public CompanyReference(ITimeProvider timeProvider, SecurityIdentifier securityIdentifier)
260  : base(timeProvider, securityIdentifier)
261  {
262  }
263 
264  /// <summary>
265  /// Clones this instance
266  /// </summary>
268  {
269  return new CompanyReference(timeProvider, _securityIdentifier);
270  }
271  }
272 }