Compare commits

...

4 Commits
16632 ... 15882

Author SHA1 Message Date
Martin Molinero
91e58e77a2 Minor coarse fundamental adjustment 2023-09-30 11:01:21 -03:00
Martin Molinero
14a02afd70 Handle live mode & delete unexisting properties 2023-09-29 11:12:53 -03:00
Martin Molinero
dfe706d8e8 Minor CIK lookup fix 2023-09-27 15:15:04 -03:00
Martin Molinero
a5d1011fe1 New Fundamental Data 2023-09-27 15:15:04 -03:00
886 changed files with 105272 additions and 62834 deletions

View File

@@ -169,7 +169,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 5797;
public long DataPoints => 5798;
/// <summary>
/// Data Points count of the algorithm history

View File

@@ -195,11 +195,11 @@ namespace QuantConnect.Algorithm.CSharp.Alphas
private const int _numberOfSymbolsFine = 20;
private const int _numberOfSymbolsInPortfolio = 10;
private int _lastMonth = -1;
private Dictionary<Symbol, decimal> _dollarVolumeBySymbol;
private Dictionary<Symbol, double> _dollarVolumeBySymbol;
public GreenBlattMagicFormulaUniverseSelectionModel() : base(true)
{
_dollarVolumeBySymbol = new Dictionary<Symbol, decimal>();
_dollarVolumeBySymbol = new ();
}
/// <summary>
@@ -245,7 +245,7 @@ namespace QuantConnect.Algorithm.CSharp.Alphas
where x.CompanyReference.CountryId == "USA"
where x.CompanyReference.PrimaryExchangeID == "NYS" || x.CompanyReference.PrimaryExchangeID == "NAS"
where (algorithm.Time - x.SecurityReference.IPODate).TotalDays > 180
where x.EarningReports.BasicAverageShares.ThreeMonths * x.EarningReports.BasicEPS.TwelveMonths * x.ValuationRatios.PERatio > 5e8m
where x.EarningReports.BasicAverageShares.ThreeMonths * x.EarningReports.BasicEPS.TwelveMonths * x.ValuationRatios.PERatio > 5e8
select x;
double count = filteredFine.Count();
@@ -287,4 +287,4 @@ namespace QuantConnect.Algorithm.CSharp.Alphas
}
}
}
}
}

View File

