Lean  $LEAN_TAG$
FineFundamental.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 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 using System;
17 using Newtonsoft.Json;
18 using System.Collections.Generic;
19 
21 {
22  /// <summary>
23  /// Definition of the FineFundamental class
24  /// </summary>
25  public partial class FineFundamental
26  {
27  /// <summary>
28  /// The end time of this data.
29  /// </summary>
30  [JsonIgnore]
31  public override DateTime EndTime
32  {
33  get { return Time + QuantConnect.Time.OneDay; }
34  set { Time = value - QuantConnect.Time.OneDay; }
35  }
36 
37  /// <summary>
38  /// Price * Total SharesOutstanding.
39  /// The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding.
40  /// For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).
41  /// </summary>
42  [JsonIgnore]
44 
45  /// <summary>
46  /// Return the URL string source of the file. This will be converted to a stream
47  /// </summary>
48  public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
49  {
50  throw new InvalidOperationException();
51  }
52 
53  /// <summary>
54  /// Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object
55  /// each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone.
56  /// </summary>
57  public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
58  {
59  throw new InvalidOperationException();
60  }
61 
62  /// <summary>
63  /// Clones this fine data instance
64  /// </summary>
65  /// <returns></returns>
66  public override BaseData Clone()
67  {
68  return new FineFundamental(Time, Symbol, _fundamentalInstanceProvider);
69  }
70 
71  /// <summary>
72  /// This is a daily data set
73  /// </summary>
74  public override List<Resolution> SupportedResolutions()
75  {
76  return DailyResolution;
77  }
78 
79  /// <summary>
80  /// This is a daily data set
81  /// </summary>
82  public override Resolution DefaultResolution()
83  {
84  return Resolution.Daily;
85  }
86  }
87 }