/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using Newtonsoft.Json; using System.Collections.Generic; namespace QuantConnect.Data.Fundamental { /// /// Definition of the FineFundamental class /// public partial class FineFundamental { /// /// The end time of this data. /// [JsonIgnore] public override DateTime EndTime { get { return Time + QuantConnect.Time.OneDay; } set { Time = value - QuantConnect.Time.OneDay; } } /// /// Price * Total SharesOutstanding. /// The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. /// For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio). /// [JsonIgnore] public long MarketCap => CompanyProfile.MarketCap; /// /// Return the URL string source of the file. This will be converted to a stream /// public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode) { throw new InvalidOperationException(); } /// /// 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 /// each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone. /// public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode) { throw new InvalidOperationException(); } /// /// Clones this fine data instance /// /// public override BaseData Clone() { return new FineFundamental(Time, Symbol, _fundamentalInstanceProvider); } /// /// This is a daily data set /// public override List SupportedResolutions() { return DailyResolution; } /// /// This is a daily data set /// public override Resolution DefaultResolution() { return Resolution.Daily; } } }