Showing posts with label SEC. Show all posts
Showing posts with label SEC. Show all posts

Thursday, November 28, 2024

Snowflake's REDUCE Function to Glean Insights from SEC Filing Data

 Summary

  • What is the REDUCE Higher-order Function?
  • Learn the JSON structure of the SEC company filing from an example.
  • What fiscal end periods are represented in the JSON document?
  • Answer the question using the REDUCE higher-order function in Snowflake.

What is the REDUCE Higher-order Function?

Recently, Snowflake made REDUCE Higher-order function generally available. This function adds another powerful, easy-to-use tool to your toolkit to process arrays. The REDUCE function allows you to accumulate values across an array into a single value. It takes an array as input, an initial accumulator value, and a Lambda expression that defines the logic for processing each array element.

REDUCE( <array> , <init> , <lambda_expression> ) 

The JSON Structure of the SEC Filing

My goal is to understand the cash carried by Kimberly-Clark Corporation in its balance sheet. The company is known for its products, such as Huggies and Cottonelle. I want to list all the fiscal end dates in the data. There can be inconsistencies in the data filed with the SEC, especially concerning the fiscal periods represented, so knowing what fiscal periods are in the data can be invaluable. Also, the SEC filing may have repeated data. This is because investors wish to compare current results with past results, so a Q2 report should include Q1 and Q2 data from the previous year. So, the SEC filing would have repetitions.

Note: You can learn about my External Table structure here. In my LinkedIn profile, you can read a series of blogs about my setup to query SEC filings.

Here's the JSON structure we will use in the REDUCE function:

{ 
"cik": 55785, 
"description": "Amount of currency on hand as well 
as demand deposits with banks or financial institutions. 
Includes other kinds of accounts that have the general characteristics of 
demand deposits.", 
"entityName": "KIMBERLY-CLARK CORPORATION", 
"label": "Cash and Cash Equivalents, at Carrying Value", 
"tag": "CashAndCashEquivalentsAtCarryingValue", 
"taxonomy": "us-gaap", 
"units":  { 
"USD": [
                  { 
                    "accn": "0001193125-10-038621", 
                    "end": "2006-12-31", 
                    "filed": "2010-02-24", 
                    "form": "10-K", 
                    "fp": "FY", 
                    "frame": "CY2006Q4I", 
                    "fy": 2009, 
                    "val": 361000000 
                  }, 
                  {
                    "accn": "0000055785-09-000026", 
                    "end": "2007-12-31", 
                    "filed": "2009-08-07", 
                    "form": "10-Q", 
                    "fp": "Q2", 
                    "fy": 2009, 
                    "val": 473000000
                  }
               ]
                }
}

What fiscal end periods are represented in the JSON document?

I have created an external table called CONS_STAPLES_CASH_AND_CASH_EQUIVALENTS. For the REDUCE function, the input is the path to the array:

Path to the Array Elements:

VALUE:"units":"USD" 

I wish to get a concatenated string of all the fiscal end periods represented in the JSON document. This is represented by the "end" key. This is represented in the init parameter as ''. Finally, in the Lambda Expression, the arg1 argument is the accumulator, and the arg2 argument is the current element being processed in the array.

Lambda Expression and the Query:

(arg1, arg2) -> arg1 || ' ' || arg2:"end" || ', '
SELECT 
            TICKER_SYMBOL, 
            VALUE, 
            REDUCE(VALUE:"units":"USD", '',  (arg1, arg2) -> arg1 || ' ' || arg2:"end" || ', ')           
                                                                                             FISCAL_PERIOD_END_DATES 
FROM 
            CONS_STAPLES_CASH_AND_CASH_EQUIVALENTS_ET;

When I execute the query, the REDUCE function retrieves the value for the "end" key, concatenates it to the accumulator, and returns it (Exhibit 1). The screenshot shows that for Kimberly-Clark Corp (KMB), the JSON has data from the fiscal period ending 2006-12-31. But for Target (TGT), the data in the JSON is from 2016-01-30.

Exhibit 1: The Fiscal Period End Date Returned by the REDUCE function.

Snowflake Snowsight

I can also tell that the SEC filing has duplicate data that I must handle in my query. For example, I can see that the 2007-12-31 is represented multiple times in the file I downloaded from the SEC (Exhibit 2).

Exhibit 2: Fiscal Period End Dates Accumulated By the REDUCE Higher-order Function.

SEC.GOV

