A primitive Python script to analyse basic gold price statistics of July.
Gold Aug 26 (GC=F) Stock Price, News, Quote & History - Yahoo Finance
Added a primitive linear regression prediction.
See if you can beat the statistics:


ChatGPT script results:
Calculation-period verification
-----------------------------------------------------------------
Requested previous month: 2026-07-01 to 2026-07-31
First available trading observation: 2026-07-01
Last available trading observation: 2026-07-31
Number of observations used: 22
Statistics use previous month only: YES
Regressions use previous month only: YES
Statistics for July 2026
-----------------------------------------------------------------
Monthly maximum based on daily high: $4,199.70
Median of the month's daily highs: $4,101.20
Median of the month's daily lows: $4,027.10
Monthly minimum based on daily low: $3,963.00
Primitive linear projection
-----------------------------------------------------------------
Regression source period: July 2026 only
Prediction period: August 2026
Last actual observation: 2026-07-31
Prediction ending date: 2026-08-31
Daily-high regression slope: $-3.2197 per observation
Daily-low regression slope: $-1.0794 per observation
Projected daily high at period end: $4,034.79
Projected daily low at period end: $3,999.73
DeepSeek script results:
Data for July 2026:
Number of trading days: 22
Monthly Maximum (based on Daily High): $4199.70
Monthly Maximum Median (based on Daily High): $4101.20
Monthly Minimum Median (based on Daily Low): $4027.10
Monthly Minimum (based on Daily Low): $3963.00
Estimated trading days in next month: 22
Prediction for end of next month (High): $3991.47
Prediction for end of next month (Low): $4000.50
============================================================
SUMMARY OF CALCULATED VALUES:
============================================================
1. Monthly Maximum (Daily High): $4199.70
2. Monthly Maximum Median (Daily High): $4101.20
3. Monthly Minimum Median (Daily Low): $4027.10
4. Monthly Minimum (Daily Low): $3963.00
5. Predicted End of Next Month (High): $3991.47
6. Predicted End of Next Month (Low): $4000.50
============================================================
============================================================
PRIMITIVE LINEAR PROJECTION
============================================================
Latest actual observation: 2026-07-31
Projection ending date: 2026-08-24
Daily-high regression slope: $-3.2197 per observation
Daily-low regression slope: $-1.0794 per observation
Projected daily high at period end: $3,991.47
Projected daily low at period end: $4,000.50
============================================================