@@ -106,7 +106,7 @@ namespace QuantConnect.Algorithm.CSharp
// we want 50% allocation in each security in our universe
foreach (var security in _changes.AddedSecurities)
{
if (security.Fundamentals.EarningRatios.EquityPerShareGrowth.OneYear > 0.25m)
if (security.Fundamentals.EarningRatios.EquityPerShareGrowth.OneYear > 0.25)
{
SetHoldings(security.Symbol, 0.5m);
Debug("Purchased Stock: " + security.Symbol.Value);
@@ -159,7 +159,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 7239;
public long DataPoints => 7244;
/// <summary>
/// Data Points count of the algorithm history

View File

@@ -157,7 +157,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 998462;
public long DataPoints => 998464;
/// <summary>
/// Data Points count of the algorithm history

View File

@@ -83,7 +83,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 40;
public long DataPoints => 41;
/// <summary>
/// Data Points count of the algorithm history

View File

@@ -0,0 +1,144 @@
/*
* 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.Linq;
using QuantConnect.Interfaces;
using QuantConnect.Data.Market;
using System.Collections.Generic;
using QuantConnect.Data.Fundamental;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Algorithm.CSharp.Benchmarks
{
/// <summary>
/// Demonstration of how to define a universe using the fundamental data
/// </summary>
public class FundamentalRegressionAlgorithm : QCAlgorithm, IRegressionAlgorithmDefinition
{
private const int NumberOfSymbolsFundamental = 2;
private SecurityChanges _changes = SecurityChanges.None;
public override void Initialize()
{
UniverseSettings.Resolution = Resolution.Daily;
SetStartDate(2014, 03, 24);
SetEndDate(2014, 04, 07);
SetCash(50000);
AddUniverse(FundamentalSelectionFunction);
}
// sort the data by daily dollar volume and take the top 'NumberOfSymbolsCoarse'
public IEnumerable<Symbol> FundamentalSelectionFunction(IEnumerable<Fundamental> fundamental)
{
// select only symbols with fundamental data and sort descending by daily dollar volume
var sortedByDollarVolume = fundamental
.Where(x => x.HasFundamentalData)
.OrderByDescending(x => x.DollarVolume);
// sort descending by P/E ratio
var sortedByPeRatio = sortedByDollarVolume.OrderByDescending(x => x.ValuationRatios.PERatio);
// take the top entries from our sorted collection
var topFine = sortedByPeRatio.Take(NumberOfSymbolsFundamental);
// we need to return only the symbol objects
return topFine.Select(x => x.Symbol);
}
//Data Event Handler: New data arrives here. "TradeBars" type is a dictionary of strings so you can access it by symbol.
public void OnData(TradeBars data)
{
// if we have no changes, do nothing
if (_changes == SecurityChanges.None) return;
// liquidate removed securities
foreach (var security in _changes.RemovedSecurities)
{
if (security.Invested)
{
Liquidate(security.Symbol);
}
}
// we want allocation in each security in our universe
foreach (var security in _changes.AddedSecurities)
{
SetHoldings(security.Symbol, 0.02m);
}
_changes = SecurityChanges.None;
}
// this event fires whenever we have changes to our universe
public override void OnSecuritiesChanged(SecurityChanges changes)
{
_changes = changes;
}
/// <summary>
/// This is used by the regression test system to indicate if the open source Lean repository has the required data to run this algorithm.
/// </summary>
public bool CanRunLocally { get; } = true;
/// <summary>
/// This is used by the regression test system to indicate which languages this algorithm is written in.
/// </summary>
public Language[] Languages { get; } = { Language.CSharp, Language.Python };
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 78073;
/// <summary>
/// Data Points count of the algorithm history
/// </summary>
public int AlgorithmHistoryDataPoints => 0;
/// <summary>
/// This is used by the regression test system to indicate what the expected statistics are from running the algorithm
/// </summary>
public Dictionary<string, string> ExpectedStatistics => new Dictionary<string, string>
{
{"Total Trades", "2"},
{"Average Win", "0%"},
{"Average Loss", "0%"},
{"Compounding Annual Return", "-0.243%"},
{"Drawdown", "0.100%"},
{"Expectancy", "0"},
{"Net Profit", "-0.010%"},
{"Sharpe Ratio", "-0.36"},
{"Probabilistic Sharpe Ratio", "37.988%"},
{"Loss Rate", "0%"},
{"Win Rate", "0%"},
{"Profit-Loss Ratio", "0"},
{"Alpha", "0.001"},
{"Beta", "0.034"},
{"Annual Standard Deviation", "0.005"},
{"Annual Variance", "0"},
{"Information Ratio", "0.985"},
{"Tracking Error", "0.094"},
{"Treynor Ratio", "-0.052"},
{"Total Fees", "$2.00"},
{"Estimated Strategy Capacity", "$2200000000.00"},
{"Lowest Capacity Asset", "IBM R735QTJ8XC9X"},
{"Portfolio Turnover", "0.26%"},
{"OrderListHash", "6e9253ada006812a3e2d368d02b15f48"}
};
}
}

View File

@@ -28,31 +28,35 @@ namespace QuantConnect.Algorithm.CSharp
{
public override void Initialize()
{
SetStartDate(2013, 10, 07);
SetEndDate(2013, 10, 07);
SetStartDate(2014, 06, 05);
SetEndDate(2014, 06, 05);
var spy = AddEquity("SPY").Symbol;
var equity = AddEquity("AAPL").Symbol;
var spyCusip = spy.CUSIP;
var spyCompositeFigi = spy.CompositeFIGI;
var spySedol = spy.SEDOL;
var spyIsin = spy.ISIN;
var cusip = equity.CUSIP;
var compositeFigi = equity.CompositeFIGI;
var sedol = equity.SEDOL;
var isin = equity.ISIN;
var cik = equity.CIK;
CheckSymbolRepresentation(spyCusip, "CUSIP");
CheckSymbolRepresentation(spyCompositeFigi, "Composite FIGI");
CheckSymbolRepresentation(spySedol, "SEDOL");
CheckSymbolRepresentation(spyIsin, "ISIN");
CheckSymbolRepresentation(cusip, "CUSIP");
CheckSymbolRepresentation(compositeFigi, "Composite FIGI");
CheckSymbolRepresentation(sedol, "SEDOL");
CheckSymbolRepresentation(isin, "ISIN");
CheckSymbolRepresentation($"{cik}", "CIK");
// Check Symbol API vs QCAlgorithm API
CheckAPIsSymbolRepresentations(spyCusip, CUSIP(spy), "CUSIP");
CheckAPIsSymbolRepresentations(spyCompositeFigi, CompositeFIGI(spy), "Composite FIGI");
CheckAPIsSymbolRepresentations(spySedol, SEDOL(spy), "SEDOL");
CheckAPIsSymbolRepresentations(spyIsin, ISIN(spy), "ISIN");
CheckAPIsSymbolRepresentations(cusip, CUSIP(equity), "CUSIP");
CheckAPIsSymbolRepresentations(compositeFigi, CompositeFIGI(equity), "Composite FIGI");
CheckAPIsSymbolRepresentations(sedol, SEDOL(equity), "SEDOL");
CheckAPIsSymbolRepresentations(isin, ISIN(equity), "ISIN");
CheckAPIsSymbolRepresentations($"{cik}", $"{CIK(equity)}", "CIK");
Log($"\nSPY CUSIP: {spyCusip}" +
$"\nSPY Composite FIGI: {spyCompositeFigi}" +
$"\nSPY SEDOL: {spySedol}" +
$"\nSPY ISIN: {spyIsin}");
Log($"\nAAPL CUSIP: {cusip}" +
$"\nAAPL Composite FIGI: {compositeFigi}" +
$"\nAAPL SEDOL: {sedol}" +
$"\nAAPL ISIN: {isin}" +
$"\nAAPL CIK: {cik}");
}
private static void CheckSymbolRepresentation(string symbol, string standard)

View File

@@ -55,7 +55,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public override long DataPoints => 544;
public override long DataPoints => 555;
/// <summary>
/// This is used by the regression test system to indicate what the expected statistics are from running the algorithm
@@ -85,7 +85,7 @@ namespace QuantConnect.Algorithm.CSharp
{"Estimated Strategy Capacity", "$63000000.00"},
{"Lowest Capacity Asset", "AIG R735QTJ8XC9X"},
{"Portfolio Turnover", "0.80%"},
{"OrderListHash", "81128ea61f4a90afe5b9eb8a66a5bb11"}
{"OrderListHash", "97dbdaf15cd01a91bf0a262c9d8fb6bd"}
};
}
}

View File

@@ -80,7 +80,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 7238;
public long DataPoints => 7249;
/// <summary>
/// Data Points count of the algorithm history
@@ -92,30 +92,30 @@ namespace QuantConnect.Algorithm.CSharp
/// </summary>
public Dictionary<string, string> ExpectedStatistics => new Dictionary<string, string>
{
{"Total Trades", "10"},
{"Total Trades", "11"},
{"Average Win", "0.12%"},
{"Average Loss", "-0.07%"},
{"Compounding Annual Return", "-34.838%"},
{"Drawdown", "2.100%"},
{"Compounding Annual Return", "-40.669%"},
{"Drawdown", "2.600%"},
{"Expectancy", "0.865"},
{"Net Profit", "-1.629%"},
{"Sharpe Ratio", "-4.208"},
{"Probabilistic Sharpe Ratio", "4.273%"},
{"Net Profit", "-1.982%"},
{"Sharpe Ratio", "-4.129"},
{"Probabilistic Sharpe Ratio", "3.637%"},
{"Loss Rate", "33%"},
{"Win Rate", "67%"},
{"Profit-Loss Ratio", "1.80"},
{"Alpha", "-0.194"},
{"Beta", "0.674"},
{"Annual Standard Deviation", "0.075"},
{"Annual Variance", "0.006"},
{"Information Ratio", "-2.776"},
{"Tracking Error", "0.048"},
{"Treynor Ratio", "-0.47"},
{"Total Fees", "$22.09"},
{"Estimated Strategy Capacity", "$27000000.00"},
{"Alpha", "-0.217"},
{"Beta", "0.796"},
{"Annual Standard Deviation", "0.088"},
{"Annual Variance", "0.008"},
{"Information Ratio", "-3.98"},
{"Tracking Error", "0.045"},
{"Treynor Ratio", "-0.455"},
{"Total Fees", "$23.09"},
{"Estimated Strategy Capacity", "$29000000.00"},
{"Lowest Capacity Asset", "AIG R735QTJ8XC9X"},
{"Portfolio Turnover", "8.61%"},
{"OrderListHash", "a2f005326c549bf9f8f90168369d6cb7"}
{"Portfolio Turnover", "10.03%"},
{"OrderListHash", "cf1482fed8c889a7b6f50cbea9dbb602"}
};
}
}

View File

@@ -106,7 +106,7 @@ namespace QuantConnect.Algorithm.CSharp
/// <summary>
/// Data Points count of all timeslices of algorithm
/// </summary>
public long DataPoints => 54;
public long DataPoints => 58;
/// <summary>
/// Data Points count of the algorithm history

View File

@@ -1,4 +1,4 @@
/*
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
@@ -202,7 +202,7 @@ namespace QuantConnect.Algorithm.Framework.Portfolio
/// <remarks>Other sectors can be defined using <see cref="AssetClassification"/></remarks>
protected virtual string GetSectorCode(Security security)
{
return security.Fundamentals?.CompanyReference?.IndustryTemplateCode;
return security.Fundamentals?.CompanyReference.IndustryTemplateCode;
}
}
}
}

View File

@@ -1,4 +1,4 @@
/*
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
@@ -33,7 +33,7 @@ namespace QuantConnect.Algorithm.Framework.Selection
// rebalances at the start of each month
private int _lastMonth = -1;
private readonly Dictionary<Symbol, decimal> _dollarVolumeBySymbol = new Dictionary<Symbol, decimal>();
private readonly Dictionary<Symbol, double> _dollarVolumeBySymbol = new ();
/// <summary>
/// Initializes a new default instance of the <see cref="QC500UniverseSelectionModel"/>
@@ -136,4 +136,4 @@ namespace QuantConnect.Algorithm.Framework.Selection
.Select(x => x.Symbol);
}
}
}
}

View File

@@ -0,0 +1,67 @@
# 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.
from AlgorithmImports import *
### <summary>
### Demonstration of how to define a universe using the fundamental data
### </summary>
### <meta name="tag" content="using data" />
### <meta name="tag" content="universes" />
### <meta name="tag" content="coarse universes" />
### <meta name="tag" content="regression test" />
class FundamentalRegressionAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2014, 3, 24)
self.SetEndDate(2014, 4, 7)
self.SetCash(50000)
self.UniverseSettings.Resolution = Resolution.Daily
self.AddUniverse(self.SelectionFunction)
self.changes = None
self.numberOfSymbolsFundamental = 2
# return a list of three fixed symbol objects
def SelectionFunction(self, fundamental):
# sort descending by daily dollar volume
sortedByDollarVolume = sorted([x for x in fundamental if x.HasFundamentalData],
key=lambda x: x.DollarVolume, reverse=True)
# sort descending by P/E ratio
sortedByPeRatio = sorted(sortedByDollarVolume, key=lambda x: x.ValuationRatios.PERatio, reverse=True)
# take the top entries from our sorted collection
return [ x.Symbol for x in sortedByPeRatio[:self.numberOfSymbolsFundamental] ]
def OnData(self, data):
# if we have no changes, do nothing
if self.changes is None: return
# liquidate removed securities
for security in self.changes.RemovedSecurities:
if security.Invested:
self.Liquidate(security.Symbol)
self.Debug("Liquidated Stock: " + str(security.Symbol.Value))
# we want 50% allocation in each security in our universe
for security in self.changes.AddedSecurities:
self.SetHoldings(security.Symbol, 0.02)
self.changes = None
# this event fires whenever we have changes to our universe
def OnSecuritiesChanged(self, changes):
self.changes = changes

View File

@@ -18,31 +18,35 @@ from AlgorithmImports import *
### </summary>
class IndustryStandardSecurityIdentifiersRegressionAlgorithm(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2013, 10, 7)
self.SetEndDate(2013, 10, 7)
self.SetStartDate(2014, 6, 5)
self.SetEndDate(2014, 6, 5)
spy = self.AddEquity("SPY").Symbol
equity = self.AddEquity("AAPL").Symbol
spyCusip = spy.CUSIP
spyCompositeFigi = spy.CompositeFIGI
spySedol = spy.SEDOL
spyIsin = spy.ISIN
cusip = equity.CUSIP
compositeFigi = equity.CompositeFIGI
sedol = equity.SEDOL
isin = equity.ISIN
cik = equity.CIK
self.CheckSymbolRepresentation(spyCusip, "CUSIP")
self.CheckSymbolRepresentation(spyCompositeFigi, "Composite FIGI")
self.CheckSymbolRepresentation(spySedol, "SEDOL")
self.CheckSymbolRepresentation(spyIsin, "ISIN")
self.CheckSymbolRepresentation(cusip, "CUSIP")
self.CheckSymbolRepresentation(compositeFigi, "Composite FIGI")
self.CheckSymbolRepresentation(sedol, "SEDOL")
self.CheckSymbolRepresentation(isin, "ISIN")
self.CheckSymbolRepresentation(f"{cik}", "CIK")
# Check Symbol API vs QCAlgorithm API
self.CheckAPIsSymbolRepresentations(spyCusip, self.CUSIP(spy), "CUSIP");
self.CheckAPIsSymbolRepresentations(spyCompositeFigi, self.CompositeFIGI(spy), "Composite FIGI");
self.CheckAPIsSymbolRepresentations(spySedol, self.SEDOL(spy), "SEDOL");
self.CheckAPIsSymbolRepresentations(spyIsin, self.ISIN(spy), "ISIN");
self.CheckAPIsSymbolRepresentations(cusip, self.CUSIP(equity), "CUSIP")
self.CheckAPIsSymbolRepresentations(compositeFigi, self.CompositeFIGI(equity), "Composite FIGI")
self.CheckAPIsSymbolRepresentations(sedol, self.SEDOL(equity), "SEDOL")
self.CheckAPIsSymbolRepresentations(isin, self.ISIN(equity), "ISIN")
self.CheckAPIsSymbolRepresentations(f"{cik}", f"{self.CIK(equity)}", "CIK")
self.Log(f"\nSPY CUSIP: {spyCusip}"
f"\nSPY Composite FIGI: {spyCompositeFigi}"
f"\nSPY SEDOL: {spySedol}"
f"\nSPY ISIN: {spyIsin}")
self.Log(f"\nAAPL CUSIP: {cusip}"
f"\nAAPL Composite FIGI: {compositeFigi}"
f"\nAAPL SEDOL: {sedol}"
f"\nAAPL ISIN: {isin}"
f"\nAAPL CIK: {cik}")
def CheckSymbolRepresentation(self, symbol: str, standard: str) -> None:
if not symbol:

View File

@@ -287,7 +287,7 @@ namespace QuantConnect.Algorithm
[DocumentationAttribute(Universes)]
public Universe AddUniverse(PyObject pyObject)
{
Func<IEnumerable<CoarseFundamental>, object> coarseFunc;
Func<IEnumerable<Fundamental>, object> coarseFunc;
Universe universe;
// TODO: to be removed when https://github.com/QuantConnect/pythonnet/issues/62 is solved

View File

@@ -399,9 +399,9 @@ namespace QuantConnect.Algorithm
/// </summary>
/// <param name="selector">Defines an initial coarse selection</param>
[DocumentationAttribute(Universes)]
public Universe AddUniverse(Func<IEnumerable<CoarseFundamental>, IEnumerable<Symbol>> selector)
public Universe AddUniverse(Func<IEnumerable<Fundamental>, IEnumerable<Symbol>> selector)
{
return AddUniverse(new CoarseFundamentalUniverse(UniverseSettings, selector));
return AddUniverse(new FundamentalUniverse(UniverseSettings, selector));
}
/// <summary>
@@ -425,9 +425,9 @@ namespace QuantConnect.Algorithm
/// <param name="universe">The universe to be filtered with fine fundamental selection</param>
/// <param name="fineSelector">Defines a more detailed selection with access to more data</param>
[DocumentationAttribute(Universes)]
public Universe AddUniverse(Universe universe, Func<IEnumerable<FineFundamental>, IEnumerable<Symbol>> fineSelector)
public Universe AddUniverse(Universe universe, Func<IEnumerable<Fundamental>, IEnumerable<Symbol>> fineSelector)
{
return AddUniverse(new FineFundamentalFilteredUniverse(universe, fineSelector));
return AddUniverse(new FundamentalFilteredUniverse(universe, fineSelector));
}
/// <summary>
@@ -471,7 +471,7 @@ namespace QuantConnect.Algorithm
var dataTimeZone = marketHoursDbEntry.DataTimeZone;
var exchangeTimeZone = marketHoursDbEntry.ExchangeHours.TimeZone;
var symbol = QuantConnect.Symbol.Create(name, securityType, market);
var config = new SubscriptionDataConfig(typeof(CoarseFundamental), symbol, resolution, dataTimeZone, exchangeTimeZone, false, false, true, isFilteredSubscription: false);
var config = new SubscriptionDataConfig(typeof(Fundamental), symbol, resolution, dataTimeZone, exchangeTimeZone, false, false, true, isFilteredSubscription: false);
return AddUniverse(new UserDefinedUniverse(config, universeSettings, resolution.ToTimeSpan(), selector));
}
@@ -633,6 +633,10 @@ namespace QuantConnect.Algorithm
/// </summary>
private SubscriptionDataConfig GetCustomUniverseConfiguration(Type dataType, string name, Resolution resolution, string market)
{
if (dataType == typeof(CoarseFundamental) || dataType == typeof(FineFundamental))
{
dataType = typeof(Fundamental);
}
// same as 'AddData<>' 'T' type will be treated as custom/base data type with always open market hours
var universeSymbol = QuantConnect.Symbol.Create(name, SecurityType.Base, market, baseDataType: dataType);
var marketHoursDbEntry = MarketHoursDatabase.GetEntry(universeSymbol, new[] { dataType });

View File

@@ -3116,6 +3116,34 @@ namespace QuantConnect.Algorithm
return _securityDefinitionSymbolResolver.SEDOL(symbol);
}
/// <summary>
/// Converts a CIK identifier into <see cref="Symbol"/> array
/// </summary>
/// <param name="cik">The CIK identifier of an asset</param>
/// <param name="tradingDate">
/// The date that the stock being looked up is/was traded at.
/// The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
/// </param>
/// <returns>Symbols corresponding to the CIK. If no Symbol with a matching CIK was found, returns empty array.</returns>
[DocumentationAttribute(HandlingData)]
[DocumentationAttribute(SecuritiesAndPortfolio)]
public Symbol[] CIK(int cik, DateTime? tradingDate = null)
{
return _securityDefinitionSymbolResolver.CIK(cik, GetVerifiedTradingDate(tradingDate));
}
/// <summary>
/// Converts a <see cref="Symbol"/> into a CIK identifier
/// </summary>
/// <param name="symbol">The <see cref="Symbol"/></param>
/// <returns>CIK corresponding to the Symbol. If no matching CIK is found, returns null.</returns>
[DocumentationAttribute(HandlingData)]
[DocumentationAttribute(SecuritiesAndPortfolio)]
public int? CIK(Symbol symbol)
{
return _securityDefinitionSymbolResolver.CIK(symbol);
}
/// <summary>
/// Set the properties and exchange hours for a given key into our databases
/// </summary>

View File

@@ -15,10 +15,11 @@
*/
using System;
using System.Collections.Generic;
using System.Linq;
using Python.Runtime;
using QuantConnect.Data;
using System.Collections.Generic;
using QuantConnect.Data.Fundamental;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Algorithm
@@ -344,9 +345,9 @@ namespace QuantConnect.Algorithm
universeSettings ??= _algorithm.UniverseSettings;
var symbol = Symbol.Create("us-equity-dollar-volume-top-" + count, SecurityType.Equity, Market.USA);
var config = new SubscriptionDataConfig(typeof(CoarseFundamental), symbol, Resolution.Daily, TimeZones.NewYork, TimeZones.NewYork, false, false, true);
var config = new SubscriptionDataConfig(typeof(Fundamental), symbol, Resolution.Daily, TimeZones.NewYork, TimeZones.NewYork, false, false, true);
return new FuncUniverse(config, universeSettings, selectionData => (
from c in selectionData.OfType<CoarseFundamental>()
from c in selectionData.OfType<Fundamental>()
orderby c.DollarVolume descending
select c.Symbol).Take(count)
);

View File

@@ -14,9 +14,8 @@
*/
using System;
using System.IO;
using Newtonsoft.Json;
using static QuantConnect.StringExtensions;
using System.Collections.Generic;
namespace QuantConnect.Data.Fundamental
{
@@ -41,36 +40,14 @@ namespace QuantConnect.Data.Fundamental
/// For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).
/// </summary>
[JsonIgnore]
public long MarketCap => CompanyProfile?.MarketCap ?? 0;
/// <summary>
/// Creates the universe symbol used for fine fundamental data
/// </summary>
/// <param name="market">The market</param>
/// <param name="addGuid">True, will add a random GUID to allow uniqueness</param>
/// <returns>A fine universe symbol for the specified market</returns>
public static Symbol CreateUniverseSymbol(string market, bool addGuid = true)
{
market = market.ToLowerInvariant();
var ticker = $"qc-universe-fine-{market}";
if (addGuid)
{
ticker += $"-{Guid.NewGuid()}";
}
var sid = SecurityIdentifier.GenerateEquity(SecurityIdentifier.DefaultDate, ticker, market);
return new Symbol(sid, ticker);
}
public long MarketCap => CompanyProfile.MarketCap;
/// <summary>
/// Return the URL string source of the file. This will be converted to a stream
/// </summary>
public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
{
var basePath = Globals.GetDataFolderPath(Invariant($"equity/{config.Market}/fundamental/fine"));
var source = Path.Combine(basePath, Invariant($"{config.Symbol.Value.ToLowerInvariant()}/{date:yyyyMMdd}.zip"));
return new SubscriptionDataSource(source, SubscriptionTransportMedium.LocalFile, FileFormat.Csv);
throw new InvalidOperationException();
}
/// <summary>
@@ -79,13 +56,32 @@ namespace QuantConnect.Data.Fundamental
/// </summary>
public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
{
var data = JsonConvert.DeserializeObject<FineFundamental>(line);
throw new InvalidOperationException();
}
data.DataType = MarketDataType.Auxiliary;
data.Symbol = config.Symbol;
data.Time = date;
/// <summary>
/// Clones this fine data instance
/// </summary>
/// <returns></returns>
public override BaseData Clone()
{
return new FineFundamental(Time, Symbol);
}
return data;
/// <summary>
/// This is a daily data set
/// </summary>
public override List<Resolution> SupportedResolutions()
{
return DailyResolution;
}
/// <summary>
/// This is a daily data set
/// </summary>
public override Resolution DefaultResolution()
{
return Resolution.Daily;
}
}
}

View File

@@ -0,0 +1,129 @@
/*
* 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 System.IO;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Lean fundamental data class
/// </summary>
public class Fundamental : FineFundamental
{
/// <summary>
/// Gets the day's dollar volume for this symbol
/// </summary>
public override double DollarVolume => FundamentalService.Get<double>(Time, Symbol.ID, "DollarVolume");
/// <summary>
/// Gets the day's total volume
/// </summary>
public override long Volume => FundamentalService.Get<long>(Time, Symbol.ID, "Volume");
/// <summary>
/// Returns whether the symbol has fundamental data for the given date
/// </summary>
public override bool HasFundamentalData => FundamentalService.Get<bool>(Time, Symbol.ID, "HasFundamentalData");
/// <summary>
/// Gets the price factor for the given date
/// </summary>
public override decimal PriceFactor => FundamentalService.Get<decimal>(Time, Symbol.ID, "PriceFactor");
/// <summary>
/// Gets the split factor for the given date
/// </summary>
public override decimal SplitFactor => FundamentalService.Get<decimal>(Time, Symbol.ID, "SplitFactor");
/// <summary>
/// Gets the raw price
/// </summary>
public override decimal Value => FundamentalService.Get<decimal>(Time, Symbol.ID, "Value");
/// <summary>
/// Creates a new empty instance
/// </summary>
public Fundamental()
{
DataType = MarketDataType.Auxiliary;
}
/// <summary>
/// Creates a new instance
/// </summary>
/// <param name="time">The current time</param>
/// <param name="symbol">The associated symbol</param>
public Fundamental(DateTime time, Symbol symbol)
: base(time, symbol)
{
DataType = MarketDataType.Auxiliary;
}
/// <summary>
/// Return the URL string source of the file. This will be converted to a stream
/// </summary>
public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
{
var path = Path.Combine(Globals.DataFolder, "equity", config.Market, "fundamental", "coarse", $"{date:yyyyMMdd}.csv");
return new SubscriptionDataSource(path, SubscriptionTransportMedium.LocalFile, FileFormat.Csv);
}
/// <summary>
///
/// </summary>
/// <param name="config"></param>
/// <param name="line"></param>
/// <param name="date"></param>
/// <param name="isLiveMode"></param>
/// <returns></returns>
public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
{
try
{
var csv = line.Split(',');
var symbol = new Symbol(SecurityIdentifier.Parse(csv[0]), csv[1]);
return new Fundamental(date, symbol);
}
catch (Exception)
{
return null;
}
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public override BaseData Clone()
{
return new Fundamental(Time, Symbol);
}
/// <summary>
/// Creates the symbol used for coarse fundamental data
/// </summary>
/// <param name="market">The market</param>
/// <returns>A coarse universe symbol for the specified market</returns>
public static Symbol CreateUniverseSymbol(string market)
{
market = market.ToLowerInvariant();
var ticker = $"qc-universe-fundamental-{market}-{Guid.NewGuid()}";
var sid = SecurityIdentifier.GenerateEquity(SecurityIdentifier.DefaultDate, ticker, market);
return new Symbol(sid, ticker);
}
}
}

View File

@@ -13,59 +13,12 @@
* limitations under the License.
*/
using System;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Defines a merged viw of <see cref="FineFundamental"/> and <see cref="CoarseFundamental"/>
/// Lean fundamental data class
/// </summary>
public class Fundamentals : FineFundamental
public class Fundamentals : Fundamental
{
/// <summary>
/// Gets the market for this symbol
/// </summary>
public string Market { get; set; }
/// <summary>
/// Gets the day's dollar volume for this symbol
/// </summary>
public decimal DollarVolume { get; set; }
/// <summary>
/// Gets the day's total volume
/// </summary>
public long Volume { get; set; }
/// <summary>
/// Returns whether the symbol has fundamental data for the given date
/// </summary>
public bool HasFundamentalData { get; set; }
/// <summary>
/// Default constructor
/// </summary>
public Fundamentals()
{
DataType = MarketDataType.Auxiliary;
}
/// <summary>
/// Return the URL string source of the file. This will be converted to a stream
/// </summary>
public override SubscriptionDataSource GetSource(SubscriptionDataConfig config, DateTime date, bool isLiveMode)
{
throw new NotImplementedException($"{nameof(Fundamentals)}.{nameof(GetSource)} is never intended to be invoked.");
}
/// <summary>
/// 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.
/// </summary>
public override BaseData Reader(SubscriptionDataConfig config, string line, DateTime date, bool isLiveMode)
{
throw new NotImplementedException($"{nameof(Fundamentals)}.{nameof(Reader)} is never intended to be invoked.");
}
}
}
}

