OLS Regression Study in R
Author: Shamnas V.M. — MSc Transition Management, JLU Giessen
Tools: R · quantmod · ggplot2 · ggrepel
Status: Complete — Portfolio Project
This project investigates whether higher ESG scores are associated with lower stock market volatility among DAX 20 companies. It applies an OLS regression model to publicly available ESG scores and market data fetched via Yahoo Finance.
Research question: Is there a statistically significant inverse relationship between ESG score and annualised stock volatility in the DAX 20?
| Metric | Result |
|---|---|
| Regression coefficient (β₁) | -0.0142 |
| Interpretation | 1.42% lower volatility per 1-point ESG increase |
| R² | 8.4% |
| p-value | < 0.05 (statistically significant) |
| Sample | 20 DAX companies, 2021–2024 |
The result supports the direction of the ESG risk-mitigation hypothesis — higher ESG scores correlate with lower volatility — though the low R² (8.4%) indicates ESG explains only a small portion of overall variance. Other factors (sector, size, macro conditions) play a larger role.
Model:
Volatility = β₀ + β₁(ESG_Score) + ε
Steps:
- Fetch daily price data for 20 DAX tickers via
quantmod - Calculate annualised volatility:
sd(log_returns) × √252 - Merge with ESG scores dataset
- Run OLS regression:
lm(Volatility ~ ESG_Score) - Visualise with scatter plot and regression line
Data sources:
- Market data: Yahoo Finance via
quantmod - ESG scores: Publicly available sustainability ratings