PYTHON
[|]
#Part 15

2024 U.S. Economy Highlights & Dashboard Insights for Retail Investors

How did we track the economic rollercoaster of 2024?

Here, you'll find some insights into the US economy from 2024 (relevant for retail investors) and thought-provoking questions for 2025. Stay tuned!

This article presents a dual perspective: a practical achievement in economic data visualization and key insights that shaped the year.

On the tech side, we've built a comprehensive dashboard that aggregates data from multiple sources (FRED, Yahoo Finance) into a single monitoring system. The platform combines traditional economic metrics with market data, featuring automated updates and showcasing data pipeline capabilities through minute-level crypto tracking as a practical example.

2024's Key Economic Insights:
  • Post-pandemic inflation finally showing consistent cooling trends
  • Labor market maintaining resilience despite higher rates
  • Diverging inflation patterns between the US and the Euro Area
  • Stock market reaching new highs despite economic uncertainties
Questions for 2025:
  • Will the Fed's "higher for longer" stance persist?
  • Can the labor market maintain its strength?
  • How will regional inflation differences affect global trade?
  • Is the stock market rally sustainable?
Discussion in Telegram
Screencasts on Youtube
Articles on Medium
Code on Github
Author: Ivan Brigida
Data Analyst and Financial Enthusiast
NOT INVESTMENT ADVICE
The Content is for informational purposes only, you should not construe any such information or other material as legal, tax, investment, financial, or other advice.

Intro

While hosting our first Stock Markets Analytics Zoomcamp earlier in 2024, we included a module on various data sources, including macroeconomic statistics. I realized that I occasionally want to review these datasets, especially when anticipating events influenced by them (e.g., unemployment or inflation statistics).
To address this, I recently shared the Workshop on Economics, Databases, and Automation—a project that actually builds a data workflow and a dashboard for macro stats in one place. It's a convenient way to check and track these statistics.

