Exploring Pricing Relationships in Consumer Products & Public Markets with SQL

Exploring Pricing Relationships in Consumer Products & Public Markets with SQL

In 2022, fabric and home care products, including the juggernaut Tide brand, generated 31% of net earnings for Procter & Gamble. Organic coconut water is the lifeblood of the smaller Vita Coco Company.

Tide Pods by Procter & Gamble

Though external factors including macroeconomic shifts and sentiment among institutional investors impact share prices for publicly-traded companies, how companies price their products, especially keystone products like Tide with an outsized impact on revenue, sits at the root of profitability, growth, and competitiveness.

You won’t find correlation metrics between product prices and share prices on Yahoo Finance or your broker’s dashboard, though, and for good reason. Gross margin is cleaner, and crucially there is no single source of truth for the price of a given product. Further, stock prices aren’t impacted just by a company’s fundamentals, but by float and general sentiment, too.

Product pricing, however, may have the potential to be a leading indicator for a company’s performance. This experiment explores this hypothesis, tracking the relationship between product prices and share prices over time for three consumer products companies, Kleenex manufacturer Kimberly-Clark, Tide manufacturer Procter & Gamble, and beverage brand The Vita Coco Company.

Identifying Keystone Products

Identifying which products to test as leading indicators for their companies is part guesswork, part research. Which products are core to the business and drive significant revenue? Which are the most well-known by consumers?

Kimberly-Clark, for example, owns dozens of staple consumer brands including Scott, Huggies, and Cottonelle. This year, the conglomerate established a controlling stake in the popular feminine care disruptor brand Thinx. Still, Kleenex is the firm’s biggest name, and consumer tissue generates a substantial portion of revenue, and I believe tracking an 8-pack of standard tissues has the potential to be a reasonable proxy for the brand as a whole.

Automated Data Collection

Each week, my script pulls pricing data for selected products and shares from Amazon and Yahoo Finance into my PostgreSQL database for the project, illustrated below. Company, stock, product, and product pricing data are each stored in separate related tables.

While stock price data can be interpreted simply through the Yahoo’s yfinance Python package, JSON results from the Amazon API are parsed to extract the correct price parameter before being saved.

All Python files for this project, as well as CSVs used to keep the charts below up-to-date, are hosted on GitHub.


At this time, this experiment is too young to paint a picture one way or another with respect to the hypothesis. As more data is collected, I will present a coefficient, and the associated significance level, for correlation between percent changes in product prices and share prices.

With enough time, I hope the charts and data here shed some light on the relationship between companies’ share prices and the prices of the products that make those companies tick. I do not seek to prove a case one way or another with this limited set of information. See Model Limitations.

Procter & Gamble

The Procter & Gamble Company is the largest of the three companies, with a market cap of approximately $320.4B in October, 2022. The 81-count package of original Tide Pods tracked below can be found on Amazon here.


In October, 2022, The Kimberly-Clark Corporation had a market cap of approximately $41.9B. The multi-pack of Kleenex brand tissues tracked below can be found on Amazon here.

Vita Coco

The Vita Coco Company is the smallest of the companies tracked here, at about $602M. The company’s core product is their original organic coconut water, tracked here in a 12-pack.

Do you have thoughts or feedback on this experiment? What leading indicator do you look to when making investing decisions? Reach out! I’d love to hear from you.

Model Limitations

It is likely that this experiment will fail to illustrate whether product prices have the potential to serve as leading indicators for share prices.

Companies often adjust price-pack architecture without altering the retail price. If Kimberly-Clark changes the number of tissues in a box of Kleenex from 120 to 100, the model will be blind. Further, Amazon is an imperfect data source, featuring sales from third party vendors and offering only one price point among a sea of online and brick-and-mortar retailers. Changes in price may not reflect corporate strategy or business conditions.

Products identified as keystone products could be insignificant compared to other products not included in the model. Further, companies selected for this model may be poor examples to test correlation. A change in Apple's iPhone price may, for example, be a readier indicator of performance than a change price for P&G's Tide Pods.

These and other limitations mean this experiment should be taken as nothing more than an exploration. Results and relationships drawn from the model may be interesting, but they should not be taken as conclusive.

Resources Used