Sustainable Finance Homework

── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
✔ ggplot2 3.4.0      ✔ purrr   1.0.1 
✔ tibble  3.1.8      ✔ dplyr   1.0.10
✔ tidyr   1.3.0      ✔ stringr 1.5.0 
✔ readr   2.1.3      ✔ forcats 0.5.2 
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
Loading required package: lubridate


Attaching package: 'lubridate'


The following objects are masked from 'package:base':

    date, intersect, setdiff, union


Loading required package: PerformanceAnalytics

Loading required package: xts

Loading required package: zoo


Attaching package: 'zoo'


The following objects are masked from 'package:base':

    as.Date, as.Date.numeric



Attaching package: 'xts'


The following objects are masked from 'package:dplyr':

    first, last



Attaching package: 'PerformanceAnalytics'


The following object is masked from 'package:graphics':

    legend


Loading required package: quantmod

Loading required package: TTR

Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 

here() starts at /Users/sebastiengettelmam/Documents/R-Projects/Ta sessions


Attaching package: 'janitor'


The following objects are masked from 'package:stats':

    chisq.test, fisher.test


Loading required package: viridisLite

NOTE: Either Arial Narrow or Roboto Condensed fonts are required to use these themes.

      Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and

      if Arial Narrow is not on your system, please see https://bit.ly/arialnarrow

Homework 1

Rows: 393 Columns: 22
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (14): ticker, name, incept_date, net_assets_as_of, asset_class, sub_asse...
dbl  (8): gross_expense_ratio_percent, net_expense_ratio_percent, net_assets...

ℹ 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.
Adding missing grouping variables: `is_esg`

Warning: Removed 62 rows containing missing values (`geom_point()`).

Warning: Removed 62 rows containing missing values (`geom_point()`).

Homework 2

Exercise 1

Rows: 393 Columns: 22
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (14): ticker, name, incept_date, net_assets_as_of, asset_class, sub_asse...
dbl  (8): gross_expense_ratio_percent, net_expense_ratio_percent, net_assets...

ℹ 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.
`summarise()` has grouped output by 'year_launched'. You can override using the `.groups` argument.

On this graph I was trying to get a sense of the growth of the total amount within funds through time to get an idea of market growth. However, given how the data is presented this only gave me the size of funds at a fixed point in time at not the aggregate market data. I was unable to make the funds comulutate with each other through time.

`summarise()` has grouped output by 'is_esg'. You can override using the
`.groups` argument.

Here I’m trying to get a sense of the distribution of funds over time based on the year they were created while comparing averages through time. The the averages displayed this way aren’t insightful it helps us observe the distribution of ESG and Non-ESG funds overtime.

`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Here I wanted to get a sense of the fund activities through market types. We can see as expected that developped markets have the largest sahre of both ESG and NON ESG funds. Frontiere markets have no ESG funds active.

Exercise 2

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.
`summarise()` has grouped output by 'in_esg_only'. You can override using the `.groups` argument.

Here I’m trying to get a sense of the distribution of funds across sectors while comparing averages. We can see that tech is the most performing ESG industry in non-ESG funds and energy remains the most performing for ESG funds.

`summarise()` has grouped output by 'in_esg_only', 'sector'. You can override
using the `.groups` argument.

This one gives us the count per sector bwteen ESG and NON-ESG funds. We can see that technology is the main focus on funds whether ESG or NON-ESG.

`summarise()` has grouped output by 'in_esg_only'. You can override using the
`.groups` argument.
# A tibble: 7 × 4
  sector aggregates `FALSE` `TRUE`
  <chr>  <chr>        <dbl>  <dbl>
1 Energy avg         0.206   0.274
2 Energy std_dev     0.253  NA    
3 Energy min         0       0.274
4 Energy max         1.02    0.274
5 Energy pctile_25   0.0996  0.274
6 Energy median      0.110   0.274
7 Energy pctile_75   0.209   0.274

This gives of the summary of statistics of ESG vs non-ESG based on their ESG score cur across industries. This table is ling and I was unable to code it properly to extract the information I needed with a filter to select the top performing industries.