Silver had a memorable year (+148%). Some of this can be explained by a decline in the dollar. I decided to do some ML analysis to look for other insights. I downloaded 100 years of monthly price data from macrotrends.net. Note that gold prices were fixed by the US government until 1971 and this likely held silver prices in check. Silver ended the year over $71/oz. You can see from the histogram and box plot charts how unusual that is:
The next thing I looked at was the gold/silver ratio. This uncovered something I didn't know. The linear regression of the ratio shows that it has been rising. The current ratio is well below the regression line meaning that silver is priced higher than typical versus gold. A reversion to the regression line would require either gold to rise in price or silver to drop. Based on this chart, I decided to sell about 80% of my silver.
Next, I took a look at the inflation adjusted prices. This chart is from macrotrends.net and suggests that silver could rise over $100/oz if it followed the same trajectory.
Finally, I ran a SARIMAX model to forecast the price six months in the future. I gave the model gold prices as exogenous data and assumed gold prices would rise 0.5% for the next six months. The forecast looks tiny since there are 100 years of price data. The forecasted silver price in six months was $79.37/oz. The inflation chart makes a case for higher prices, but the long term regression line suggests lower prices, at least in relation to gold.
Wednesday, December 31, 2025
Monday, March 3, 2025
Quantifying Trickle Down in Real Average Earnings
I studied a handful of economic measures to see their affect on Real Average Earnings. I used the following series from the St. Louis Fed FRED system:
Although many series went back to 1948, some only had more recent data starting in 2003. I limited the study to where the data overlapped. The first thing I did was deflate average hourly earnings by the CPI to get real average earnings. The inflation spike from the COVID era made a real dent (no pun intended). Next, I ran a time series model, but didn't find a strong time signal in the data.
I followed up with a multiple regression model. Only two features were statistically significant:
The adjusted R-squared was 0.838: the model accounted for 83.8% of the real average earnings. The F-statistic of 190.8 with probability of 5.24e-83 showed the model was statistically significant.
The factors with statistical significance were JOLTS quits and corporate profits. The coefficients suggest the following:
an increase of one million quits is associated with an increase of approximately $1.13 in real average earnings (job market tightness).
an increase of one trillion in corporate profits is associated with an increase of approximately $0.31 in real average earnings (nice trickle down!).
I didn't start looking at this data with any goal in mind, especially of quantifying trickle down economics. I just wanted to discover correlations and relationships. I am often surprised by what data reveals, but there are many other factors at play. Big changes happen during periods of turmoil, like the Great Recession of 2008, and COVID. Real earnings appeared to spike during these deep recessionary events, at least temporarily. I may add additional factors to the model in the future: Labor Productivity Index, Union Membership Rate, GDP Growth Rate.
- Average Hourly Earnings of All Employees, Total Private (CES0500000003)
- Consumer Price Index for All Urban Consumers: All Items in U.S. City Average (CPIAUCSL) base 100=1982
- Job Openings: Total Nonfarm (JTSJOL)
- Quits: Total Nonfarm (JTSQUL)
- Unemployment Rate (UNRATE)
- Employment-Population Ratio (EMRATIO)
- Labor Force Participation Rate (CIVPART)
- Corporate profits after tax (CP)
Although many series went back to 1948, some only had more recent data starting in 2003. I limited the study to where the data overlapped. The first thing I did was deflate average hourly earnings by the CPI to get real average earnings. The inflation spike from the COVID era made a real dent (no pun intended). Next, I ran a time series model, but didn't find a strong time signal in the data.
I followed up with a multiple regression model. Only two features were statistically significant:
- JOLTS quits
- Corporate profits
The adjusted R-squared was 0.838: the model accounted for 83.8% of the real average earnings. The F-statistic of 190.8 with probability of 5.24e-83 showed the model was statistically significant.
The factors with statistical significance were JOLTS quits and corporate profits. The coefficients suggest the following:
an increase of one million quits is associated with an increase of approximately $1.13 in real average earnings (job market tightness).
an increase of one trillion in corporate profits is associated with an increase of approximately $0.31 in real average earnings (nice trickle down!).
I didn't start looking at this data with any goal in mind, especially of quantifying trickle down economics. I just wanted to discover correlations and relationships. I am often surprised by what data reveals, but there are many other factors at play. Big changes happen during periods of turmoil, like the Great Recession of 2008, and COVID. Real earnings appeared to spike during these deep recessionary events, at least temporarily. I may add additional factors to the model in the future: Labor Productivity Index, Union Membership Rate, GDP Growth Rate.
Thursday, February 13, 2025
Predicting Gold Prices with SARIMAX
Not investment advice.
I collected 54 years of gold price data from the St. Louis Fed starting 9/30/71 (end of the US federal government fiscal year after gold was allowed to float). I also collected the 10-year treasury rate, US public debt, and inflation rate for the same dates. I used python to run some statistical models on the data and predict the gold prices for the next three years. I cleaned up the data and scaled the debt down to be in line with the other data. Initial correlation of the variables showed a positive relationship with US debt, and negative correlations with the 10-year treasury rate and inflation. However, in the final analysis, the relationships were not what I expected.
Initial correlation of features with price
Price: 1.000000
debt (billions): 0.951928
treasury_rate -0.634155
inflation -0.288526
Here is a scatter plot of the price data:
I initially built two machine learning models that worked quite well within the known universe of prices, but did poorly at extrapolation. Time series models were a better choice to analyze financial data. I made one attempt using Meta’s prophet time series model, but could not find enough good documentation to use it. Then, I tried SARIMAX (Seasonal Autoregressive Integrated Moving Average + exogenous variables). It's a state space model, a type of mathematical model used to describe time series data, where the observed data is linked to an underlying, unobservable (latent) state that evolves over time. These models are particularly useful for situations where the system being modeled is influenced by both systematic dynamics and random noise. For future predictions, I created a set of estimated data with the following hypothesis:
- US debt continues to grow at the mean rate from 2017-2024
- inflation drops to 2.7% and stays there
- the 10-year treasury rate drops to 4.2% in 2025, then 3.8% the following two years
The model found that only US debt was statistically significant in determining gold prices. Neither the treasury rate nor inflation had significant impacts on the price. I found that surprising. As you can see from the chart, there was a pretty wide confidence interval in the predictions.
Predicted Gold Prices through 2027
9/30/2025 $2,838.27
9/30/2026 $2,985.15
9/30/2027 $3,130.70
The P>|t| was .202, well above the threshold of 0.05 to reject the null hypothsis. Therefore, we cannot reject the null hypothesis. The R-squared was 0.044 meaning only 4.4% of the gold price can be explained by inflation. That made me more confident in the SARIMAX model.
I collected 54 years of gold price data from the St. Louis Fed starting 9/30/71 (end of the US federal government fiscal year after gold was allowed to float). I also collected the 10-year treasury rate, US public debt, and inflation rate for the same dates. I used python to run some statistical models on the data and predict the gold prices for the next three years. I cleaned up the data and scaled the debt down to be in line with the other data. Initial correlation of the variables showed a positive relationship with US debt, and negative correlations with the 10-year treasury rate and inflation. However, in the final analysis, the relationships were not what I expected.
Initial correlation of features with price
Price: 1.000000
debt (billions): 0.951928
treasury_rate -0.634155
inflation -0.288526
Here is a scatter plot of the price data:
I initially built two machine learning models that worked quite well within the known universe of prices, but did poorly at extrapolation. Time series models were a better choice to analyze financial data. I made one attempt using Meta’s prophet time series model, but could not find enough good documentation to use it. Then, I tried SARIMAX (Seasonal Autoregressive Integrated Moving Average + exogenous variables). It's a state space model, a type of mathematical model used to describe time series data, where the observed data is linked to an underlying, unobservable (latent) state that evolves over time. These models are particularly useful for situations where the system being modeled is influenced by both systematic dynamics and random noise. For future predictions, I created a set of estimated data with the following hypothesis:
- US debt continues to grow at the mean rate from 2017-2024
- inflation drops to 2.7% and stays there
- the 10-year treasury rate drops to 4.2% in 2025, then 3.8% the following two years
The model found that only US debt was statistically significant in determining gold prices. Neither the treasury rate nor inflation had significant impacts on the price. I found that surprising. As you can see from the chart, there was a pretty wide confidence interval in the predictions.
Predicted Gold Prices through 2027
9/30/2025 $2,838.27
9/30/2026 $2,985.15
9/30/2027 $3,130.70
Hypothesis test
The SARIMAX model indicated that inflation did not have a statistically significant effect on gold prices. I wanted to run a separate hypothesis test on that idea. The null hypothesis was: "Inflation is not a statistically significant factor in determining gold prices". I ran an OLS linear regression on the data, with a constant added to the intercept.The P>|t| was .202, well above the threshold of 0.05 to reject the null hypothsis. Therefore, we cannot reject the null hypothesis. The R-squared was 0.044 meaning only 4.4% of the gold price can be explained by inflation. That made me more confident in the SARIMAX model.
Sunday, February 9, 2025
Reboot
After 16 years, I thought it was time to reboot this blog. Most of the analysis was out of date, and not really applicable to current economic conditions. In addition, I've acquired new skills and can do better analysis now using machine learning. I am looking forward to starting over, investigating new data, and hoping that any spirals in the near future are upward health and prosperity.
Subscribe to:
Comments (Atom)











