Lean  $LEAN_TAG$
FineFundamental.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;
19 
21 {
22  /// <summary>
23  /// Definition of the FineFundamental class
24  /// </summary>
25  public partial class FineFundamental : CoarseFundamental
26  {
27  private readonly FundamentalInstanceProvider _fundamentalInstanceProvider;
28 
29  /// <summary>
30  /// The instance of the CompanyReference class
31  /// </summary>
32  public CompanyReference CompanyReference => _fundamentalInstanceProvider.GetCompanyReference(Time);
33 
34  /// <summary>
35  /// The instance of the SecurityReference class
36  /// </summary>
37  public SecurityReference SecurityReference => _fundamentalInstanceProvider.GetSecurityReference(Time);
38 
39  /// <summary>
40  /// The instance of the FinancialStatements class
41  /// </summary>
42  public FinancialStatements FinancialStatements => _fundamentalInstanceProvider.GetFinancialStatements(Time);
43 
44  /// <summary>
45  /// The instance of the EarningReports class
46  /// </summary>
47  public EarningReports EarningReports => _fundamentalInstanceProvider.GetEarningReports(Time);
48 
49  /// <summary>
50  /// The instance of the OperationRatios class
51  /// </summary>
52  public OperationRatios OperationRatios => _fundamentalInstanceProvider.GetOperationRatios(Time);
53 
54  /// <summary>
55  /// The instance of the EarningRatios class
56  /// </summary>
57  public EarningRatios EarningRatios => _fundamentalInstanceProvider.GetEarningRatios(Time);
58 
59  /// <summary>
60  /// The instance of the ValuationRatios class
61  /// </summary>
62  public ValuationRatios ValuationRatios => _fundamentalInstanceProvider.GetValuationRatios(Time);
63 
64  /// <summary>
65  /// The instance of the CompanyProfile class
66  /// </summary>
67  public CompanyProfile CompanyProfile => _fundamentalInstanceProvider.GetCompanyProfile(Time);
68 
69  /// <summary>
70  /// The instance of the AssetClassification class
71  /// </summary>
72  public AssetClassification AssetClassification => _fundamentalInstanceProvider.GetAssetClassification(Time);
73 
74  /// <summary>
75  /// Creates a new empty instance
76  /// </summary>
77  public FineFundamental()
78  {
79  _fundamentalInstanceProvider = FundamentalInstanceProvider.Get(Symbol.Empty);
80  }
81 
82  /// <summary>
83  /// Creates a new instance for the given time and security
84  /// </summary>
85  public FineFundamental(DateTime time, Symbol symbol)
86  {
87  Time = time;
88  Symbol = symbol;
89  _fundamentalInstanceProvider = FundamentalInstanceProvider.Get(symbol);
90  }
91 
92  /// <summary>
93  /// Creates a new instance for the given time and security
94  /// </summary>
95  public FineFundamental(DateTime time, Symbol symbol, FundamentalInstanceProvider fundamentalInstanceProvider)
96  {
97  Time = time;
98  Symbol = symbol;
99  _fundamentalInstanceProvider = fundamentalInstanceProvider;
100  }
101  }
102 }