Task 1 — Histogram
Investigative Question
· Is XLB's daily return distribution symmetric from January 1, 2023, to January 1, 2025? What proportion of returns exceed ±2% (extreme volatility)?
Filtering
· Filtered for XLB between 2023-01-01 and 2025-01-01, excluding periods with missing data. Kept daily return percentages.
Conclusion
· Symmetry: XLB’s returns show a slight left skew due to global commodity price drops and demand changes.
· Extreme Volatility: 5.1% of days had returns > +2%, and 5.5% had returns < -2%, dominated by negative volatility.
· Investment Advice: Expect 10.6% of days with extreme volatility. Adjust XLB holdings based on economic conditions.
Task 2 — Box Plot (Category → daily_return_pct)
Investigative Question
· Do daily return volatilities differ across Sector ETFs, Macro Indicators, and Benchmark Indices from January 1, 2022, to January 1, 2025?
Filtering
· Filtered for Sector ETFs, Macro Indicators, and Benchmark Indices, focusing on daily return percentages.
Conclusion
· Volatility: Macro Indicators are most volatile, followed by Sector ETFs, and then Benchmark Indices.
· Sector ETFs: Cyclical ETFs (e.g., XLB) are more volatile than defensive ones (e.g., XLP).
· Investment Advice: Reduce volatility by increasing Benchmark Index allocation, but add XLB for cyclical exposure during recovery phases.
Task 3 — Line Chart (with moving average)
Investigative Question
· What is the relationship between the 2025 S&P 500 (^SPX) closing price and its 20-day SMA?
Filtering
· Retained data for ^SPX in 2025 and calculated the 20-day simple moving average.
Conclusion
Trend: SPX closed above the 20-day SMA, signaling a strong bullish trend with robust short-term price momentum and market confidence.
Task 4 — Bubble Chart (3 quantitative variables)
Investigative Question
· What is the relationship between rolling volatility, quarterly average daily return, and trading volume for XLB in 2024?
Filtering
· Calculated 20-day rolling volatility, quarterly average daily return, and trading volume for XLB over the 2024 quarters.
Conclusion
· Risk-Return: XLB shows medium risk and return with 12% volatility and 0.12% average return.
· Volume & Cycles: Trading volume correlates with the economic cycle, peaking in Q4 2024 due to recovery.
· Investment Advice: Pair XLB with low-risk assets like XLP and safe-haven assets like GLD for diversified, controlled risk.
Task 5 — Advanced Visualization
Investigative Question
· What is the correlation between daily returns of S&P 500 Sector ETFs (including XLB) and Benchmark Indices from January 1, 2023, to January 1, 2025??
Filtering
· Calculated Pearson correlation coefficients between daily returns of XLB, Sector ETFs, and Benchmark Indices over the 2023-2025 period.
Conclusion
· XLB Correlation: XLB is highly correlated with ^SPX (0.78) and moderately with XLE (0.65). It’s a good diversification tool when paired with GLD (0.18) and TLT (0.22), which tend to rise when XLB falls.