I can quickly see the data in my JSON files downloaded from the SEC. I did not have to use a LATERAL FLATTEN to get at the data. The REDUCE function boosts my efficiency when I am dealing with JSON data. Try out Snowflake's REDUCE and other Higher-order functions; they will make you more productive.

Saturday, September 28, 2024

Impact of GenAI on R&D Expenditure

 Summary:

  • Describe the AI money flow using an illustration.
  • How much do Adobe, Salesforce, and others spend on Research and Development (R&D)?
  • How has the R&D expense changed over time?
  • What can we infer about the impact of GenAI on R&D expenses?

In this post, we examined Microsoft's capital expenditures (capex) as a proxy for the billions of dollars hyper-scaler cloud providers are investing in AI. Who is consuming this capex? We will answer this fundamental question in this post. Most people may already know the answer to this question. Cloud providers are packaging Nvidia GPUs into various IaaS services, offering them to companies such as Adobe, ServiceNow, Salesforce, and every other company in every industry experimenting with GenAI. These companies' investments in AI show up in research and development expenditures in the income statement.

The AI Money Flow

Here's how the investments in AI flows through various companies. Let's look at each step.

Following the flow of money invested into AI.
Source: Prasanna Rajagopal
  1. Nvidia designs the GPUs.

  2. Taiwan Semiconductor Manufacturing Company (TSMC) brings Nvidia's dreams to the market.

  3. Dell, HP, and other server manufacturers, primarily based in Asia, buy these GPUs from Nvidia and package them into servers. The cost of the GPUs is included in the server manufacturers' Cost of Goods Sold (COGS).

  4. Cloud providers purchase these servers. The cost of these AI servers is included in the capital expenditures.

  5. Companies worldwide purchase IaaS and PaaS services created by cloud providers to experiment with and create various AI products and services for their customers.

  6. Github Copilot, Salesforce's Einstein AI, ServiceNow AI agent, Apple Intelligence, and other products are examples of GenAI in the marketplace.

  7. Once a product is ready to be released, companies typically create a SaaS service and introduce their GenAI products to consumers and other companies across various industries.

  8. Consumers and companies pay for the GenAI service. Many services currently have a free and paid tier. The free service may typically have some restrictions on product use.

Companies such as Apple, Delta Airlines or Expedia build Chatbots, which they hope would help increase revenue, reduce the cost of serving their customers and thus boost their profit margins. But, most companies bringing GenAI products to market will have to see cost reductions in their operations soon or generate a profitable revenue stream.

Note about #2:

By now, most people are familiar with Jensen Huang, the unassuming, charismatic Nvidia founder. Most people probably have never heard of Morris Chang - the unassuming, spotlight-shunning, nonagenarian Taiwan Semiconductor Manufacturing Company (TSMC) founder. Here are a couple of articles to learn more about him:

Note about #5:

The cloud providers themselves are massive users of the GPUs they purchase. Internal product teams at Amazon and Microsoft are experimenting with and creating new GenAI products. These product development expenses appear as research and development (R&D) expenses. So, in addition to spending billions on capital expenditure, Amazon, Microsoft, and Google are racing to create new genAI products and, in turn, invest billions more in R&D.

Companies like Adobe, Apple, ServiceNow, Salesforce, and others are investing in GenAI R&D to create new products. Since Adobe, ServiceNow, and others do not buy the GPUs directly and maintain, for the most part, their own data centers, they rely on the cloud providers for their GPU and include the cost of buying those services in R&D. In this post, we will examine how those R&D expenses have changed for these companies with the advent of GenAI.

Note about #7:

When a product is released to the market by the R&D teams, the responsibility of maintaining the service is turned over to the Cloud Operations and Support teams at Adobe, Salesforce, ServiceNow, and others. The cost of providing these services to customers and the associated GPU use is included in the cost of goods sold (COGS).

Research and Development Spending By Companies

Apple's R&D Spending

Apple is one of the largest companies on the planet in terms of revenue, profits, and market value. They have also been slow to announce AI services, only recently announcing Apple Intelligence. Apple is a big R&D spender with one of the largest R&D budgets in the world. Apple spent nearly $30 billion on R&D in 2023.

Chart: Apple's Annual R&D Expense (2007 - 2023)

(Chart Created Using Snowflake Snowsight)

Table: Apple's Annual R&D Spending

Apple's Annual R&D Expense
Queried in Snowflake, Table Formatted in Excel

Apple has increased its R&D budget by 38x since 2007. With the GenAI race just getting started, I do not see these massive expenses abating anytime soon. When you look at the chart below the R&D expense (yellow bar) compared to Revenue (blue bar) looks so tiny.