The curated collection of macroeconomic data is beautifully displayed on a data site that is automatically updated regularly:
> LIVE Dashboard Link (https://economics-workshop-dec-2024.streamlit.app/) <
Here is the screenshot of the dash for the first page:
Executive Summary
The year 2024 marked a pivotal chapter for the U.S. economy and financial markets, offering a mix of stabilization and transformation. This article explores two interconnected themes: the insights derived from key economic indicators and the technological innovation behind a comprehensive economic dashboard that aggregates data for retail investors.

Economic highlights of the year included the cooling of post-pandemic inflation, resilience in the labor market despite elevated interest rates, and the divergence in inflation trends between the U.S. and Euro Area. Financial markets defied uncertainties, with the S&P 500 reaching new highs fueled by AI advancements and improving inflation metrics. The Federal Reserve initiated a cautious easing cycle, bringing interest rates down from their peak while addressing inflationary pressures. Meanwhile, bond markets regained prominence, offering retail investors attractive yields not seen in over a decade.

On the technical front, the development of a centralized, automated dashboard enabled seamless monitoring of these trends, merging macroeconomic data with real-time market insights. This innovation provided investors with a practical tool to track minute-level developments and navigate the evolving economic landscape.

As we look to 2025, critical questions persist: Will the Federal Reserve maintain its "higher for longer" stance? Can the labor market sustain its strength? Is the stock market rally built on solid fundamentals? This reflection provides a foundation for informed investment decisions and strategic planning in the coming year.

Summary of Results

  • S&P 500 grows 1.5x since mid-2023
    Every month since April-2023 shows positive YoY growth, mostly exceeding the 10-year average of 12.2% and long-term average of 10% yearly.
    01
  • Interest rates remain high - 4.25%-4.5% for Fed rate (December 2024)
    US Fed rate cut happened 3 times in 2024: from 5.25% in May 2023 to 4.5% by December 2024.
    02
  • Core inflation stabilizes at 3.3%
    Significant decline from 8.5% peak in mid-2022, settling above pre-pandemic 2% target.
    03
  • Unemployment holds at 4.2%
    Slight increase from historical low of 3.5% in mid-2022, maintaining overall labor market strength.
    04
  • GDP outperforms potential growth
    Real GDP growth at 2.5-2.7% exceeds potential GDP growth of 2.1%, showing stronger performance than other developed economies.
    05

Full Overview on YouTube

A detailed discussion of the dynamics of economic indicators in 2024, what it means for a retail investor (in the US market), and how to replicate the code with an AI assistant from scratch.
You can watch the first 44 minutes to get the economic update, and then continue until the end to get the technical details of the implementation.

S&P 500: A Decade of Market Excellence (2014-2024)

The S&P 500's journey over the past decade showcases remarkable performance, with the index tripling in value - an impressive return for long-term investors. This benchmark index, representing America's 500 largest publicly traded companies, serves as both the cornerstone of U.S. retirement savings and a barometer of overall economic health, accounting for about 80% of the available market capitalization.

From 2014 to 2024, the market delivered robust growth, with particularly strong performance in recent years. The post-COVID recovery has been especially notable: from January 2023 to late 2024, the index demonstrated significant growth (23% average growth YoY monthly), far exceeding its historical average (12.2% in the last 10 years) - a testament to market resilience as the world emerged from the pandemic era.
Risks for Future Growth

However, this rapid growth has brought concerns, particularly regarding valuations. The price-to-earnings (P/E) ratio of the S&P 500 has steadily risen and is now nearing the upper bounds of its long-term confidence interval. (For more details, see this link).

Entering 2024, the market reached new all-time highs, fueled by AI enthusiasm and improving inflation outlook. However, several key events triggered notable pullbacks:

Pullbacks in 2024: A Year of Adjustment
Despite the overall upward trajectory, 2024 has been marked by several pullbacks. These were driven by various factors, including:
  • Lower corporate earnings expectations: Analysts scaled back growth projections for major sectors.
  • Federal Reserve rate cuts: Surprising monetary policy decisions sparked uncertainty among investors.
  • Political turbulence: The U.S. elections, featuring a return of Donald Trump, added an additional layer of market apprehension.
Tracking S&P 500 Shocks Through VIX Movements
One of the best tools to monitor the magnitude of market shocks is the Cboe Volatility Index (VIX), often called the "fear gauge." The VIX measures market expectations of near-term volatility and tends to spike during periods of uncertainty or stress. In 2024, the index experienced several notable spikes, each reflecting a confluence of market dynamics.

Let's look at the graph of VIX in 2024 (full version of 35 years history is available in the dash (Tab "Stock Market overview", graph "VIX Volatility Index"):

Interest Rates

Federal Reserve's Rate Policy: From Hawkish Heights to Dovish Descent

The Federal Reserve's monetary policy journey has been particularly intriguing, especially following the aggressive rate-hiking cycle of 2022-2023. After reaching a peak of 5.25% in May 2023 - the highest level in over 15 years - the Fed's stance has begun to shift. While market expectations for rate cuts emerged as early as late 2023, the Federal Reserve maintained its cautious approach, beginning its easing cycle only in autumn 2024.

The downward trajectory finally materialized with three consecutive rate cuts in September, November, and December 2024, bringing the Federal Funds Rate down to 4.25%-4.50% from its peak. This series of cuts marked a significant pivot in monetary policy, reflecting the Fed's growing confidence in inflation control while balancing economic growth concerns.

Looking at the historical context shown in our 25-year graph, the recent rate environment stands out dramatically. The current rates, while lower than the 2023 peak, remain well above the near-zero levels that characterized much of the post-2008 era. The Fed's path to these levels was remarkably steep - from March 2022 to May 2023, rates climbed from 0.50% to 5.25% through a series of aggressive hikes, including several 75-basis-point increases.

The Federal Open Market Committee (FOMC) maintains its structured approach to monetary policy decisions, with eight scheduled meetings per year. The first FOMC meeting of the upcoming year is set for January 28-29, with the rate decision announcement scheduled for January 29. These regular meetings provide crucial windows for potential policy adjustments as the Fed continues to navigate the balance between controlling inflation and supporting economic growth.

What makes this period particularly notable is the Fed's methodical approach to rate reductions, despite persistent market pressure for earlier cuts throughout 2023. This patience in monetary policy highlights the Fed's commitment to data-dependent decision-making, even when facing market expectations for more aggressive easing.

Federal Funds Rate graph (last 25 years):
Bond Investing: A Fresh Look at Fixed Income in 2024

The bond market has undergone a remarkable transformation since the near-zero yield environment of 2020-2022, creating compelling opportunities for retail investors. As of December 2024, Treasury yields across different maturities (1-year, 5-year, and 10-year) have settled in the 4-5% range, offering attractive fixed-income returns that haven't been available for over a decade.

For retail investors, this environment presents several advantages through bond ETFs and individual Treasury securities:
  • Income Generation Potential Today's bond market offers yields comparable to or even exceeding the Federal Funds Rate, with the added benefit of regular dividend payments. While these rates may gradually decline as the Fed continues its easing cycle, current yields still provide meaningful income streams for conservative investors.
  • Portfolio Diversification Benefits The traditional role of bonds as a portfolio stabilizer has become more attractive again. The current yield environment means investors no longer have to sacrifice significant returns for this safety, unlike during the ultra-low rate period of 2020-2022. This makes bonds particularly valuable for:
  • Retirement portfolios seeking stable income
  • Risk-balanced investment strategies
  • Protection against stock market volatility

Market Analysis and Yield Curve Dynamics The Treasury yield curve has normalized after experiencing an unusual inversion during 2020-2022. The current structure, where longer-term bonds (10-year) typically offer higher yields than shorter-term ones (1-year), reflects a more traditional market environment. This normalization suggests improved economic stability and offers investors clearer choices based on their time horizons.

Here is the graph of the Treasury Yields as of end-December 2024 (last 5 years):

US Macroeconomic indicators

U.S. GDP: A Quarter Century of Economic Resilience

The 25-year perspective of U.S. GDP growth tells a compelling story of economic resilience and recovery through multiple challenges. Looking at the relationship between real GDP growth and potential GDP growth provides crucial insights into the economy's fundamental strength and its capacity to weather major disruptions.

Three significant economic shocks stand out in this period:
  • The 2000 dot-com bubble burst
  • The 2008-2009 financial crisis and housing market collapse
  • The 2020 COVID-19 pandemic, which triggered an unprecedented -7.5% decline (April 2020), marking the sharpest but briefest contraction
What's particularly noteworthy is the current state of the U.S. economy.
As of 2023-2024, real GDP growth has not only recovered but is tracking at 2.5-2.7%, exceeding the potential GDP growth rate of 2.1%. This outperformance suggests robust economic health and indicates that the U.S. economy is operating above its theoretical long-term sustainable growth path.
This strong performance becomes even more impressive when viewed in a global context, particularly compared to other developed economies. The U.S. has demonstrated stronger growth dynamics than many peer economies, especially those in the European Union.
Unemployment Trends

The U.S. labor market has demonstrated remarkable resilience, particularly in the post-pandemic era. After the unprecedented spike to nearly 15% during the COVID-19 shutdown in 2020, unemployment has made an extraordinary recovery. As of November 2024, the rate stands at 4.2%, near historical lows. This level is particularly impressive considering the Federal Reserve's aggressive rate hikes during 2022-2023.
However, the slight uptick in recent months warrants attention. While still within healthy ranges, this gradual increase from the post-pandemic lows could signal a minor cooling in the labor market. For investors and market watchers, these weekly unemployment claims serve as a crucial early indicator of economic health and potential market reactions.

Inflation Dynamics

The inflation story has been one of the most watched economic narratives since the pandemic. Following the COVID-19 recovery, inflation surged to levels not seen in decades, peaking at 6-8% as consumers rapidly returned to normal spending patterns, unleashing pent-up demand and savings accumulated during lockdowns.
By late 2024, inflation has moderated significantly but remains above historical norms:
  • Core inflation: 3.3%
  • All items: 2.7%
  • Pre-pandemic target: 2.0%
This "new normal" of slightly elevated inflation around 3% (versus the pre-pandemic 2% target) has important implications:
  • The Federal Reserve maintains vigilant monitoring
  • Rate cuts could pause if inflation shows signs of reacceleration
  • Investment strategies may need adjustment to account for this higher baseline
For retail investors, these interlinked trends between unemployment and inflation create a complex decision-making environment. The Fed's challenge of maintaining price stability while preserving employment gains continues to influence market dynamics and investment opportunities.

Looking Ahead: Key Trends and Questions for 2025

As we analyze the economic landscape heading into 2025, several critical trends from 2024 warrant careful monitoring. The U.S. economy showed remarkable resilience in 2024, but key questions remain about the sustainability of current conditions.

Areas to Watch:

Growth and Monetary Policy
With real GDP growth outpacing potential (2.7% vs 2.1%) and inflation settling at a new baseline around 3%, the Fed's balancing act continues. Will they maintain their measured approach to rate cuts, or will economic data force a faster easing cycle? The path from the current 4.25-4.50% rate level will significantly influence both equity and bond markets.

Market Dynamics
The S&P 500's strong performance through 2024 raises questions about sustainability. With market valuations stretched and the index reaching 6000, investors should watch for:
  • Corporate earnings growth to support current valuations
  • Impact of gradually declining interest rates on market sectors
  • VIX movements as indicators of market stress points
Economic Indicators Convergence
The interplay between unemployment (currently 4.2%), inflation (3.3% core), and GDP growth will be crucial. Any significant deviation from these relatively stable levels could signal broader economic shifts requiring portfolio adjustments.

Key Questions for Investors:
  1. Will the "soft landing" scenario continue to play out?
  2. Can corporate earnings justify current market valuations?
  3. How will bond yields respond to the Fed's easing cycle?
These trends suggest maintaining a balanced approach while staying alert to signals that could indicate shifts in the current economic narrative.
Fed December 2024 Projections (2025-2027): Official Outlook
Understanding the Federal Reserve's economic projections is crucial as they not only influence monetary policy decisions but also provide a framework for evaluating market expectations and potential economic scenarios. Here are the key median projections from the Fed's December 2024 meeting:

  1. Growth:
  • Fed projects 2.5% GDP growth for 2024 (vs. our 2.7% observation)
  • Slowing to 2.1% in 2025
  • Gradually declining to 2.0% in 2026 and 1.9% in 2027
  1. Unemployment:
  • Fed sees 4.2% for 2024 (matching current observation)
  • Slight increase to 4.3% in 2025-2027
  1. Inflation:
  • Core PCE inflation: 2.8% for 2024 (lower than our 3.3% core observation)
  • Declining to 2.5% in 2025
  • Further easing to 2.2% in 2026 and 2.0% in 2027
  1. Federal Funds Rate:
  • 4.4% end of 2024 (aligning with current 4.25-4.50% range)
  • Declining to 3.9% in 2025
  • Further drops to 3.4% in 2026 and 3.1% in 2027
The Fed's projections generally support a "soft landing" scenario with gradual disinflation and maintained growth, though they're slightly more optimistic on inflation and see slightly lower growth than our current observations. Their rate path suggests a measured approach to easing, supporting the view of a careful balancing act in monetary policy.

Full Fed projections available here.

Building a Real-Time Economic Dashboard: From Notebook to Production

THE GITHUB REPO LINK: https://github.com/realmistic/economics-workshop-dec-2024

The journey of building our Economic Data Dashboard showcases a modern data pipeline and development workflow, leveraging AI assistance to accelerate development while maintaining high code quality.

The Evolution
What started as a simple Jupyter notebook exploring financial data has evolved into a production-ready dashboard with real-time updates. The development process followed a natural progression from data collection to visualization to deployment.

Data Collection & Storage
Our data pipeline begins with two primary sources: FRED (Federal Reserve Economic Data) and Yahoo Finance. We initially prototyped data collection in a Jupyter notebook, then modularized it into dedicated Python scripts. The fred_data_retrieval.py script handles macroeconomic indicators, while btc_minute_data.py manages cryptocurrency data collection.
Data persistence is handled through SQLite, chosen for its simplicity and portability. This local-first approach makes the application easy to develop and deploy, while still maintaining robust data management capabilities.

Visualization & Interface
The frontend is built with Streamlit, which transforms our Python scripts into a polished web application. We leverage Plotly for interactive charts, providing users with rich data exploration capabilities. The application is organized into themed pages (economic indicators, stock market, interest rates, etc.), each focusing on specific aspects of the economic landscape.

Development Workflow
One of the most interesting aspects of this project is the AI-assisted development approach using Cline. This tool accelerated our development process by:
  • Generating boilerplate code
  • Suggesting optimizations
  • Helping with code organization
  • Assisting with debugging
Automation & Deployment
The project uses a clever combination of GitHub Actions and Streamlit Cloud for automated updates:
  1. GitHub Actions runs our daily data collection workflow:
  • Executes the FRED data retrieval script
  • Updates the SQLite database
  • Commits the updated database back to the repository
  1. Streamlit Cloud handles deployment:
  • Automatically detects new commits to the database file
  • Rebuilds and deploys the dashboard with fresh data
  • No complex CI/CD needed - just push and deploy
This simple yet effective setup ensures our dashboard always shows the latest economic data without requiring complex deployment pipelines.

The Result
The final product is a daily-updated economic dashboard that combines multiple data sources and interactive visualizations. The modular structure (pages/ directory, separate styling in static/css/, utility functions) makes the codebase maintainable and extensible.
This architecture demonstrates how modern tools and practices can be combined to create a sophisticated financial data platform, using GitHub Actions for data automation and Streamlit Cloud for seamless deployment.
Conclusion
The U.S. economy in 2024 demonstrated remarkable resilience, adapting to shifting monetary policies and global economic dynamics. Inflation moderated to sustainable levels, the labor market showed strength, and real GDP growth outpaced potential, reinforcing the economy's robustness. Financial markets achieved unprecedented highs, even as they navigated periodic volatility and valuation concerns.

These achievements were mirrored by advancements in technology, with the creation of an economic dashboard offering a consolidated view of macroeconomic data and market trends. This tool underscored the importance of accessible, real-time analytics for retail investors aiming to stay ahead in an uncertain landscape.

Looking ahead to 2025, challenges and opportunities coexist. Key areas to monitor include the Federal Reserve's monetary policy trajectory, the durability of corporate earnings, and the evolving interplay between inflation, unemployment, and growth. By combining insights from 2024 with cutting-edge tools for analysis, investors are well-positioned to navigate the uncertainties of the future while seizing opportunities in an ever-changing economic environment.

Do you find the article useful?

Do you like the content?
Consider to make a donation
Whether you're grateful for the content (Buy Me A Coffee page), or you wish to support me coding (GitHub sponsorship page)

Leave your feedback on the article

For example, is it easy to understand?
For example, could you run the code?
For example, do you have idea to improve the article ?

Here you'll find the best articles from PythonInvest. Only useful digests, no spam.