Dashboard for Responsible Investing (unfinished yet)

Andriyan Saputra
7 min readFeb 14, 2022
Dashboard — Financial Data & ESG Score analysis

In recent years, data science has served as an indispensable tool when taking into consideration investment decisions. With a growing awareness of corporate social and environmental accountability, potential investors can harness the power of data to enact responsible investing.

RMDS — Competition

With this in mind, RMDS Lab is announcing its next data science competition, Brace for Impact: Creating a Dashboard for Responsible Investing Using Machine Learning. This special competition’s contestants will be challenged with collecting data sets and creating a dashboard that can help potential investors to review the social and environmental impacts of companies in which they might invest.

Objective: Creating a Dashboard for Responsible Investing using Machine Learning. Providing list of recommendation entity which it should be invested in long term cycle.

Preparing Dataset

Scrapping Financial Data ESG (Environment, Social, and Governance) score from Yahoo Finance for Companies in S&P 500.

Data sets are containing with:

PE_RATIO

EBITDA_EV_YIELD

CUR_RATIO

EPS_GROWTH

PROF_MARGIN

REL_PE_RATIO

TOT_DEBT_TO_TOT_EQY

NET_INCOME_GROWTH_YTY

STOCK_PRICE_GROWTH_YTY

All the data are provided in time frame between 02/2000–12/2021. After implementing data cleansing and interpolating, the data set are provided for only 380 entity.

Forecast time series data : Facebook Prophet

Mean Variance

Mean-Variance Analysis, often referred to as Modern Portfolio Theory (MPT) is a theory about portfolio construction that was first developed by Harry Markowitz in 1952, later earning him the Nobel prize in Economics. The main idea behind the theory is that by tweaking the weights of individual assets in a portfolio it is possible to construct optimal portfolios, which offer the maximum possible expected return for a given level of risk. One of the key insights of MPT is that an individual asset’s return and volatility should not be assessed by itself, but rather by how it contributes to a portfolio’s overall return and volatility.

The optimal portfolios, i.e. the portfolios that maximize the expected return for a given level of risk or minimize the expected volatility for a given level of return, can be plotted on a graph. The line that connects the optimal portfolios will be an upward sloping hyperbola, which is called the Efficient Frontier. It is called “efficient” because the portfolios that lie on it provide the highest expected return for a given level of risk.

The optimal portfolio is also commonly known as the maximum Sharpe portfolio (MAX-S). For the MAX-S portfolio, considering the risk free rate rf (normally the return on bond investment or the bank interest rate), it minimizes the negative Sharpe Ratio (Sharpe, 1966):

where wi and wj are the weights of stock i and j, with the boundary limit
wi; wj 2 [0; 1], and σij is the covariance matrix of the two stock i and j in the
portfolio. The initial weight of each stock in the computation is equally allocated according to the total number of stocks N in the portfolio, wi(0) = wj(0) = 1=N.

For comparison, we construct a maximum ESG portfolio (MAX-ESG) for investors with low risk averse to compare with the standard MAX-S portfolio. In our MAX-ESG portfolio, we minimize the negative Sharpe Ratio with the portfolio ESG ratings (ESGp) as a new variable of the objective function.

where ESGi is the combined ESG ratings of company i in the past year, ESG ¯ i
is the combined ESG ratings at the current prediction year, and wesgi is the ESG weight of stock i in the portfolio.

Mean Variance -ESG

In the traditional MV model, rp and σp are the past returns ri and volatility σi,
which is often called ex-post MV. In recent years, researchers and investors have been using the expected returns ¯ ri and volatility ¯ σi. This approach called ex-ante MV is more suitable for predictive analytics in real-world financial trading. In our MVESG model, we combine both ex-post MV and ex-ante MV for portfolio selection and replace the standard weight boundary with our ESG ones calculated based on the combined ESG ratings for each stock. Our MV-ESG model is computed using:

where ri and ¯ ri are the ex-post and ex-ante returns, σij and ¯ σij are the ex-post and ex-ante covariance matrix of the two stock i and j in the portfolio. wesg i and wesg j are the ESG weight of stock i and j in the portfolio, with the boundary limit wesg1; 2 [0; 1] for the company with the highest combined ESG score, then gradually decreasing to wesgN 2 [0; 0] for the company with the lowest combined ESG score.
This means the allocation of the company \N” in the portfolio is zero, indicating no investing. The initial weight of each stock in the computation is not equally allocated but assigned according to the ESG ratings.
We define three separate objectives for our ESG-based Multi-Objective Portfolio Optimization model:

  1. Maximizing returns
  2. Minimizing risks
  3. Maximizing ESG scores.

The three measures, representing these three objectives, are calculated using the multi-objective optimizer known as NSGA-II (Deb et al. 2000), short for
Non-Dominated Sorting Genetic Algorithm version 2. This loop is repeated until a Pareto-front of solutions is found, which optimally compromises between the two conflicting goals.

Multi-Objective Portfolio Optimization Model (Nhi Vo, Ngoc Yen. 2020. Machine Learning Algorithms for Wealth Data Analytics. ‘MV-ESG Model’. pages; 88–92)

Multi Objective Optimisation — NSGA II

Optimizing for multiple objectives is a non-trivial task, especially when they are in conflict. For example how can one best overcome the classic trade-off between quality and cost of production, when the monetary value of quality is not defined? In this hands-on Python tutorial you will learn about Pareto Fronts and use them to optimize for multiple objectives simultaneously.

Pareto Front

Named after the engineer and economist Vilfredo Pareto, we define the Pareto Front as the set of Non Dominated solutions, and consider them (at first*) as equally optimal trade-off solutions.

*We will eventually have to apply a subjective ranking. This will be decissed in Decision Making With Pareto Fronts.

Decision Making With Pareto Fronts

Once the Pareto Front is identified a decision has to be made about selection of the N best solutions.
In other words, now is the time to apply a subjective decision which will determine how we rank the solutions.

How to select, of course, will depend on the project budget and objectives but broadly speaking the subjective decision will be determined by:

  • The N number of solutions that will be used for the next step. In our example, you might have four knapsack carriers, so you will want to give each one knapsack.
  • After examining the exhaustive solution space the decision maker might apply weights. This results in a single heuristic reducing the problem to Single Objective Optimization.
  • The decision maker might decide to narrow in on solutions in one or multiple regions. Otherwise they could sample across the Pareto Front.

Note
Here the term decision maker is used broadly. The meaning is someone with domain expertise who could be anyone from the analyst, to someone non technical that understands the field.

Note 2
Here we focus on an Objective Space that has two parameters (2D). Ideas here can be naturally extrapolated to higher dimensions (3 or more objectives), although this might be more challenging to visualize. One mechanism is visualizing 2D slices, and color coding a 3rd dimension.

For your own amusement (and education) I highly recommend watching The Expert. This was recommended to me in during transition from academia to the private sector, and is an excellent life lesson on (mis)communication in a professional environment.

Fitness values of groups entity

Dashboard (Tableau)

Financial Data : Radar Chart

--

--

Andriyan Saputra

Just an ordinary person who is curious about the world.