Claude Sonnet 3.5 Artifacts does Data Analysis!

Gaetan Lion
3 min readJul 1, 2024

--

The Claude AI has come up with new capabilities associated with its Artifacts feature.

Artifacts allows you to create digital objects. By communicating in plain English with Artifacts, it automatically generates the underlying codes (in a language called React) and the resulting output you asked for. The output could be an image, text, a presentation, a web page, a website, a video game, etc.

The YouTube below provides a good introduction to Artifacts.

I wanted to check if Artifacts could do visual data analysis. I thought this could be a stretch case for Artifacts. I already know that absent Artifacts Claude is an excellent economics and market analyst as demonstrated in this related article on investment management.

Now, I wanted to check if Claude leveraging Artifacts capabilities could generate and analyze a graph when given some data.

The data I provided to Claude/Artifacts was rather challenging as it consisted in a matrix of graphs that is challenging to read and interpret by humans (the graphs are rather small). The matrix consists of 12 time series graphs of macroeconomic variables related to the stock market, the economy, and interest rates.

Source: multpl.com

You can see the above graph matrix at the following website:

https://www.multpl.com/

I wanted Claude/Artifacts to use the above visual data and select the 10 Year Treasury Rate and the S&P 500 Earnings Yield. Include them in the same time series graph and capturing the time frame from 1990 to the present.

To complete this graph, Claude/Artifacts had to make several decisions:

  1. First, select only the two relevant variables out of 12.
  2. Second, truncate the time series of the X-axis so it starts in 1990 instead of 1880 (too far back to be relevant).

Claude/Artifacts quickly generated the requested graph. The cosmetics of the graphs were primitive. In plain English, I asked for a few cosmetic improvements. And, it readily did that. I specified the colors and thickness of the lines. And, it generated the following graph.

Next, I was going to prompt Claude/Artifacts to interpret the graph. But, without my prompting it did that automatically.

Claude/Artifacts graph interpretation

The graph shows the historical trends of both the S&P 500 Earnings Yield and the 10 Year Treasury Rate from 1990 to the present (2024). This visualization allows for easy comparison between these two important financial indicators over time.

Key observations from the graph:

  1. In the early 1990s, the 10 Year Treasury Rate was significantly higher than the S&P 500 Earnings Yield.
  2. There’s a general downward trend in both rates from 1990 to 2020, with some fluctuations.
  3. The S&P 500 Earnings Yield has been less volatile than the 10 Year Treasury Rate.
  4. In recent years (particularly after 2020), the two rates have converged, with the Earnings Yield slightly lower than the Treasury Rate in 2024.

This graph effectively illustrates the changing relationship between stock market valuations (represented by the Earnings Yield) and interest rates (represented by the 10 Year Treasury Rate) over the past three decades. It’s a useful tool for analyzing the relative attractiveness of stocks versus bonds and for understanding the broader economic context affecting the S&P 500’s valuation.

Would you like me to elaborate on any specific trends or periods shown in this graph?

Conclusion

Overall, I was pretty impressed by Claude/Artifacts data analysis and visualization capabilities.

--

--

Gaetan Lion

I am an independent researcher conducting analysis in economics, stock markets, politics, social sciences, environment, health care, and sports.