Financials / Income Statement
CostG(offset, type[, NAHandling])
Full Description

Cost of Goods Sold (COGS) represents the direct expenses related to producing goods sold by a company. This encompasses the material costs and labor directly involved in creating products and services. COGS does not account for indirect expenses like distribution and sales force costs. We offer two variations of COGS to accommodate different analytical needs: CostG and CostG_GAAP.

CostG reflects the traditional calculation of COGS, focusing solely on the direct costs associated with production. This version is calculated as: CostG = Direct Materials + Direct Labor. It's primarily used when analyzing a company's core operational efficiency, excluding the effects of depreciation and amortization.

CostG_GAAP, on the other hand, includes depreciation and amortization expenses in addition to the direct costs. This calculation aligns with the Generally Accepted Accounting Principles (GAAP) and is formulated as: CostG_GAAP = Direct Materials + Direct Labor + Depreciation + Amortization. This version is particularly useful for investors and traders seeking a more comprehensive view of a company's cost structure, including the consumption of capital and intangible assets over time.

The choice between CostG and CostG_GAAP depends on your trading or investment strategy. If you're focusing on short-term operational efficiencies and cost control, CostG might be more relevant. However, for a holistic, long-term investment analysis that accounts for the depreciation of physical assets and amortization of intangible assets, CostG_GAAP provides a more complete picture.

Line Item Functions and Derived Factors

The data points come from SEC filings or company earnings announcements. Because our data provider standardizes financial information to make it comparable across different companies, the specific figures may not always match the original source. For a list of all our line items please refer to our Line-Item Reference Spreadsheet. 

Access Methods

There are two access methods: prebuilt factors and using a function.

Function

ItemName(offset, type[, NAHandling])

offset: 0-24 (for interim) 0-19 (for annual)
type: QTR (for interim), ANN (for annual), TTM (for trailing twelve months)
NAHandling: [FALLBACK], KEEPNA, ZERONA

For types QTR & ANN the value is taken straight out of the filing with the corresponding offset, ex: 0 is most recent, 1 is previous, etc. TTM types are computed in two ways: for income and cash flow statement values are calculated by adding four quarterly values. For balance sheet items, TTM is the average of the trailing four quarters.

Example

To screen for stocks whose trailing 12 months revenue is higher than the previous 12 months enter: Sales(0,TTM) > Sales(4,TTM) The above can also be done using prebuilt ratios: SalesTTM < SalesPTM

NA Handling

The NAHandling parameter is optional and is used to control what happens in preliminary reports where many items could be missing. Preliminary reports are press releases by the company and only affect the most recent ("0") offset period. They can last several weeks and can cause false signals due to incomplete data (see "CompleteStmt" for a way to identify companies with preliminary data).

Three options are available when an NA is found in a preliminary report: 

FALLBACK

The default setting. When an NA is encountered the value is pulled from the offset "1" period.

KEEPNA

NAs will be preserved, which can cause the entire expression to fail.

ZERONA

NAs are converted to 0

Pre-built factors

Below are the available pre-built factors for convenience with the corresponding formula parameters. Please note that availability varies by factor.

Period Description Corresponding Parameters

Q

Recent Quarter

(0, QTR)

PQ Prior Quarter (1, QTR)
PYQ Prior Year quarter (4, QTR)
TTM Trailing Twelve Months (0, TTM)
PTM Prior Trailing Twelve Months (4, TTM)
A Recent Annual (0, ANN)
PY Prior Year (1, ANN)
Gr%PQ Growth % PQ (0, QTR) / (1, QTR)
Gr%PYQ Growth % PYQ (0, QTR) / (4, QTR)
Gr%TTM Growth % TTM (0, TTM) / (4, TTM)
Gr%PQTTM Growth % TTM 1Q Ago (0, TTM) / (1, TTM)
Gr%A Growth % Annual (0, ANN) / (1, ANN)
Gr%3Y Growth % 3 year (0, ANN) / (3, ANN) annualized
Gr%5Y Growth % 5 year (0, ANN) / (5, ANN) annualized
Gr%10Y Growth % 10 year (0, ANN) / (10, ANN) annualized
RSD%ANN RSD % 10Y of annuals LoopRelStdDev ("function(CTR,ANN)",10,0,1,1))
RSD%TTM RSD % 5Y of TTM LoopRelStdDev ("function(CTR*2,TTM)",10,0,1,1))
RegEstTTM Regression Est 5Y Eval(LinReg("function(CTR * 2, TTM)", 10) , EstimateY(0), NA)
RegGr%TTM Regression Gr% 5Y Eval(LinReg("function(CTR * 2, TTM)", 10) , RegGr%(2), NA)
RegEstANN Regression Est 10Y Eval(LinReg("function(CTR, ANN)", 10) , EstimateY(0), NA)
RegGr%ANN Regression Gr% 10Y Eval(LinReg("function(CTR, ANN)", 10) , RegGr%(1), NA)
Period Description Corresponding Parameters
%SalesQ % of Q Sales function(0, QTR) / Sales(0, QRT)
%SalesA % of A Sales function(0, ANN) / Sales(0, ANN)
%AssetQ % of Q Assets function(0, QTR) / AstTot(0, QRT)
%AssetA % of A Assets function(0, ANN) / AstTot(0, ANN)
PSQ Per Share Q function(0, QTR) / Shares(0, QRT)
PSA Per Share A function(0, ANN) / Shares(0, ANN)
3YAvg 3 Year Average LoopAvg("function(CTR, ANN)", 3)
5YAvg 5 Year Average LoopAvg("function(CTR, ANN)", 5)

NOTES: 

  • Availability varies by factor.
  • PTM uses interim periods, so the offset is 4, not 1.

Click here for the Line-Item Reference Spreadsheet.