In fact, Apple only spent 7.8% of revenue on R&D. But, this is the company's highest spend in terms of dollar amounts and as a percent of revenue. The company increased its R&D spend by 114 basis points from 2022, adding over $3 billion to its R&D expense. Apple's motivation to release AI products and services may be behind this increase in R&D expense, especially at a time when its revenue declined from 2022 to 2023.

Chart: Apple's Annual R&D Spending Compared to Revenue

Apple's Annual Revenue & R&D Expense
Created Using Snowflake Snowsight

Table: Apple's R&D Expense As a Percent of Revenue.

Apple's R&D Expense As a Percent of Revenue.
Queried in Snowflake, Table Formatted in Excel

Salesforce's R&D Expense

Let's look at R&D spending by Salesforce and how that's changed over time and feeling the pressure to invest in GenAI. Here's Salesforce's R&D expense compared to its annual revenues.

Chart: Salesforce's Revenue (blue bar) and R&D Expense (yellow bar)

Salesforce's Revenue and R&D Expense
Created Using Snowflake Snowsight

Table: Salesforce's Revenue and R&D Expense as a Percent of Revenue

Queried in Snowflake, Table Formatted in Excel

Salesforce has been spending above 14% of its revenue on R&D since 2017, well above Apple's expenditure in this category. Salesforce has probably decided that it is spending much on R&D already and only needs to reallocate, prioritize funds and teams to focus on GenAI projects.

Microsoft's R&D Expense

Microsoft is already spending plenty on capex. It is spending billions more on R&D. But as a percent of revenue, the company has not increased its spending. On dollar terms Microsoft has definitely increased it spending. Its R&D expense as a percent of revenue in 2024 was lower compared to 2023. But, in dollar terms the company increased its spending by over $2 billion.

Chart: Microsoft Revenue and R&D Expense

Microsoft Revenue and R&D Expense.
Created Using Snowflake Snowsight

Table: Microsoft's Revenue, R&D Expense, and R&D as a Percent of Revenue

Microsoft Revenue, R&D Expense, and R&D As a Percent of Revenue
Queried in Snowflake, Table Formatted in Excel

Companies that have were already spending well above 10% on R&D have probably prioritized the budgets with a focus on GenAI. Megatech companies such as Apple and Microsoft have increased their R&D expense by a few billion dollars. These fresh dollars are mostly likely focused on creating new AI products and services.

Disclosures: I am a Sales Engineer at Snowflake. All opinions in this blog post are solely mine and do not reflect Snowflake's views. I am not a Registered Investment Advisor, and any discussion on securities or investments is not an inducement to make a particular investment.






Thursday, August 26, 2021

Salesforce Q2 FY 2022 Earnings Call Highlights

  • Salesforce (NYSE: CRM)
  • Slack acquisition has been closed.  
  • The company's first $6 billion in revenue in a single quarter.
  • 23% year-over-year (y-o-y) revenue growth with a total of $6.34 billion in revenue for the quarter.
  • Operating margin of 20.4%. It's an improvement of 20 basis points year-over-year.   
  • "I'm very excited that 5 out of the last 5 quarters that we've had that 20% or greater revenue growth. And that 3 of the last 5 quarters, we're having greater than 20% operating margin." - Marc Benioff, CEO.  
  • Sales Cloud grew at 15% y-o-y.  
  • Service Cloud is now a $6 billion business.
  • Service Cloud grew at 23% y-o-y.
  • Marketing & Commerce Cloud grew at 28% y-o-y.  
  • "And every one of these digital transformations is also a data transformation, which is driving the unprecedented success we're seeing in Tableau and MuleSoft. Tableau is within 9 of our top 10 deals this quarter, and MuleSoft is within 8 of our top 10 deals." - Bret Taylor, COO, Salesforce.  
  • Industry Cloud grew at 58% y-o-y.  
  • Salesforce is aggressively launching a "Slack-first" customer 360 project. All Salesforce products will be integrated with Slack.  
  • Slack's revenue grew by 39% y-o-y.    

(Source: Salesforce)

Exhibit: Marc Benioff - CEO Salesforce.  
(Source: Salesforce)

Published: August 26, 2021.


 

How Much Does Coca-Cola Spend on Advertising?

Coke's AI Generated Ad (Source: WSJ.com) Ads are meant to evoke a reaction, an emotion, and an action. Great ads can bring you t...