View File

@@ -0,0 +1,100 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// This is the simple average of the company's ROIC over the last 5 years. Return on invested capital is calculated by taking net operating profit after taxes and dividends and dividing by the total amount of capital invested and expressing the result as a percentage.
/// </summary>
public class AVG5YrsROIC : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "FiveYears";
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AVG5YrsROIC.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AVG5YrsROIC.FiveYears") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AVG5YrsROIC.FiveYears");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.AVG5YrsROIC.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AVG5YrsROIC()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AVG5YrsROIC(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Any money that a company owes its suppliers for goods and services purchased on credit and is expected to pay within the next year or operating cycle.
/// </summary>
public class AccountsPayableBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsPayable.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccountsPayable.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccountsPayableBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccountsPayableBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Accounts owed to a company by customers within a year as a result of exchanging goods or services on credit.
/// </summary>
public class AccountsReceivableBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccountsReceivable.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccountsReceivable.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccountsReceivableBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccountsReceivableBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// This account shows the amount of unpaid interest accrued to the date of purchase and included in the purchase price of securities purchased between interest dates.
/// </summary>
public class AccruedInterestReceivableBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInterestReceivable.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccruedInterestReceivable.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccruedInterestReceivableBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccruedInterestReceivableBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Interest, dividends, rents, ancillary and other revenues earned but not yet received by the entity on its investments.
/// </summary>
public class AccruedInvestmentIncomeBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInvestmentIncome.ThreeMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInvestmentIncome.SixMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInvestmentIncome.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInvestmentIncome.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedInvestmentIncome.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccruedInvestmentIncome.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccruedInvestmentIncomeBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccruedInvestmentIncomeBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Liabilities which have occurred, but have not been paid or logged under accounts payable during an accounting PeriodAsByte. In other words, obligations for goods and services provided to a company for which invoices have not yet been received; on a Non- Differentiated Balance Sheet.
/// </summary>
public class AccruedLiabilitiesTotalBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedLiabilitiesTotal.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedLiabilitiesTotal.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedLiabilitiesTotal.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedLiabilitiesTotal.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedLiabilitiesTotal.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccruedLiabilitiesTotal.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccruedLiabilitiesTotalBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccruedLiabilitiesTotalBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Sum of accrued liabilities and deferred income (amount received in advance but the services are not provided in respect of amount).
/// </summary>
public class AccruedandDeferredIncomeBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncome.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncome.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncome.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncome.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccruedandDeferredIncome.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccruedandDeferredIncomeBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccruedandDeferredIncomeBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Sum of Accrued Liabilities and Deferred Income (amount received in advance but the services are not provided in respect of amount) due within 1 year.
/// </summary>
public class AccruedandDeferredIncomeCurrentBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeCurrent.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeCurrent.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeCurrent.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeCurrent.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccruedandDeferredIncomeCurrent.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccruedandDeferredIncomeCurrentBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccruedandDeferredIncomeCurrentBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Sum of Accrued Liabilities and Deferred Income (amount received in advance but the services are not provided in respect of amount) due after 1 year.
/// </summary>
public class AccruedandDeferredIncomeNonCurrentBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeNonCurrent.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeNonCurrent.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeNonCurrent.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccruedandDeferredIncomeNonCurrent.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccruedandDeferredIncomeNonCurrent.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccruedandDeferredIncomeNonCurrentBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccruedandDeferredIncomeNonCurrentBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The cumulative amount of wear and tear or obsolescence charged against the fixed assets of a company.
/// </summary>
public class AccumulatedDepreciationBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AccumulatedDepreciation.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AccumulatedDepreciation.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AccumulatedDepreciationBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AccumulatedDepreciationBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders. Includes adjustments to additional paid in capital. There are two major categories of additional paid in capital: 1) Paid in capital in excess of par/stated value, which is the difference between the actual issue price of the shares and the shares' par/stated value. 2) Paid in capital from other transactions which includes treasury stock, retirement of stock, stock dividends recorded at market, lapse of stock purchase warrants, conversion of convertible bonds in excess of the par value of the stock, and any other additional capital from the company's own stock transactions.
/// </summary>
public class AdditionalPaidInCapitalBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdditionalPaidInCapital.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AdditionalPaidInCapital.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AdditionalPaidInCapitalBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AdditionalPaidInCapitalBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// This item is typically available for bank industry. It's the amount of borrowings as of the balance sheet date from the Federal Home Loan Bank, which are primarily used to cover shortages in the required reserve balance and liquidity shortages.
/// </summary>
public class AdvanceFromFederalHomeLoanBanksBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AdvanceFromFederalHomeLoanBanks.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AdvanceFromFederalHomeLoanBanksBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AdvanceFromFederalHomeLoanBanksBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Borrowings from the central bank, which are primarily used to cover shortages in the required reserve balance and liquidity shortages.
/// </summary>
public class AdvancesfromCentralBanksBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvancesfromCentralBanks.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvancesfromCentralBanks.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvancesfromCentralBanks.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AdvancesfromCentralBanks.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AdvancesfromCentralBanks.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AdvancesfromCentralBanksBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AdvancesfromCentralBanksBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash paid to tax authorities in operating cash flow, using the direct method
/// </summary>
public class AllTaxesPaidCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.OneMonth");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AllTaxesPaid.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.AllTaxesPaid.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AllTaxesPaidCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AllTaxesPaidCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// An Allowance for Doubtful Accounts measures receivables recorded but not expected to be collected.
/// </summary>
public class AllowanceForDoubtfulAccountsReceivableBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForDoubtfulAccountsReceivable.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForDoubtfulAccountsReceivable.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForDoubtfulAccountsReceivable.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForDoubtfulAccountsReceivable.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AllowanceForDoubtfulAccountsReceivable.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AllowanceForDoubtfulAccountsReceivableBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AllowanceForDoubtfulAccountsReceivableBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// A contra account sets aside as an allowance for bad loans (e.g. customer defaults).
/// </summary>
public class AllowanceForLoansAndLeaseLossesBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AllowanceForLoansAndLeaseLosses.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AllowanceForLoansAndLeaseLossesBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AllowanceForLoansAndLeaseLossesBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// This item is typically available for bank industry. It represents a provision relating to a written agreement to receive money with the terms of the note (at a specified future date(s) within one year from the reporting date (or the normal operating cycle, whichever is longer), consisting of principal as well as any accrued interest) for the portion that is expected to be uncollectible.
/// </summary>
public class AllowanceForNotesReceivableBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForNotesReceivable.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForNotesReceivable.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForNotesReceivable.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AllowanceForNotesReceivable.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AllowanceForNotesReceivable.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AllowanceForNotesReceivableBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AllowanceForNotesReceivableBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The systematic and rational apportionment of the acquisition cost of intangible operational assets to future periods in which the benefits contribute to revenue. This field is to include Amortization and any variation where Amortization is the first account listed in the line item, excluding Amortization of Intangibles.
/// </summary>
public class AmortizationCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.Amortization.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.Amortization.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The non-cash expense recognized on intangible assets over the benefit period of the asset.
/// </summary>
public class AmortizationIncomeStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.Amortization.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.IncomeStatement.Amortization.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationIncomeStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationIncomeStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The component of interest expense representing the non-cash expenses charged against earnings in the period to allocate debt discount and premium, and the costs to issue debt and obtain financing over the related debt instruments. This item is usually only available for bank industry.
/// </summary>
public class AmortizationOfFinancingCostsAndDiscountsCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.AmortizationOfFinancingCostsAndDiscounts.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationOfFinancingCostsAndDiscountsCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationOfFinancingCostsAndDiscountsCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The aggregate expense charged against earnings to allocate the cost of intangible assets (nonphysical assets not used in production) in a systematic and rational manner to the periods expected to benefit from such assets.
/// </summary>
public class AmortizationOfIntangiblesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.AmortizationOfIntangibles.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationOfIntangiblesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationOfIntangiblesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The aggregate expense charged against earnings to allocate the cost of intangible assets (nonphysical assets not used in production) in a systematic and rational manner to the periods expected to benefit from such assets.
/// </summary>
public class AmortizationOfIntangiblesIncomeStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationOfIntangibles.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.IncomeStatement.AmortizationOfIntangibles.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationOfIntangiblesIncomeStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationOfIntangiblesIncomeStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Represents amortization of the allocation of a lump sum amount to different time periods, particularly for securities, debt, loans, and other forms of financing. Does not include amortization, amortization of capital expenditure and intangible assets.
/// </summary>
public class AmortizationOfSecuritiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AmortizationOfSecurities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.AmortizationOfSecurities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationOfSecuritiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationOfSecuritiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The current period expense charged against earnings on intangible asset over its useful life. It is a supplemental value which would be reported outside consolidated statements.
/// </summary>
public class AmortizationSupplementalIncomeStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationSupplemental.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationSupplemental.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationSupplemental.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationSupplemental.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationSupplemental.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AmortizationSupplemental.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.IncomeStatement.AmortizationSupplemental.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AmortizationSupplementalIncomeStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AmortizationSupplementalIncomeStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -1,6 +1,6 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -11,278 +11,185 @@
* 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.
*
*/
//------------------------------------------------------------------------------
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
// To get up to date fundamental definition files for your hedgefund contact sales@quantconnect.com
using System;
using System.IO;
using System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Definition of the AssetClassification class
/// </summary>
public class AssetClassification
{
/// <summary>
/// The purpose of the Stock Types is to group companies according to the underlying fundamentals of their business. They answer the
/// question: If I buy this stock, what kind of company am I buying? Unlike the style box, the emphasis with the Stock Types is on
/// income statement, balance sheet, and cash-flow data-not price data or valuation multiples. We focus on the company, not the
/// stock. Morningstar calculates this figure in-house on a monthly basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3000
/// </remarks>
[JsonProperty("3000")]
public int StockType { get; set; }
/// <summary>
/// Definition of the AssetClassification class
/// </summary>
public readonly struct AssetClassification
{
/// <summary>
/// The purpose of the Stock Types is to group companies according to the underlying fundamentals of their business. They answer the question: If I buy this stock, what kind of company am I buying? Unlike the style box, the emphasis with the Stock Types is on income statement, balance sheet, and cash-flow data-not price data or valuation multiples. We focus on the company, not the stock. Morningstar calculates this figure in-house on a monthly basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3000
/// </remarks>
[JsonProperty("3000")]
public int StockType => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.StockType");
/// <summary>
/// The Morningstar Equity Style Box is a grid that provides a graphical representation of the investment style of stocks and portfolios.
/// It classifies securities according to market capitalization (the vertical axis) and value-growth scores (the horizontal axis) and allows
/// us to provide analysis on a 5-by-5 Style Box as well as providing the traditional style box assignment, which is the basis for the
/// Morningstar Category. Two of the style categories, value and growth, are common to both stocks and portfolios. However, for
/// stocks, the central column of the style box represents the core style (those stocks for which neither value nor growth
/// characteristics dominate); for portfolios, it represents the blend style.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3001
/// </remarks>
[JsonProperty("3001")]
public int StyleBox { get; set; }
/// <summary>
/// The Morningstar Equity Style Box is a grid that provides a graphical representation of the investment style of stocks and portfolios. It classifies securities according to market capitalization (the vertical axis) and value-growth scores (the horizontal axis) and allows us to provide analysis on a 5-by-5 Style Box as well as providing the traditional style box assignment, which is the basis for the Morningstar Category. Two of the style categories, value and growth, are common to both stocks and portfolios. However, for stocks, the central column of the style box represents the core style (those stocks for which neither value nor growth characteristics dominate); for portfolios, it represents the blend style.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3001
/// </remarks>
[JsonProperty("3001")]
public int StyleBox => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.StyleBox");
/// <summary>
/// The growth grade is based on the trend in revenue per share using data from the past five years. For the purpose of calculating
/// revenue per share we use the past five years' revenue figures and corresponding year-end fully diluted shares outstanding; if year-
/// end fully diluted shares outstanding is not available, we calculate this figure by dividing the company's reported net income
/// applicable to common shareholders by the reported fully diluted earnings per share. A company must have a minimum of four
/// consecutive years of positive and non-zero revenue, including the latest fiscal year, to qualify for a grade.
/// In calculating the revenue per share growth rate, we calculate the slope of the regression line of historical revenue per share. We
/// then divide the slope of the regression line by the arithmetic average of historical revenue per share figures. The result of the
/// regression is a normalized historical increase or decrease in the rate of growth for sales per share. We then calculate a z-score by
/// subtracting the universe mean revenue growth from the company's revenue growth, and dividing by the standard deviation of the
/// universe's growth rates.
/// Stocks are sorted based on the z-score of their revenue per share growth rate calculated above, from the most negative z-score to
/// the most positive z-score. Stocks are then ranked based on their z-score from 1 to the total number of qualified stocks. We assign
/// grades based on this ranking. Stocks are assigned A, B, C, D, or F. Morningstar calculates this figure in-house on a monthly basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3002
/// </remarks>
[JsonProperty("3002")]
public string GrowthGrade { get; set; }
/// <summary>
/// The growth grade is based on the trend in revenue per share using data from the past five years. For the purpose of calculating revenue per share we use the past five years' revenue figures and corresponding year-end fully diluted shares outstanding; if year- end fully diluted shares outstanding is not available, we calculate this figure by dividing the company's reported net income applicable to common shareholders by the reported fully diluted earnings per share. A company must have a minimum of four consecutive years of positive and non-zero revenue, including the latest fiscal year, to qualify for a grade. In calculating the revenue per share growth rate, we calculate the slope of the regression line of historical revenue per share. We then divide the slope of the regression line by the arithmetic average of historical revenue per share figures. The result of the regression is a normalized historical increase or decrease in the rate of growth for sales per share. We then calculate a z-score by subtracting the universe mean revenue growth from the company's revenue growth, and dividing by the standard deviation of the universe's growth rates. Stocks are sorted based on the z-score of their revenue per share growth rate calculated above, from the most negative z-score to the most positive z-score. Stocks are then ranked based on their z-score from 1 to the total number of qualified stocks. We assign grades based on this ranking. Stocks are assigned A, B, C, D, or F. Morningstar calculates this figure in-house on a monthly basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3002
/// </remarks>
[JsonProperty("3002")]
public string GrowthGrade => FundamentalService.Get<string>(_time, _securityIdentifier, "AssetClassification.GrowthGrade");
/// <summary>
/// Instead of using accounting-based ratios to formulate a measure to reflect the financial health of a firm, we use structural or
/// contingent claim models. Structural models take advantage of both market information and accounting financial information. The
/// firm's equity in such models is viewed as a call option on the value of the firm's assets. If the value of the assets is not sufficient to
/// cover the firm's liabilities (the strike price), default is expected to occur, and the call option expires worthless and the firm is turned
/// over to its creditors. To estimate a distance to default, the value of the firm's liabilities is obtained from the firm's latest balance
/// sheet and incorporated into the model. We then rank the calculated distance to default and award 10% of the universe A's, 20%
/// B's, 40% C's, 20% D's, and 10% F's. Morningstar calculates this figure in-house on a daily basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3003
/// </remarks>
[JsonProperty("3003")]
public string FinancialHealthGrade { get; set; }
/// <summary>
/// Instead of using accounting-based ratios to formulate a measure to reflect the financial health of a firm, we use structural or contingent claim models. Structural models take advantage of both market information and accounting financial information. The firm's equity in such models is viewed as a call option on the value of the firm's assets. If the value of the assets is not sufficient to cover the firm's liabilities (the strike price), default is expected to occur, and the call option expires worthless and the firm is turned over to its creditors. To estimate a distance to default, the value of the firm's liabilities is obtained from the firm's latest balance sheet and incorporated into the model. We then rank the calculated distance to default and award 10% of the universe A's, 20% B's, 40% C's, 20% D's, and 10% F's. Morningstar calculates this figure in-house on a daily basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3003
/// </remarks>
[JsonProperty("3003")]
public string FinancialHealthGrade => FundamentalService.Get<string>(_time, _securityIdentifier, "AssetClassification.FinancialHealthGrade");
/// <summary>
/// The profitability grade for all qualified companies in Morningstar's stock universe is based on valuation of return on shareholders'
/// equity (ROE) using data from the past five years. Morningstar's universe of stocks is first filtered for adequacy of historical ROE
/// figures. Companies with less than four years of consecutive ROE figures including the ROE figure for the latest fiscal year are tossed
/// from calculations and are assigned "--" for the profitability grade. For the remaining qualified universe of stocks the profitability
/// grade is based on the valuation of the following three components, which are assigned different weights; the historical growth rate
/// of ROE, the average level of historical ROE, the level of ROE in the latest fiscal year of the company.
/// Stocks are assigned A, B, C, D, or F. Morningstar calculates this figure in-house on a monthly basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3004
/// </remarks>
[JsonProperty("3004")]
public string ProfitabilityGrade { get; set; }
/// <summary>
/// The profitability grade for all qualified companies in Morningstar's stock universe is based on valuation of return on shareholders' equity (ROE) using data from the past five years. Morningstar's universe of stocks is first filtered for adequacy of historical ROE figures. Companies with less than four years of consecutive ROE figures including the ROE figure for the latest fiscal year are tossed from calculations and are assigned "--" for the profitability grade. For the remaining qualified universe of stocks the profitability grade is based on the valuation of the following three components, which are assigned different weights; the historical growth rate of ROE, the average level of historical ROE, the level of ROE in the latest fiscal year of the company. Stocks are assigned A, B, C, D, or F. Morningstar calculates this figure in-house on a monthly basis.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3004
/// </remarks>
[JsonProperty("3004")]
public string ProfitabilityGrade => FundamentalService.Get<string>(_time, _securityIdentifier, "AssetClassification.ProfitabilityGrade");
/// <summary>
/// Equities are mapped into one of 148 industries, the one which most accurately reflects the underlying business of that company.
/// This mapping is based on publicly available information about each company and uses annual reports, Form
/// 10-Ks and Morningstar Equity Analyst input as its primary source. Other secondary sources of information may include company
/// web sites, sell-side research (if available) and trade publications. By and large, equities are mapped into the industries that best
/// reflect each company's largest source of revenue and income. If the company has more than three sources of revenue and income
/// and there is no clear dominant revenue and income stream, the company is assigned to the Conglomerates industry. Based on
/// Morningstar analyst research or other third party information, Morningstar may change industry assignments to more accurately
/// reflect the changing businesses of companies.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3005
/// </remarks>
[JsonProperty("3005")]
public int MorningstarIndustryCode { get; set; }
/// <summary>
/// Equities are mapped into one of 148 industries, the one which most accurately reflects the underlying business of that company. This mapping is based on publicly available information about each company and uses annual reports, Form 10-Ks and Morningstar Equity Analyst input as its primary source. Other secondary sources of information may include company web sites, sell-side research (if available) and trade publications. By and large, equities are mapped into the industries that best reflect each company's largest source of revenue and income. If the company has more than three sources of revenue and income and there is no clear dominant revenue and income stream, the company is assigned to the Conglomerates industry. Based on Morningstar analyst research or other third party information, Morningstar may change industry assignments to more accurately reflect the changing businesses of companies.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3005
/// </remarks>
[JsonProperty("3005")]
public int MorningstarIndustryCode => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.MorningstarIndustryCode");
/// <summary>
/// Industries are mapped into 69 industry groups based on their common operational characteristics. If a particular industry has unique
/// operating characteristics-or simply lacks commonality with other industries-it would map into its own group. However, any
/// industry group containing just one single industry does not necessarily imply that that industry is dominant or otherwise important.
/// The assignment simply reflects the lack of a sufficient amount of shared traits among industries. See appendix for mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3006
/// </remarks>
[JsonProperty("3006")]
public int MorningstarIndustryGroupCode { get; set; }
/// <summary>
/// Industries are mapped into 69 industry groups based on their common operational characteristics. If a particular industry has unique operating characteristics-or simply lacks commonality with other industries-it would map into its own group. However, any industry group containing just one single industry does not necessarily imply that that industry is dominant or otherwise important. The assignment simply reflects the lack of a sufficient amount of shared traits among industries. See appendix for mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3006
/// </remarks>
[JsonProperty("3006")]
public int MorningstarIndustryGroupCode => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.MorningstarIndustryGroupCode");
/// <summary>
/// Industry groups are consolidated into 11 sectors. See appendix for mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3007
/// </remarks>
[JsonProperty("3007")]
public int MorningstarSectorCode { get; set; }
/// <summary>
/// Industry groups are consolidated into 11 sectors. See appendix for mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3007
/// </remarks>
[JsonProperty("3007")]
public int MorningstarSectorCode => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.MorningstarSectorCode");
/// <summary>
/// Sectors are consolidated into three major economic spheres or Super Sectors: Cyclical, Defensive and Sensitive. See appendix for
/// mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3008
/// </remarks>
[JsonProperty("3008")]
public int MorningstarEconomySphereCode { get; set; }
/// <summary>
/// Sectors are consolidated into three major economic spheres or Super Sectors: Cyclical, Defensive and Sensitive. See appendix for mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3008
/// </remarks>
[JsonProperty("3008")]
public int MorningstarEconomySphereCode => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.MorningstarEconomySphereCode");
/// <summary>
/// Standard Industrial Classification System (SIC) is a system for classifying a business according to economic activity. See separate
/// reference document for a list of Sic Codes/Mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3009
/// </remarks>
[JsonProperty("3009")]
public int SIC { get; set; }
/// <summary>
/// Standard Industrial Classification System (SIC) is a system for classifying a business according to economic activity. See separate reference document for a list of Sic Codes/Mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3009
/// </remarks>
[JsonProperty("3009")]
public int SIC => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.SIC");
/// <summary>
/// An acronym for North American Industry Classification System, it is a 6 digit numerical classification assigned to individual
/// companies. Developed jointly by the U.S., Canada, and Mexico to provide new comparability in statistics about business activity
/// across North America. It is intended to replace the U.S. Standard Industrial Classification (SIC) system. See separate reference
/// document for a list of NAICS Codes/Mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3010
/// </remarks>
[JsonProperty("3010")]
public int NAICS { get; set; }
/// <summary>
/// An acronym for North American Industry Classification System, it is a 6 digit numerical classification assigned to individual companies. Developed jointly by the U.S., Canada, and Mexico to provide new comparability in statistics about business activity across North America. It is intended to replace the U.S. Standard Industrial Classification (SIC) system. See separate reference document for a list of NAICS Codes/Mappings.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3010
/// </remarks>
[JsonProperty("3010")]
public int NAICS => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.NAICS");
/// <summary>
/// The scores for a stock's value and growth characteristics determine its horizontal placement. The Value-Growth Score is a
/// reflection of the aggregate expectations of market participants for the future growth and required rate of return for a stock. We
/// infer these expectations from the relation between current market prices and future growth and cost of capital expectations under
/// the assumption of rational market participants and a simple model of stock value.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3011
/// </remarks>
[JsonProperty("3011")]
public decimal StyleScore { get; set; }
/// <summary>
/// The scores for a stock's value and growth characteristics determine its horizontal placement. The Value-Growth Score is a reflection of the aggregate expectations of market participants for the future growth and required rate of return for a stock. We infer these expectations from the relation between current market prices and future growth and cost of capital expectations under the assumption of rational market participants and a simple model of stock value.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3011
/// </remarks>
[JsonProperty("3011")]
public double StyleScore => FundamentalService.Get<double>(_time, _securityIdentifier, "AssetClassification.StyleScore");
/// <summary>
/// Rather than a fixed number of large cap or small cap stocks, Morningstar uses a flexible system that isn't adversely affected by
/// overall movements in the market. The Morningstar stock universe represents approximately 99% of the U.S. market for actively
/// traded stocks. Giant-cap stocks are defined as the group that accounts for the top 40% of the capitalization of the Morningstar
/// domestic stock universe; large-cap stocks represent the next 30%; mid-cap stocks represent the next 20%; small-cap stocks
/// represent the next 7%; and micro-cap stocks represent the remaining 3%. Each stock is given a Size Score that ranges from -100
/// (very micro) to 400 (very giant). When classifying stocks to a Style Box, giant is included in large and micro is included in small.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3012
/// </remarks>
[JsonProperty("3012")]
public decimal SizeScore { get; set; }
/// <summary>
/// Rather than a fixed number of large cap or small cap stocks, Morningstar uses a flexible system that isn't adversely affected by overall movements in the market. The Morningstar stock universe represents approximately 99% of the U.S. market for actively traded stocks. Giant-cap stocks are defined as the group that accounts for the top 40% of the capitalization of the Morningstar domestic stock universe; large-cap stocks represent the next 30%; mid-cap stocks represent the next 20%; small-cap stocks represent the next 7%; and micro-cap stocks represent the remaining 3%. Each stock is given a Size Score that ranges from -100 (very micro) to 400 (very giant). When classifying stocks to a Style Box, giant is included in large and micro is included in small.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3012
/// </remarks>
[JsonProperty("3012")]
public double SizeScore => FundamentalService.Get<double>(_time, _securityIdentifier, "AssetClassification.SizeScore");
/// <summary>
/// A high overall growth score indicates that a stock's per-share earnings, book value, revenues, and cash flow are expected to grow
/// quickly relative to other stocks in the same scoring group. A weak growth orientation does not necessarily mean that a stock has a
/// strong value orientation.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3013
/// </remarks>
[JsonProperty("3013")]
public decimal GrowthScore { get; set; }
/// <summary>
/// A high overall growth score indicates that a stock's per-share earnings, book value, revenues, and cash flow are expected to grow quickly relative to other stocks in the same scoring group. A weak growth orientation does not necessarily mean that a stock has a strong value orientation.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3013
/// </remarks>
[JsonProperty("3013")]
public double GrowthScore => FundamentalService.Get<double>(_time, _securityIdentifier, "AssetClassification.GrowthScore");
/// <summary>
/// A high value score indicates that a stock's price is relatively low, given the anticipated per-sharing earnings, book value, revenues,
/// cash flow, and dividends that the stock provides to investors. A high price relative to these measures indicates that a stock's value
/// orientation is weak, but it does not necessarily mean that the stock is growth-oriented.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3014
/// </remarks>
[JsonProperty("3014")]
public decimal ValueScore { get; set; }
/// <summary>
/// A high value score indicates that a stock's price is relatively low, given the anticipated per-sharing earnings, book value, revenues, cash flow, and dividends that the stock provides to investors. A high price relative to these measures indicates that a stock's value orientation is weak, but it does not necessarily mean that the stock is growth-oriented.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3014
/// </remarks>
[JsonProperty("3014")]
public double ValueScore => FundamentalService.Get<double>(_time, _securityIdentifier, "AssetClassification.ValueScore");
/// <summary>
/// NACE is a European standard classification of economic activities maintained by Eurostat.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3015
/// </remarks>
[JsonProperty("3015")]
public decimal NACE { get; set; }
/// <summary>
/// NACE is a European standard classification of economic activities maintained by Eurostat.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3015
/// </remarks>
[JsonProperty("3015")]
public double NACE => FundamentalService.Get<double>(_time, _securityIdentifier, "AssetClassification.NACE");
/// <summary>
/// Similar to NAICS (data point 3010, above), this is specifically for Canadian classifications.
/// An acronym for North American Industry Classification System, it is a 6 digit numerical classification assigned to individual
/// companies. Developed jointly by the U.S., Canada, and Mexico to provide new comparability in statistics about business activity
/// across North America. It is intended to replace the U.S. Standard Industrial Classification (SIC) system. See separate reference
/// document for a list of NAICS Codes/Mappings.
/// The initial SIC and NAICS listed is the Primary based on revenue generation; followed by Secondary SIC and NAICS when
/// applicable. Both SIC and NAICS are manually collected and assigned.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3016
/// </remarks>
[JsonProperty("3016")]
public int CANNAICS { get; set; }
/// <summary>
/// Similar to NAICS (data point 3010, above), this is specifically for Canadian classifications. An acronym for North American Industry Classification System, it is a 6 digit numerical classification assigned to individual companies. Developed jointly by the U.S., Canada, and Mexico to provide new comparability in statistics about business activity across North America. It is intended to replace the U.S. Standard Industrial Classification (SIC) system. See separate reference document for a list of NAICS Codes/Mappings. The initial SIC and NAICS listed is the Primary based on revenue generation; followed by Secondary SIC and NAICS when applicable. Both SIC and NAICS are manually collected and assigned.
/// </summary>
/// <remarks>
/// Morningstar DataId: 3016
/// </remarks>
[JsonProperty("3016")]
public int CANNAICS => FundamentalService.Get<int>(_time, _securityIdentifier, "AssetClassification.CANNAICS");
/// <summary>
/// Creates an instance of the AssetClassification class
/// </summary>
public AssetClassification()
{
}
private readonly DateTime _time;
private readonly SecurityIdentifier _securityIdentifier;
/// <summary>
/// Applies updated values from <paramref name="update"/> to this instance
/// </summary>
/// <remarks>Used to apply data updates to the current instance. This WILL overwrite existing values. Default update values are ignored.</remarks>
/// <param name="update">The next data update for this instance</param>
public void UpdateValues(AssetClassification update)
{
if (update == null) return;
if (update.StockType != default(int)) StockType = update.StockType;
if (update.StyleBox != default(int)) StyleBox = update.StyleBox;
if (!string.IsNullOrWhiteSpace(update.GrowthGrade)) GrowthGrade = update.GrowthGrade;
if (!string.IsNullOrWhiteSpace(update.FinancialHealthGrade)) FinancialHealthGrade = update.FinancialHealthGrade;
if (!string.IsNullOrWhiteSpace(update.ProfitabilityGrade)) ProfitabilityGrade = update.ProfitabilityGrade;
if (update.MorningstarIndustryCode != default(int)) MorningstarIndustryCode = update.MorningstarIndustryCode;
if (update.MorningstarIndustryGroupCode != default(int)) MorningstarIndustryGroupCode = update.MorningstarIndustryGroupCode;
if (update.MorningstarSectorCode != default(int)) MorningstarSectorCode = update.MorningstarSectorCode;
if (update.MorningstarEconomySphereCode != default(int)) MorningstarEconomySphereCode = update.MorningstarEconomySphereCode;
if (update.SIC != default(int)) SIC = update.SIC;
if (update.NAICS != default(int)) NAICS = update.NAICS;
if (update.StyleScore != default(decimal)) StyleScore = update.StyleScore;
if (update.SizeScore != default(decimal)) SizeScore = update.SizeScore;
if (update.GrowthScore != default(decimal)) GrowthScore = update.GrowthScore;
if (update.ValueScore != default(decimal)) ValueScore = update.ValueScore;
if (update.NACE != default(decimal)) NACE = update.NACE;
if (update.CANNAICS != default(int)) CANNAICS = update.CANNAICS;
}
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetClassification(DateTime time, SecurityIdentifier securityIdentifier)
{
_time = time;
_securityIdentifier = securityIdentifier;
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The charge against earnings resulting from the aggregate write down of all assets from their carrying value to their fair value.
/// </summary>
public class AssetImpairmentChargeCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.AssetImpairmentCharge.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.AssetImpairmentCharge.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetImpairmentChargeCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetImpairmentChargeCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// This item is typically available for bank industry. It's a part of long-lived assets, which has been decided for sale in the future.
/// </summary>
public class AssetsHeldForSaleBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSale.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSale.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSale.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSale.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AssetsHeldForSale.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetsHeldForSaleBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetsHeldForSaleBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Short term assets set apart for sale to liquidate in the future and are measured at the lower of carrying amount and fair value less costs to sell.
/// </summary>
public class AssetsHeldForSaleCurrentBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleCurrent.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleCurrent.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleCurrent.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleCurrent.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AssetsHeldForSaleCurrent.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetsHeldForSaleCurrentBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetsHeldForSaleCurrentBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Long term assets set apart for sale to liquidate in the future and are measured at the lower of carrying amount and fair value less costs to sell.
/// </summary>
public class AssetsHeldForSaleNonCurrentBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleNonCurrent.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleNonCurrent.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleNonCurrent.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsHeldForSaleNonCurrent.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AssetsHeldForSaleNonCurrent.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetsHeldForSaleNonCurrentBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetsHeldForSaleNonCurrentBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// A portion of a company's business that has been disposed of or sold.
/// </summary>
public class AssetsOfDiscontinuedOperationsBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsOfDiscontinuedOperations.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsOfDiscontinuedOperations.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsOfDiscontinuedOperations.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsOfDiscontinuedOperations.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AssetsOfDiscontinuedOperations.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetsOfDiscontinuedOperationsBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetsOfDiscontinuedOperationsBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Total value collateral assets pledged to the bank that can be sold or used as collateral for other loans.
/// </summary>
public class AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotalBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotal.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotal.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotal.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotal.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotal.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotalBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetsPledgedasCollateralSubjecttoSaleorRepledgingTotalBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Revenue / Average Total Assets
/// </summary>
public class AssetsTurnover : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AssetsTurnover.OneYear");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AssetsTurnover.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AssetsTurnover.SixMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AssetsTurnover.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.AssetsTurnover.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.AssetsTurnover.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AssetsTurnover()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AssetsTurnover(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// For an unclassified balance sheet, this item represents equity securities categorized neither as held-to-maturity nor trading. Equity securities represent ownership interests or the right to acquire ownership interests in corporations and other legal entities which ownership interest is represented by shares of common or preferred stock (which is not mandatory redeemable or redeemable at the option of the holder), convertible securities, stock rights, or stock warrants. This category includes preferred stocks, available- for-sale and common stock, available-for-sale.
/// </summary>
public class AvailableForSaleSecuritiesBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AvailableForSaleSecurities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AvailableForSaleSecurities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AvailableForSaleSecurities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AvailableForSaleSecurities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AvailableForSaleSecurities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.AvailableForSaleSecurities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.AvailableForSaleSecurities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AvailableForSaleSecuritiesBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AvailableForSaleSecuritiesBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Adjustments to reported net income to calculate Diluted EPS, by assuming that all convertible instruments are converted to Common Equity. The adjustments usually include the interest expense of debentures when assumed converted and preferred dividends of convertible preferred stock when assumed converted.
/// </summary>
public class AverageDilutionEarningsIncomeStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AverageDilutionEarnings.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AverageDilutionEarnings.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AverageDilutionEarnings.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AverageDilutionEarnings.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AverageDilutionEarnings.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.IncomeStatement.AverageDilutionEarnings.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.IncomeStatement.AverageDilutionEarnings.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public AverageDilutionEarningsIncomeStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public AverageDilutionEarningsIncomeStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// All indebtedness for borrowed money or the deferred purchase price of property or services, including without limitation reimbursement and other obligations with respect to surety bonds and letters of credit, all obligations evidenced by notes, bonds debentures or similar instruments, all capital lease obligations and all contingent obligations.
/// </summary>
public class BankIndebtednessBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankIndebtedness.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankIndebtedness.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankIndebtedness.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankIndebtedness.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BankIndebtedness.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BankIndebtednessBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BankIndebtednessBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// A debt financing obligation issued by a bank or similar financial institution to a company, that entitles the lender or holder of the instrument to interest payments and the repayment of principal at a specified time within the next 12 months or operating cycle.
/// </summary>
public class BankLoansCurrentBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansCurrent.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansCurrent.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansCurrent.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansCurrent.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BankLoansCurrent.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BankLoansCurrentBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BankLoansCurrentBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// A debt financing obligation issued by a bank or similar financial institution to a company, that entitles the lender or holder of the instrument to interest payments and the repayment of principal at a specified time beyond the current accounting PeriodAsByte.
/// </summary>
public class BankLoansNonCurrentBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansNonCurrent.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansNonCurrent.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansNonCurrent.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansNonCurrent.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BankLoansNonCurrent.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BankLoansNonCurrentBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BankLoansNonCurrentBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Total debt financing obligation issued by a bank or similar financial institution to a company that entitles the lender or holder of the instrument to interest payments and the repayment of principal at a specified time; in a Non-Differentiated Balance Sheet.
/// </summary>
public class BankLoansTotalBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansTotal.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansTotal.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansTotal.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankLoansTotal.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BankLoansTotal.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BankLoansTotalBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BankLoansTotalBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The carrying amount of a life insurance policy on an officer, executive or employee for which the reporting entity (a bank) is entitled to proceeds from the policy upon death of the insured or surrender of the insurance policy.
/// </summary>
public class BankOwnedLifeInsuranceBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BankOwnedLifeInsurance.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BankOwnedLifeInsuranceBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BankOwnedLifeInsuranceBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Basic EPS from the Cumulative Effect of Accounting Change is the earnings attributable to the accounting change (during the reporting period) divided by the weighted average number of common shares outstanding.
/// </summary>
public class BasicAccountingChange : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAccountingChange.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAccountingChange.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAccountingChange.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAccountingChange.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAccountingChange.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAccountingChange.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicAccountingChange.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicAccountingChange()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicAccountingChange(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The shares outstanding used to calculate Basic EPS, which is the weighted average common share outstanding through the whole accounting PeriodAsByte. Note: If Basic Average Shares are not presented by the firm in the Income Statement, this data point will be null.
/// </summary>
public class BasicAverageShares : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicAverageShares.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicAverageShares.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicAverageShares()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicAverageShares(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Basic EPS from Continuing Operations is the earnings from continuing operations reported by the company divided by the weighted average number of common shares outstanding.
/// </summary>
public class BasicContinuousOperations : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicContinuousOperations.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicContinuousOperations.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicContinuousOperations()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicContinuousOperations(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Basic EPS from Discontinued Operations is the earnings from discontinued operations reported by the company divided by the weighted average number of common shares outstanding. This only includes gain or loss from discontinued operations.
/// </summary>
public class BasicDiscontinuousOperations : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicDiscontinuousOperations.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicDiscontinuousOperations.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicDiscontinuousOperations()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicDiscontinuousOperations(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Basic EPS is the bottom line net income divided by the weighted average number of common shares outstanding.
/// </summary>
public class BasicEPS : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPS.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicEPS.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicEPS()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicEPS(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Basic EPS from the Other Gains/Losses is the earnings attributable to the other gains/losses (during the reporting period) divided by the weighted average number of common shares outstanding.
/// </summary>
public class BasicEPSOtherGainsLosses : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPSOtherGainsLosses.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPSOtherGainsLosses.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPSOtherGainsLosses.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPSOtherGainsLosses.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPSOtherGainsLosses.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicEPSOtherGainsLosses.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicEPSOtherGainsLosses.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicEPSOtherGainsLosses()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicEPSOtherGainsLosses(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Basic EPS from the Extraordinary Gains/Losses is the earnings attributable to the gains or losses (during the reporting period) from extraordinary items divided by the weighted average number of common shares outstanding.
/// </summary>
public class BasicExtraordinary : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningReports.BasicExtraordinary.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningReports.BasicExtraordinary.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BasicExtraordinary()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BasicExtraordinary(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The cash and equivalents balance at the beginning of the accounting period, as indicated on the Cash Flow statement.
/// </summary>
public class BeginningCashPositionCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.BeginningCashPosition.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.BeginningCashPosition.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BeginningCashPositionCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BeginningCashPositionCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,106 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Biological assets include plants and animals.
/// </summary>
public class BiologicalAssetsBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BiologicalAssets.ThreeMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BiologicalAssets.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BiologicalAssets.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BiologicalAssets.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BiologicalAssets.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BiologicalAssetsBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BiologicalAssetsBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The growth in the company's book value per share on a percentage basis. Morningstar calculates the growth percentage based on the common shareholder's equity reported in the Balance Sheet divided by the diluted shares outstanding within the company filings or reports.
/// </summary>
public class BookValuePerShareGrowth : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningRatios.BookValuePerShareGrowth.OneYear");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningRatios.BookValuePerShareGrowth.ThreeMonths");
/// <summary>
/// Gets/sets the ThreeYears period value for the field
/// </summary>
[JsonProperty("3Y")]
public double ThreeYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningRatios.BookValuePerShareGrowth.ThreeYears");
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningRatios.BookValuePerShareGrowth.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningRatios.BookValuePerShareGrowth.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "EarningRatios.BookValuePerShareGrowth.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("3Y",ThreeYears), new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"EarningRatios.BookValuePerShareGrowth.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BookValuePerShareGrowth()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BookValuePerShareGrowth(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Fixed assets that specifically deal with the facilities a company owns. Include the improvements associated with buildings.
/// </summary>
public class BuildingsAndImprovementsBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.BuildingsAndImprovements.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.BuildingsAndImprovements.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public BuildingsAndImprovementsBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public BuildingsAndImprovementsBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The growth in the company's cash flow from operations on a percentage basis. Morningstar calculates the growth percentage based on the underlying cash flow from operations data reported in the Cash Flow Statement within the company filings or reports.
/// </summary>
public class CFOGrowth : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CFOGrowth.OneYear");
/// <summary>
/// Gets/sets the ThreeYears period value for the field
/// </summary>
[JsonProperty("3Y")]
public double ThreeYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CFOGrowth.ThreeYears");
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CFOGrowth.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CFOGrowth.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CFOGrowth.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3Y",ThreeYears), new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CFOGrowth.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CFOGrowth()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CFOGrowth(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The growth in the company's capital expenditures on a percentage basis. Morningstar calculates the growth percentage based on the capital expenditures reported in the Cash Flow Statement within the company filings or reports.
/// </summary>
public class CapExGrowth : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExGrowth.OneYear");
/// <summary>
/// Gets/sets the ThreeYears period value for the field
/// </summary>
[JsonProperty("3Y")]
public double ThreeYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExGrowth.ThreeYears");
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExGrowth.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExGrowth.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExGrowth.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3Y",ThreeYears), new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CapExGrowth.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapExGrowth()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapExGrowth(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Capital expenditure, capitalized software development cost, maintenance capital expenditure, etc. as reported by the company.
/// </summary>
public class CapExReportedCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapExReported.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CapExReported.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapExReportedCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapExReportedCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,100 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Capital Expenditure / Revenue
/// </summary>
public class CapExSalesRatio : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExSalesRatio.OneYear");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExSalesRatio.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapExSalesRatio.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CapExSalesRatio.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapExSalesRatio()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapExSalesRatio(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// This is the compound annual growth rate of the company's capital spending over the last 5 years. Capital Spending is the sum of the Capital Expenditure items found in the Statement of Cash Flows.
/// </summary>
public class CapitalExpenditureAnnual5YrGrowth : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpenditureAnnual5YrGrowth.OneYear");
/// <summary>
/// Gets/sets the ThreeYears period value for the field
/// </summary>
[JsonProperty("3Y")]
public double ThreeYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpenditureAnnual5YrGrowth.ThreeYears");
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpenditureAnnual5YrGrowth.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpenditureAnnual5YrGrowth.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpenditureAnnual5YrGrowth.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3Y",ThreeYears), new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CapitalExpenditureAnnual5YrGrowth.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapitalExpenditureAnnual5YrGrowth()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapitalExpenditureAnnual5YrGrowth(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Funds used by a company to acquire or upgrade physical assets such as property, industrial buildings or equipment. This type of outlay is made by companies to maintain or increase the scope of their operations. Capital expenditures are generally depreciated or depleted over their useful life, as distinguished from repairs, which are subtracted from the income of the current year.
/// </summary>
public class CapitalExpenditureCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CapitalExpenditure.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CapitalExpenditure.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapitalExpenditureCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapitalExpenditureCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,100 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Measures the amount a company is investing in its business relative to EBITDA generated in a given PeriodAsByte.
/// </summary>
public class CapitalExpendituretoEBITDA : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpendituretoEBITDA.OneYear");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpendituretoEBITDA.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CapitalExpendituretoEBITDA.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CapitalExpendituretoEBITDA.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapitalExpendituretoEBITDA()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapitalExpendituretoEBITDA(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Current Portion of Capital Lease Obligation plus Long Term Portion of Capital Lease Obligation.
/// </summary>
public class CapitalLeaseObligationsBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalLeaseObligations.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CapitalLeaseObligations.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapitalLeaseObligationsBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapitalLeaseObligationsBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The total amount of stock authorized for issue by a corporation, including common and preferred stock.
/// </summary>
public class CapitalStockBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CapitalStock.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CapitalStock.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CapitalStockBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CapitalStockBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,100 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash outlay for cash advances and loans made to other parties.
/// </summary>
public class CashAdvancesandLoansMadetoOtherPartiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashAdvancesandLoansMadetoOtherParties.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashAdvancesandLoansMadetoOtherParties.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashAdvancesandLoansMadetoOtherParties.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashAdvancesandLoansMadetoOtherParties.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashAdvancesandLoansMadetoOtherPartiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashAdvancesandLoansMadetoOtherPartiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Includes unrestricted cash on hand, money market instruments and other debt securities which can be converted to cash immediately.
/// </summary>
public class CashAndCashEquivalentsBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndCashEquivalents.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CashAndCashEquivalents.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashAndCashEquivalentsBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashAndCashEquivalentsBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Includes cash on hand (currency and coin), cash items in process of collection, non-interest bearing deposits due from other financial institutions (including corporate credit unions), and balances with the Federal Reserve Banks, Federal Home Loan Banks and central banks.
/// </summary>
public class CashAndDueFromBanksBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndDueFromBanks.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndDueFromBanks.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndDueFromBanks.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndDueFromBanks.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndDueFromBanks.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashAndDueFromBanks.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CashAndDueFromBanks.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashAndDueFromBanksBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashAndDueFromBanksBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash includes currency on hand as well as demand deposits with banks or financial institutions. It also includes other kinds of accounts that have the general characteristics of demand deposits in that the customer may deposit additional funds at any time and also effectively may withdraw funds at any time without prior notice or penalty.
/// </summary>
public class CashBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.Cash.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.Cash.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The aggregate amount of cash, cash equivalents, and federal funds sold.
/// </summary>
public class CashCashEquivalentsAndFederalFundsSoldBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CashCashEquivalentsAndFederalFundsSold.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashCashEquivalentsAndFederalFundsSoldBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashCashEquivalentsAndFederalFundsSoldBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The aggregate amount of cash, cash equivalents, and marketable securities.
/// </summary>
public class CashCashEquivalentsAndMarketableSecuritiesBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CashCashEquivalentsAndMarketableSecurities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashCashEquivalentsAndMarketableSecuritiesBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashCashEquivalentsAndMarketableSecuritiesBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Days In Inventory + Days In Sales - Days In Payment
/// </summary>
public class CashConversionCycle : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashConversionCycle.OneYear");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashConversionCycle.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashConversionCycle.SixMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashConversionCycle.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashConversionCycle.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CashConversionCycle.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashConversionCycle()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashConversionCycle(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash Distribution of earnings to Minority Stockholders.
/// </summary>
public class CashDividendsForMinoritiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsForMinorities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsForMinorities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsForMinorities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsForMinorities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsForMinorities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsForMinorities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashDividendsForMinorities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashDividendsForMinoritiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashDividendsForMinoritiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,130 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Payments for the cash dividends declared by an entity to shareholders during the PeriodAsByte. This element includes paid and unpaid dividends declared during the period for both common and preferred stock.
/// </summary>
public class CashDividendsPaidCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.OneMonth");
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashDividendsPaid.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashDividendsPaid.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashDividendsPaidCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashDividendsPaidCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash equivalents, excluding items classified as marketable securities, include short-term, highly liquid investments that are both readily convertible to known amounts of cash, and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates. Generally, only investments with original maturities of three months or less qualify under this definition. Original maturity means original maturity to the entity holding the investment. For example, both a three-month US Treasury bill and a three-year Treasury note purchased three months from maturity qualify as cash equivalents. However, a Treasury note purchased three years ago does not become a cash equivalent when its remaining maturity is three months.
/// </summary>
public class CashEquivalentsBalanceSheet : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashEquivalents.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashEquivalents.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashEquivalents.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashEquivalents.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashEquivalents.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.BalanceSheet.CashEquivalents.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.BalanceSheet.CashEquivalents.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashEquivalentsBalanceSheet()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashEquivalentsBalanceSheet(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash generated by or used in financing activities of continuing operations; excludes cash flows from discontinued operations.
/// </summary>
public class CashFlowFromContinuingFinancingActivitiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashFlowFromContinuingFinancingActivities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowFromContinuingFinancingActivitiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowFromContinuingFinancingActivitiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash generated by or used in investing activities of continuing operations; excludes cash flows from discontinued operations.
/// </summary>
public class CashFlowFromContinuingInvestingActivitiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashFlowFromContinuingInvestingActivities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowFromContinuingInvestingActivitiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowFromContinuingInvestingActivitiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash generated by or used in operating activities of continuing operations; excludes cash flows from discontinued operations.
/// </summary>
public class CashFlowFromContinuingOperatingActivitiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the TwoMonths period value for the field
/// </summary>
[JsonProperty("2M")]
public double TwoMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.TwoMonths");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("2M",TwoMonths), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashFlowFromContinuingOperatingActivities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowFromContinuingOperatingActivitiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowFromContinuingOperatingActivitiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The aggregate amount of cash flow from discontinued operation, including operating activities, investing activities, and financing activities.
/// </summary>
public class CashFlowFromDiscontinuedOperationCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashFlowFromDiscontinuedOperation.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowFromDiscontinuedOperationCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowFromDiscontinuedOperationCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The growth in the company's cash flows from financing on a percentage basis. Morningstar calculates the growth percentage based on the financing cash flows reported in the Cash Flow Statement within the company filings or reports.
/// </summary>
public class CashFlowfromFinancingGrowth : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromFinancingGrowth.OneYear");
/// <summary>
/// Gets/sets the ThreeYears period value for the field
/// </summary>
[JsonProperty("3Y")]
public double ThreeYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromFinancingGrowth.ThreeYears");
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromFinancingGrowth.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromFinancingGrowth.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromFinancingGrowth.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3Y",ThreeYears), new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CashFlowfromFinancingGrowth.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowfromFinancingGrowth()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowfromFinancingGrowth(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,112 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The growth in the company's cash flows from investing on a percentage basis. Morningstar calculates the growth percentage based on the cash flows from investing reported in the Cash Flow Statement within the company filings or reports.
/// </summary>
public class CashFlowfromInvestingGrowth : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "OneYear";
/// <summary>
/// Gets/sets the OneYear period value for the field
/// </summary>
[JsonProperty("1Y")]
public double OneYear => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromInvestingGrowth.OneYear");
/// <summary>
/// Gets/sets the ThreeYears period value for the field
/// </summary>
[JsonProperty("3Y")]
public double ThreeYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromInvestingGrowth.ThreeYears");
/// <summary>
/// Gets/sets the FiveYears period value for the field
/// </summary>
[JsonProperty("5Y")]
public double FiveYears => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromInvestingGrowth.FiveYears");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromInvestingGrowth.OneYear") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "OperationRatios.CashFlowfromInvestingGrowth.OneYear");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1Y",OneYear), new Tuple<string, double>("3Y",ThreeYears), new Tuple<string, double>("5Y",FiveYears) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"OperationRatios.CashFlowfromInvestingGrowth.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowfromInvestingGrowth()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowfromInvestingGrowth(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,124 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// The net cash from (used in) all of the entity's operating activities, including those of discontinued operations, of the reporting entity under the direct method.
/// </summary>
public class CashFlowsfromusedinOperatingActivitiesDirectCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the OneMonth period value for the field
/// </summary>
[JsonProperty("1M")]
public double OneMonth => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.OneMonth");
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("1M",OneMonth), new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashFlowsfromusedinOperatingActivitiesDirect.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFlowsfromusedinOperatingActivitiesDirectCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFlowsfromusedinOperatingActivitiesDirectCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

View File

@@ -0,0 +1,118 @@
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2023 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 System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
using QuantConnect.Data.UniverseSelection;
namespace QuantConnect.Data.Fundamental
{
/// <summary>
/// Cash generated by or used in financing activities of discontinued operations; excludes cash flows from continued operations.
/// </summary>
public class CashFromDiscontinuedFinancingActivitiesCashFlowStatement : MultiPeriodField
{
/// <summary>
/// The default period
/// </summary>
protected override string DefaultPeriod => "TwelveMonths";
/// <summary>
/// Gets/sets the ThreeMonths period value for the field
/// </summary>
[JsonProperty("3M")]
public double ThreeMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.ThreeMonths");
/// <summary>
/// Gets/sets the SixMonths period value for the field
/// </summary>
[JsonProperty("6M")]
public double SixMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.SixMonths");
/// <summary>
/// Gets/sets the NineMonths period value for the field
/// </summary>
[JsonProperty("9M")]
public double NineMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.NineMonths");
/// <summary>
/// Gets/sets the TwelveMonths period value for the field
/// </summary>
[JsonProperty("12M")]
public double TwelveMonths => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.TwelveMonths");
/// <summary>
/// Returns true if the field contains a value for the default period
/// </summary>
public override bool HasValue => FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.TwelveMonths") != NoValue;
/// <summary>
/// Returns the default value for the field
/// </summary>
public override double Value
{
get
{
var defaultValue = FundamentalService.Get<double>(Time, SecurityIdentifier, "FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.TwelveMonths");
if (defaultValue != NoValue)
{
return defaultValue;
}
return base.Value;
}
}
/// <summary>
/// Gets a dictionary of period names and values for the field
/// </summary>
/// <returns>The dictionary of period names and values</returns>
public override IReadOnlyDictionary<string, double> GetPeriodValues()
{
var result = new Dictionary<string, double>();
foreach (var kvp in new[] { new Tuple<string, double>("3M",ThreeMonths), new Tuple<string, double>("6M",SixMonths), new Tuple<string, double>("9M",NineMonths), new Tuple<string, double>("12M",TwelveMonths) })
{
if(kvp.Item2 != NoValue)
{
result[kvp.Item1] = kvp.Item2;
}
}
return result;
}
/// <summary>
/// Gets the value of the field for the requested period
/// </summary>
/// <param name="period">The requested period</param>
/// <returns>The value for the period</returns>
public override double GetPeriodValue(string period) => FundamentalService.Get<double>(Time, SecurityIdentifier, $"FinancialStatements.CashFlowStatement.CashFromDiscontinuedFinancingActivities.{ConvertPeriod(period)}");
/// <summary>
/// Creates a new empty instance
/// </summary>
public CashFromDiscontinuedFinancingActivitiesCashFlowStatement()
{
}
/// <summary>
/// Creates a new instance for the given time and security
/// </summary>
public CashFromDiscontinuedFinancingActivitiesCashFlowStatement(DateTime time, SecurityIdentifier securityIdentifier) : base(time, securityIdentifier)
{
}
}
}

Some files were not shown because too many files have changed in this diff Show More