summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanglewood <85772166+deeleeramone@users.noreply.github.com>2024-05-21 00:56:53 -0700
committerGitHub <noreply@github.com>2024-05-21 07:56:53 +0000
commitbf20807424ee13e2eef5b40e159e24002ab4b5d3 (patch)
tree4f5f7c7dbd4409218691926c2d08c3123d8df4d9
parentbffd88f96c5c986e973c93f0201eb69af42bf3e4 (diff)
[Feature] Compare Company Facts (SEC) (#6444)
* stashing * more stashing * add tests * black * test params * mypy * more mypy * grammar police * grammar police
-rw-r--r--openbb_platform/core/openbb_core/provider/standard_models/compare_company_facts.py56
-rw-r--r--openbb_platform/extensions/equity/integration/test_equity_api.py39
-rw-r--r--openbb_platform/extensions/equity/integration/test_equity_python.py38
-rw-r--r--openbb_platform/extensions/equity/openbb_equity/compare/compare_router.py31
-rw-r--r--openbb_platform/openbb/assets/reference.json724
-rw-r--r--openbb_platform/openbb/package/equity_compare.py123
-rw-r--r--openbb_platform/openbb/package/etf.py120
-rw-r--r--openbb_platform/providers/sec/openbb_sec/__init__.py2
-rw-r--r--openbb_platform/providers/sec/openbb_sec/models/compare_company_facts.py185
-rw-r--r--openbb_platform/providers/sec/openbb_sec/utils/frames.py873
-rw-r--r--openbb_platform/providers/sec/tests/record/http/test_sec_fetchers/test_sec_compare_company_facts_fetcher.yaml5048
-rw-r--r--openbb_platform/providers/sec/tests/test_sec_fetchers.py14
12 files changed, 6924 insertions, 329 deletions
diff --git a/openbb_platform/core/openbb_core/provider/standard_models/compare_company_facts.py b/openbb_platform/core/openbb_core/provider/standard_models/compare_company_facts.py
new file mode 100644
index 00000000000..cb5e01c17e1
--- /dev/null
+++ b/openbb_platform/core/openbb_core/provider/standard_models/compare_company_facts.py
@@ -0,0 +1,56 @@
+"""Compare Company Facts Model."""
+
+from datetime import date as dateType
+from typing import Optional
+
+from pydantic import Field
+
+from openbb_core.provider.abstract.data import Data
+from openbb_core.provider.abstract.query_params import QueryParams
+from openbb_core.provider.utils.descriptions import (
+ DATA_DESCRIPTIONS,
+ QUERY_DESCRIPTIONS,
+)
+
+
+class CompareCompanyFactsQueryParams(QueryParams):
+ """Compare Company Facts Query."""
+
+ symbol: Optional[str] = Field(
+ default=None, description=QUERY_DESCRIPTIONS.get("symbol", "")
+ )
+ fact: str = Field(
+ default="",
+ description="The fact to lookup, typically a GAAP-reporting measure. Choices vary by provider.",
+ )
+
+
+class CompareCompanyFactsData(Data):
+ """Compare Company Facts Data."""
+
+ symbol: Optional[str] = Field(
+ default=None, description=DATA_DESCRIPTIONS.get("symbol", "")
+ )
+ name: Optional[str] = Field(default=None, description="Name of the entity.")
+ value: float = Field(
+ description="The reported value of the fact or concept.",
+ )
+ reported_date: Optional[dateType] = Field(
+ default=None, description="The date when the report was filed."
+ )
+ period_beginning: Optional[dateType] = Field(
+ default=None,
+ description="The start date of the reporting period.",
+ )
+ period_ending: Optional[dateType] = Field(
+ default=None,
+ description="The end date of the reporting period.",
+ )
+ fiscal_year: Optional[int] = Field(
+ default=None,
+ description="The fiscal year.",
+ )
+ fiscal_period: Optional[str] = Field(
+ default=None,
+ description="The fiscal period of the fiscal year.",
+ )
diff --git a/openbb_platform/extensions/equity/integration/test_equity_api.py b/openbb_platform/extensions/equity/integration/test_equity_api.py
index b559acfff9b..f47350f300c 100644
--- a/openbb_platform/extensions/equity/integration/test_equity_api.py
+++ b/openbb_platform/extensions/equity/integration/test_equity_api.py
@@ -2015,3 +2015,42 @@ def test_equity_estimates_forward_ebitda(params, headers):
result = requests.get(url, headers=headers, timeout=10)
assert isinstance(result, requests.Response)
assert result.status_code == 200
+
+
+@parametrize(
+ "params",
+ [
+ (
+ {
+ "provider": "sec",
+ "symbol": "NVDA,AAPL,AMZN,MSFT,GOOG,SMCI",
+ "fact": "RevenueFromContractWithCustomerExcludingAssessedTax",
+ "year": 2024,
+ "fiscal_period": None,
+ "instantaneous": False,
+ "use_cache": False,
+ }
+ ),
+ (
+ {
+ "provider": "sec",
+ "symbol": None,
+ "fact": None,
+ "year": None,
+ "fiscal_period": None,
+ "instantaneous": False,
+ "use_cache": False,
+ }
+ ),
+ ],
+)
+@pytest.mark.integration
+def test_equity_compare_company_facts(params, headers):
+ """Test the equity compare company_facts endpoint."""
+ params = {p: v for p, v in params.items() if v}
+
+ query_str = get_querystring(params, [])
+ url = f"http://0.0.0.0:8000/api/v1/equity/compare/company_facts?{query_str}"
+ result = requests.get(url, headers=headers, timeout=10)
+ assert isinstance(result, requests.Response)
+ assert result.status_code == 200
diff --git a/openbb_platform/extensions/equity/integration/test_equity_python.py b/openbb_platform/extensions/equity/integration/test_equity_python.py
index e3da7aa2f39..66ed58e6fde 100644
--- a/openbb_platform/extensions/equity/integration/test_equity_python.py
+++ b/openbb_platform/extensions/equity/integration/test_equity_python.py
@@ -1877,3 +1877,41 @@ def test_equity_estimates_forward_pe(params, obb):
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
+
+
+@parametrize(
+ "params",
+ [
+ (
+ {
+ "provider": "sec",
+ "symbol": "NVDA,AAPL,AMZN,MSFT,GOOG,SMCI",
+ "fact": "RevenueFromContractWithCustomerExcludingAssessedTax",
+ "year": 2024,
+ "fiscal_period": None,
+ "instantaneous": False,
+ "use_cache": False,
+ }
+ ),
+ (
+ {
+ "provider": "sec",
+ "symbol": None,
+ "fact": None,
+ "year": None,
+ "fiscal_period": None,
+ "instantaneous": False,
+ "use_cache": False,
+ }
+ ),
+ ],
+)
+@pytest.mark.integration
+def test_equity_compare_company_facts(params, obb):
+ """Test the equity compare company_facts endpoint."""
+ params = {p: v for p, v in params.items() if v}
+
+ result = obb.equity.compare.company_facts(**params)
+ assert result
+ assert isinstance(result, OBBject)
+ assert len(result.results) > 0
diff --git a/openbb_platform/extensions/equity/openbb_equity/compare/compare_router.py b/openbb_platform/extensions/equity/openbb_equity/compare/compare_router.py
index 1737cd2dd08..b734efe3bc3 100644
--- a/openbb_platform/extensions/equity/openbb_equity/compare/compare_router.py
+++ b/openbb_platform/extensions/equity/openbb_equity/compare/compare_router.py
@@ -71,3 +71,34 @@ async def groups(
Performance metrics include the stock price change for different time periods.
"""
return await OBBject.from_query(Query(**locals()))
+
+
+@router.command(
+ model="CompareCompanyFacts",
+ examples=[
+ APIEx(parameters={"provider": "sec"}),
+ APIEx(
+ parameters={
+ "provider": "sec",
+ "fact": "PaymentsForRepurchaseOfCommonStock",
+ "year": 2023,
+ }
+ ),
+ APIEx(
+ parameters={
+ "provider": "sec",
+ "symbol": "NVDA,AAPL,AMZN,MSFT,GOOG,SMCI",
+ "fact": "RevenueFromContractWithCustomerExcludingAssessedTax",
+ "year": 2024,
+ }
+ ),
+ ],
+)
+async def company_facts(
+ cc: CommandContext,
+ provider_choices: ProviderChoices,
+ standard_params: StandardParams,
+ extra_params: ExtraParams,
+) -> OBBject:
+ """Copmare reported company facts and fundamental data points."""
+ return await OBBject.from_query(Query(**locals()))
diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json
index adf31f04d3b..2e3631858f9 100644
--- a/openbb_platform/openbb/assets/reference.json
+++ b/openbb_platform/openbb/assets/reference.json
@@ -5950,6 +5950,520 @@
},
"model": "EquityPeers"
},
+ "/equity/compare/company_facts": {
+ "deprecated": {
+ "flag": null,
+ "message": null
+ },
+ "description": "Copmare reported company facts and fundamental data points.",
+ "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.compare.company_facts(provider='sec')\nobb.equity.compare.company_facts(provider='sec', fact='PaymentsForRepurchaseOfCommonStock', year=2023)\nobb.equity.compare.company_facts(provider='sec', symbol='NVDA,AAPL,AMZN,MSFT,GOOG,SMCI', fact='RevenueFromContractWithCustomerExcludingAssessedTax', year=2024)\n```\n\n",
+ "parameters": {
+ "standard": [
+ {
+ "name": "symbol",
+ "type": "Union[str, List[str]]",
+ "description": "Symbol to get data for. Multiple items allowed for provider(s): sec.",
+ "default": null,
+ "optional": true,
+ "choices": null
+ },
+ {
+ "name": "fact",
+ "type": "str",
+ "description": "The fact to lookup, typically a GAAP-reporting measure. Choices vary by provider.",
+ "default": "",
+ "optional": true,
+ "choices": null
+ },
+ {
+ "name": "provider",
+ "type": "Literal['sec']",
+ "description": "The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'sec' if there is no default.",
+ "default": "sec",
+ "optional": true
+ }
+ ],
+ "sec": [
+ {
+ "name": "fact",
+ "type": "Literal['AccountsPayableCurrent', 'AccountsReceivableNet', 'AccountsReceivableNetCurrent', 'AccrualForTaxesOtherThanIncomeTaxesCurrent', 'AccrualForTaxesOtherThanIncomeTaxesCurrentAndNoncurrent', 'AccruedIncomeTaxesCurrent', 'AccruedIncomeTaxesNoncurrent', 'AccruedInsuranceCurrent', 'AccruedLiabilitiesCurrent', 'AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment', 'AccumulatedOtherComprehensiveIncomeLossNetOfTax', 'AcquisitionsNetOfCashAcquiredAndPurchasesOfIntangibleAndOtherAssets', 'AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue', 'AdvertisingExpense', 'AllocatedShareBasedCompensationExpense', 'AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount', 'Assets', 'AssetsCurrent', 'AssetsNoncurrent', 'NoncurrentAssets', 'AssetImpairmentCharges', 'BuildingsAndImprovementsGross', 'CapitalLeaseObligationsCurrent', 'CapitalLeaseObligationsNoncurrent', 'Cash', 'CashAndCashEquivalentsAtCarryingValue', 'CashCashEquivalentsAndShortTermInvestments', 'CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents', 'CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations', 'CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect', 'CommitmentsAndContingencies', 'CommercialPaper', 'CommonStockDividendsPerShareDeclared', 'CommonStockDividendsPerShareCashPaid', 'CommonStocksIncludingAdditionalPaidInCapital', 'ComprehensiveIncomeNetOfTax', 'ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest', 'ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest', 'ConstructionInProgressGross', 'ContractWithCustomerAssetNet', 'ContractWithCustomerLiability', 'ContractWithCustomerLiabilityCurrent', 'ContractWithCustomerLiabilityNoncurrent', 'CostOfRevenue', 'CostOfGoodsAndServicesSold', 'CurrentFederalTaxExpenseBenefit', 'CurrentForeignTaxExpenseBenefit', 'CurrentIncomeTaxExpenseBenefit', 'CurrentStateAndLocalTaxExpenseBenefit', 'DebtInstrumentFaceAmount', 'DebtInstrumentFairValue', 'DebtLongtermAndShorttermCombinedAmount', 'DeferredFederalIncomeTaxExpenseBenefit', 'DeferredForeignIncomeTaxExpenseBenefit', 'DeferredIncomeTaxExpenseBenefit', 'DeferredIncomeTaxesAndTaxCredits', 'DeferredIncomeTaxLiabilities', 'DeferredIncomeTaxLiabilitiesNet', 'DeferredRevenue', 'DeferredTaxAssetsGross', 'DeferredTaxAssetsLiabilitiesNet', 'DeferredTaxAssetsNet', 'DeferredTaxLiabilities', 'DefinedContributionPlanCostRecognized', 'Depreciation', 'DepreciationAmortizationAndAccretionNet', 'DepreciationAmortizationAndOther', 'DepreciationAndAmortization', 'DepreciationDepletionAndAmortization', 'DerivativeCollateralObligationToReturnCash', 'DerivativeCollateralRightToReclaimCash', 'DerivativeFairValueOfDerivativeNet', 'DerivativeLiabilityCollateralRightToReclaimCashOffset', 'DerivativeNotionalAmount', 'Dividends', 'DividendsCash', 'DividendsPayableAmountPerShare', 'DividendsPayableCurrent', 'DistributedEarnings', 'EarningsPerShareBasic', 'EarningsPerShareDiluted', 'EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents', 'EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations', 'EmployeeRelatedLiabilitiesCurrent', 'EmployeeRelatedLiabilitiesCurrentAndNoncurrent', 'EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense', 'FinanceLeaseInterestExpense', 'FinanceLeaseInterestPaymentOnLiability', 'FinanceLeaseLiability', 'FinanceLeaseLiabilityCurrent', 'FinanceLeaseLiabilityNoncurrent', 'FinanceLeaseLiabilityPaymentsDue', 'FinanceLeaseLiabilityPaymentsDueAfterYearFive', 'FinanceLeaseLiabilityPaymentsDueNextTwelveMonths', 'FinanceLeaseLiabilityPaymentsDueYearFive', 'FinanceLeaseLiabilityPaymentsDueYearFour', 'FinanceLeaseLiabilityPaymentsDueYearThree', 'FinanceLeaseLiabilityPaymentsDueYearTwo', 'FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear', 'FinanceLeaseLiabilityUndiscountedExcessAmount', 'FinanceLeasePrincipalPayments', 'FinanceLeaseRightOfUseAsset', 'FinancingReceivableAllowanceForCreditLosses', 'FiniteLivedIntangibleAssetsNet', 'FixturesAndEquipmentGross', 'GainLossOnInvestments', 'GainLossOnInvestmentsAndDerivativeInstruments', 'GainLossOnSaleOfBusiness', 'GainsLossesOnExtinguishmentOfDebt', 'GeneralAndAdministrativeExpense', 'Goodwill', 'GrossProfit', 'ImpairmentOfIntangibleAssetsExcludingGoodwill', 'ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill', 'IncomeLossFromContinuingOperations', 'IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity', 'IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest', 'IncomeLossFromContinuingOperationsPerBasicShare', 'IncomeLossFromContinuingOperationsPerDilutedShare', 'InterestAndDebtExpense', 'IncomeTaxExpenseBenefit', 'IncomeTaxesPaid', 'IncomeTaxesPaidNet', 'IncreaseDecreaseInAccountsAndOtherReceivables', 'IncreaseDecreaseInAccountsPayable', 'IncreaseDecreaseInAccountsReceivable', 'IncreaseDecreaseInAccruedLiabilities', 'IncreaseDecreaseInAccruedIncomeTaxesPayable', 'IncreaseDecreaseInAccruedTaxesPayable', 'IncreaseDecreaseInContractWithCustomerLiability', 'IncreaseDecreaseInDeferredIncomeTaxes', 'IncreaseDecreaseInInventories', 'IncreaseDecreaseInOtherCurrentAssets', 'IncreaseDecreaseInOtherCurrentLiabilities', 'IncreaseDecreaseInOtherNoncurrentAssets', 'IncreaseDecreaseInOtherNoncurrentLiabilities', 'IncreaseDecreaseInPensionPlanObligations', 'IncrementalCommonSharesAttributableToShareBasedPaymentArrangements', 'InterestExpenseDebt', 'InterestIncomeExpenseNet', 'InterestPaid', 'InterestPaidNet', 'InventoryNet', 'InvestmentIncomeInterest', 'Land', 'LeaseAndRentalExpense', 'LesseeOperatingLeaseLiabilityPaymentsDue', 'LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive', 'LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths', 'LesseeOperatingLeaseLiabilityPaymentsDueYearFive', 'LesseeOperatingLeaseLiabilityPaymentsDueYearFour', 'LesseeOperatingLeaseLiabilityPaymentsDueYearThree', 'LesseeOperatingLeaseLiabilityPaymentsDueYearTwo', 'LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear', 'LettersOfCreditOutstandingAmount', 'Liabilities', 'LiabilitiesAndStockholdersEquity', 'LiabilitiesCurrent', 'LineOfCredit', 'LineOfCreditFacilityMaximumBorrowingCapacity', 'LongTermDebt', 'LongTermDebtCurrent', 'LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive', 'LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths', 'LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive', 'LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour', 'LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree', 'LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo', 'LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear', 'LongTermDebtNoncurrent', 'LongTermInvestments', 'LossContingencyEstimateOfPossibleLoss', 'MachineryAndEquipmentGross', 'MarketableSecuritiesCurrent', 'MarketableSecuritiesNoncurrent', 'MinorityInterest', 'NetCashProvidedByUsedInFinancingActivities', 'NetCashProvidedByUsedInInvestingActivities', 'NetCashProvidedByUsedInOperatingActivities', 'NetIncomeLoss', 'NetIncomeLossAttributableToNoncontrollingInterest', 'NetIncomeLossAttributableToNonredeemableNoncontrollingInterest', 'NetIncomeLossAttributableToRedeemableNoncontrollingInterest', 'NonoperatingIncomeExpense', 'NoninterestIncome', 'NotesReceivableNet', 'OperatingExpenses', 'OperatingIncomeLoss', 'OperatingLeaseCost', 'OperatingLeaseLiability', 'OperatingLeaseLiabilityCurrent', 'OperatingLeaseLiabilityNoncurrent', 'OperatingLeaseRightOfUseAsset', 'OtherAccruedLiabilitiesCurrent', 'OtherAssetsCurrent', 'OtherAssetsNoncurrent', 'OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax', 'OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax', 'OtherComprehensiveIncomeLossDerivativeInstrumentGainLossafterReclassificationandTax', 'OtherComprehensiveIncomeLossDerivativeInstrumentGainLossbeforeReclassificationafterTax', 'OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax', 'OtherComprehensiveIncomeLossNetOfTax', 'OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent', 'OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax', 'OtherIncome', 'OtherLiabilitiesCurrent', 'OtherLiabilitiesNoncurrent', 'OtherLongTermDebt', 'OtherNoncashIncomeExpense', 'PaymentsForCapitalImprovements', 'PaymentsOfDividends', 'PaymentsOfDividendsMinorityInterest', 'PaymentsForProceedsFromBusinessesAndInterestInAffiliates', 'PaymentsForProceedsFromOtherInvestingActivities', 'PaymentsForRent', 'PaymentsForRepurchaseOfCommonStock', 'PaymentsOfDebtExtinguishmentCosts', 'PaymentsToAcquireInvestments', 'PaymentsToAcquirePropertyPlantAndEquipment', 'PreferredStockSharesOutstanding', 'PreferredStockValue', 'PrepaidExpenseAndOtherAssetsCurrent', 'PrepaidExpenseCurrent', 'ProceedsFromDebtMaturingInMoreThanThreeMonths', 'ProceedsFromDebtNetOfIssuanceCosts', 'ProceedsFromDivestitureOfBusinesses', 'ProceedsFromInvestments', 'ProceedsFromIssuanceOfCommonStock', 'ProceedsFromIssuanceOfDebt', 'ProceedsFromIssuanceOfLongTermDebt', 'ProceedsFromIssuanceOfUnsecuredDebt', 'ProceedsFromIssuanceOrSaleOfEquity', 'ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities', 'ProceedsFromPaymentsForOtherFinancingActivities', 'ProceedsFromPaymentsToMinorityShareholders', 'ProceedsFromRepaymentsOfShortTermDebt', 'ProceedsFromRepaymentsOfShortTermDebtMaturingInThreeMonthsOrLess', 'ProceedsFromSaleOfPropertyPlantAndEquipment', 'ProceedsFromStockOptionsExercised', 'ProfitLoss', 'PropertyPlantAndEquipmentGross', 'PropertyPlantAndEquipmentNet', 'ReceivablesNetCurrent', 'RedeemableNoncontrollingInterestEquityCarryingAmount', 'RepaymentsOfDebtMaturingInMoreThanThreeMonths', 'RepaymentsOfLongTermDebt', 'ResearchAndDevelopmentExpense', 'RestrictedCash', 'RestrictedCashAndCashEquivalents', 'RestrictedStockExpense', 'RestructuringCharges', 'RetainedEarningsAccumulatedDeficit', 'Revenues', 'RevenueFromContractWithCustomerExcludingAssessedTax', 'SecuredLongTermDebt', 'SellingAndMarketingExpense', 'SellingGeneralAndAdministrativeExpense', 'ShareBasedCompensation', 'ShortTermBorrowings', 'ShortTermInvestments', 'StockholdersEquity', 'StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest', 'StockholdersEquityOther', 'StockIssuedDuringPeriodValueNewIssues', 'StockOptionPlanExpense', 'StockRedeemedOrCalledDuringPeriodValue', 'StockRepurchasedDuringPeriodValue', 'StockRepurchasedAndRetiredDuringPeriodValue', 'TaxesPayableCurrent', 'TradingSecuritiesDebt', 'TreasuryStockAcquiredAverageCostPerShare', 'TreasuryStockSharesAcquired', 'UnrealizedGainLossOnInvestments', 'UnrecognizedTaxBenefits', 'UnsecuredDebt', 'VariableLeaseCost', 'WeightedAverageNumberOfDilutedSharesOutstanding', 'WeightedAverageNumberOfSharesOutstandingBasic', 'WeightedAverageNumberDilutedSharesOutstandingAdjustment']",
+ "description": "Fact or concept from the SEC taxonomy, in UpperCamelCase. Defaults to, 'Revenues'. AAPL, MSFT, GOOG, BRK-A currently report revenue as, 'RevenueFromContractWithCustomerExcludingAssessedTax'. In previous years, they have reported as 'Revenues'.",
+ "default": "Revenues",
+ "optional": true,
+ "choices": [
+ "AccountsPayableCurrent",
+ "AccountsReceivableNet",
+ "AccountsReceivableNetCurrent",
+ "AccrualForTaxesOtherThanIncomeTaxesCurrent",
+ "AccrualForTaxesOtherThanIncomeTaxesCurrentAndNoncurrent",
+ "AccruedIncomeTaxesCurrent",
+ "AccruedIncomeTaxesNoncurrent",
+ "AccruedInsuranceCurrent",
+ "AccruedLiabilitiesCurrent",
+ "AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment",
+ "AccumulatedOtherComprehensiveIncomeLossNetOfTax",
+ "AcquisitionsNetOfCashAcquiredAndPurchasesOfIntangibleAndOtherAssets",
+ "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
+ "AdvertisingExpense",
+ "AllocatedShareBasedCompensationExpense",
+ "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
+ "AssetImpairmentCharges",
+ "Assets",
+ "AssetsCurrent",
+ "AssetsNoncurrent",
+ "BuildingsAndImprovementsGross",
+ "CapitalLeaseObligationsCurrent",
+ "CapitalLeaseObligationsNoncurrent",
+ "Cash",
+ "CashAndCashEquivalentsAtCarryingValue",
+ "CashCashEquivalentsAndShortTermInvestments",
+ "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
+ "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
+ "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
+ "CommercialPaper",
+ "CommitmentsAndContingencies",
+ "CommonStockDividendsPerShareCashPaid",
+ "CommonStockDividendsPerShareDeclared",
+ "CommonStocksIncludingAdditionalPaidInCapital",
+ "ComprehensiveIncomeNetOfTax",
+ "ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest",
+ "ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest",
+ "ConstructionInProgressGross",
+ "ContractWithCustomerAssetNet",
+ "ContractWithCustomerLiability",
+ "ContractWithCustomerLiabilityCurrent",
+ "ContractWithCustomerLiabilityNoncurrent",
+ "CostOfGoodsAndServicesSold",
+ "CostOfRevenue",
+ "CurrentFederalTaxExpenseBenefit",
+ "CurrentForeignTaxExpenseBenefit",
+ "CurrentIncomeTaxExpenseBenefit",
+ "CurrentStateAndLocalTaxExpenseBenefit",
+ "DebtInstrumentFaceAmount",
+ "DebtInstrumentFairValue",
+ "DebtLongtermAndShorttermCombinedAmount",
+ "DeferredFederalIncomeTaxExpenseBenefit",
+ "DeferredForeignIncomeTaxExpenseBenefit",
+ "DeferredIncomeTaxExpenseBenefit",
+ "DeferredIncomeTaxLiabilities",
+ "DeferredIncomeTaxLiabilitiesNet",
+ "DeferredIncomeTaxesAndTaxCredits",
+ "DeferredRevenue",
+ "DeferredTaxAssetsGross",
+ "DeferredTaxAssetsLiabilitiesNet",
+ "DeferredTaxAssetsNet",
+ "DeferredTaxLiabilities",
+ "DefinedContributionPlanCostRecognized",
+ "Depreciation",
+ "DepreciationAmortizationAndAccretionNet",
+ "DepreciationAmortizationAndOther",
+ "DepreciationAndAmortization",
+ "DepreciationDepletionAndAmortization",
+ "DerivativeCollateralObligationToReturnCash",
+ "DerivativeCollateralRightToReclaimCash",
+ "DerivativeFairValueOfDerivativeNet",
+ "DerivativeLiabilityCollateralRightToReclaimCashOffset",
+ "DerivativeNotionalAmount",
+ "DistributedEarnings",
+ "Dividends",
+ "DividendsCash",
+ "DividendsPayableAmountPerShare",
+ "DividendsPayableCurrent",
+ "EarningsPerShareBasic",
+ "EarningsPerShareDiluted",
+ "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
+ "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations",
+ "EmployeeRelatedLiabilitiesCurrent",
+ "EmployeeRelatedLiabilitiesCurrentAndNoncurrent",
+ "EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense",
+ "FinanceLeaseInterestExpense",
+ "FinanceLeaseInterestPaymentOnLiability",
+ "FinanceLeaseLiability",
+ "FinanceLeaseLiabilityCurrent",
+ "FinanceLeaseLiabilityNoncurrent",
+ "FinanceLeaseLiabilityPaymentsDue",
+ "FinanceLeaseLiabilityPaymentsDueAfterYearFive",
+ "FinanceLeaseLiabilityPaymentsDueNextTwelveMonths",
+ "FinanceLeaseLiabilityPaymentsDueYearFive",
+ "FinanceLeaseLiabilityPaymentsDueYearFour",
+ "FinanceLeaseLiabilityPaymentsDueYearThree",
+ "FinanceLeaseLiabilityPaymentsDueYearTwo",
+ "FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear",
+ "FinanceLeaseLiabilityUndiscountedExcessAmount",
+ "FinanceLeasePrincipalPayments",
+ "FinanceLeaseRightOfUseAsset",
+ "FinancingReceivableAllowanceForCreditLosses",
+ "FiniteLivedIntangibleAssetsNet",
+ "FixturesAndEquipmentGross",
+ "GainLossOnInvestments",
+ "GainLossOnInvestmentsAndDerivativeInstruments",
+ "GainLossOnSaleOfBusiness",
+ "GainsLossesOnExtinguishmentOfDebt",
+ "GeneralAndAdministrativeExpense",
+ "Goodwill",
+ "GrossProfit",
+ "ImpairmentOfIntangibleAssetsExcludingGoodwill",
+ "ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill",
+ "IncomeLossFromContinuingOperations",
+ "IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity",
+ "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
+ "IncomeLossFromContinuingOperationsPerBasicShare",
+ "IncomeLossFromContinuingOperationsPerDilutedShare",
+ "IncomeTaxExpenseBenefit",
+ "IncomeTaxesPaid",
+ "IncomeTaxesPaidNet",
+ "IncreaseDecreaseInAccountsAndOtherReceivables",
+ "IncreaseDecreaseInAccountsPayable",
+ "IncreaseDecreaseInAccountsReceivable",
+ "IncreaseDecreaseInAccruedIncomeTaxesPayable",
+ "IncreaseDecreaseInAccruedLiabilities",
+ "IncreaseDecreaseInAccruedTaxesPayable",
+ "IncreaseDecreaseInContractWithCustomerLiability",
+ "IncreaseDecreaseInDeferredIncomeTaxes",
+ "IncreaseDecreaseInInventories",
+ "IncreaseDecreaseInOtherCurrentAssets",
+ "IncreaseDecreaseInOtherCurrentLiabilities",
+ "IncreaseDecreaseInOtherNoncurrentAssets",
+ "IncreaseDecreaseInOtherNoncurrentLiabilities",
+ "IncreaseDecreaseInPensionPlanObligations",
+ "IncrementalCommonSharesAttributableToShareBasedPaymentArrangements",
+ "InterestAndDebtExpense",
+ "InterestExpenseDebt",
+ "InterestIncomeExpenseNet",
+ "InterestPaid",
+ "InterestPaidNet",
+ "InventoryNet",
+ "InvestmentIncomeInterest",
+ "Land",
+ "LeaseAndRentalExpense",
+ "LesseeOperatingLeaseLiabilityPaymentsDue",
+ "LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive",
+ "LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths",
+ "LesseeOperatingLeaseLiabilityPaymentsDueYearFive",
+ "LesseeOperatingLeaseLiabilityPaymentsDueYearFour",
+ "LesseeOperatingLeaseLiabilityPaymentsDueYearThree",
+ "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo",
+ "LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear",
+ "LettersOfCreditOutstandingAmount",
+ "Liabilities",
+ "LiabilitiesAndStockholdersEquity",
+ "LiabilitiesCurrent",
+ "LineOfCredit",
+ "LineOfCreditFacilityMaximumBorrowingCapacity",
+ "LongTermDebt",
+ "LongTermDebtCurrent",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo",
+ "LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear",
+ "LongTermDebtNon