ESG vs non ESG fund

library(tidyverse) 
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0     ✔ purrr   1.0.1
✔ tibble  3.1.8     ✔ dplyr   1.1.0
✔ tidyr   1.3.0     ✔ stringr 1.5.0
✔ readr   2.1.3     ✔ forcats 1.0.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
etf_comparison_data_github_url <- "https://raw.githubusercontent.com/t-emery/sais-susfin_data/main/datasets/etf_comparison-2022-10-03.csv"

etf_comparison <- read_csv(etf_comparison_data_github_url)
Rows: 537 Columns: 14
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): ticker, company_name, sector, esg_uw_ow
dbl (7): esg_etf, standard_etf, esg_tilt, esg_tilt_z_score, esg_tilt_rank, e...
lgl (3): in_esg_only, in_standard_only, in_on_index_only

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
etf_comparison
# A tibble: 537 × 14
   ticker compa…¹ sector esg_etf stand…² in_es…³ in_st…⁴ in_on…⁵ esg_t…⁶ esg_u…⁷
   <chr>  <chr>   <chr>    <dbl>   <dbl> <lgl>   <lgl>   <lgl>     <dbl> <chr>  
 1 PRU    PRUDEN… Finan…   0.537  0.106  FALSE   FALSE   FALSE     0.431 Overwe…
 2 GIS    GENERA… Consu…   0.552  0.151  FALSE   FALSE   FALSE     0.401 Overwe…
 3 K      KELLOGG Consu…   0.453  0.0592 FALSE   FALSE   FALSE     0.394 Overwe…
 4 ADP    AUTOMA… Infor…   0.649  0.312  FALSE   FALSE   FALSE     0.337 Overwe…
 5 ECL    ECOLAB… Mater…   0.441  0.118  FALSE   FALSE   FALSE     0.322 Overwe…
 6 JCI    JOHNSO… Indus…   0.416  0.112  FALSE   FALSE   FALSE     0.304 Overwe…
 7 ES     EVERSO… Utili…   0.392  0.0896 FALSE   FALSE   FALSE     0.302 Overwe…
 8 PEG    PUBLIC… Utili…   0.376  0.0929 FALSE   FALSE   FALSE     0.284 Overwe…
 9 RTX    RAYTHE… Indus…   0.677  0.401  FALSE   FALSE   FALSE     0.277 Overwe…
10 LNG    CHENIE… Energy   0.274  0      TRUE    FALSE   TRUE      0.274 Overwe…
# … with 527 more rows, 4 more variables: esg_tilt_z_score <dbl>,
#   esg_tilt_rank <dbl>, esg_tilt_percentile <dbl>, esg_tilt_quantile_5 <dbl>,
#   and abbreviated variable names ¹​company_name, ²​standard_etf, ³​in_esg_only,
#   ⁴​in_standard_only, ⁵​in_on_index_only, ⁶​esg_tilt, ⁷​esg_uw_ow
spec(etf_comparison )
cols(
  ticker = col_character(),
  company_name = col_character(),
  sector = col_character(),
  esg_etf = col_double(),
  standard_etf = col_double(),
  in_esg_only = col_logical(),
  in_standard_only = col_logical(),
  in_on_index_only = col_logical(),
  esg_tilt = col_double(),
  esg_uw_ow = col_character(),
  esg_tilt_z_score = col_double(),
  esg_tilt_rank = col_double(),
  esg_tilt_percentile = col_double(),
  esg_tilt_quantile_5 = col_double()
)
etf_comparison|> 
  select(where(is.character), -ticker, -company_name) |> 
  map(unique)
$sector
 [1] "Financials"             "Consumer Staples"       "Information Technology"
 [4] "Materials"              "Industrials"            "Utilities"             
 [7] "Energy"                 "Health Care"            "Real Estate"           
[10] "Consumer Discretionary" "Communication"         

$esg_uw_ow
[1] "Overweight"  "Underweight"
  ggplot(data = etf_comparison) + 
  geom_bar(mapping = aes(x =esg_uw_ow))

Graph 1 : No. of componies ESG overweight Vs under weights . This implies that more companies are expected to underperform regards their ESG targets. Additionally, it is clear that the over weight companies shave a better ESG tilt.

library(tidyverse) 
ggplot(data = etf_comparison) + 
geom_bar(mapping = aes(x =esg_uw_ow))

etf_comparison |>  
  ggplot(aes(x = esg_uw_ow, y = esg_tilt)) +
  geom_point() +
  geom_smooth(method = lm)
`geom_smooth()` using formula = 'y ~ x'

Graph 2: Standard ETF vs ESG ETF

You can observe a positive relationship between standard etf values and esg etf values implying that high standard etf's also have high esg etf's. However, it is interesting to see that high ETF standards low ESG tilts .

etf_comparison |> 
  ggplot(aes(x = esg_etf, y =standard_etf)) +
  geom_point() +
  geom_smooth(method = lm)
`geom_smooth()` using formula = 'y ~ x'

etf_comparison |> 
  ggplot(aes(x = esg_tilt, y =standard_etf)) +
  geom_point() +
  geom_smooth(method = lm)
`geom_smooth()` using formula = 'y ~ x'

Graph 3 : ESG tilt across sectors . The below graphs calculate the mean and median to asses which sectors have a greater ESG tilt. According to the data, the communication sector has the lowest tilt, while the energy and tech sector have the highest tilt .

etf_comparison |> 
  group_by(sector) |> 
  mutate(mean_esg_tilt = mean(esg_tilt)) |> 
  ggplot(aes(x = sector, y = mean_esg_tilt)) +
  geom_point()

etf_comparison |> 
  group_by(sector) |> 
  mutate(med_esg_tilt = median(esg_tilt)) |> 
  ggplot(aes(x = sector, y = med_esg_tilt)) +
  geom_point()