GithubHelp home page GithubHelp logo

sciencebasedtargets / sbti-finance-tool Goto Github PK

View Code? Open in Web Editor NEW
48.0 9.0 42.0 32.55 MB

This toolkit helps companies and financial institutions to assess the temperature alignment of current targets, commitments, and investment and lending portfolios, and to use this information to develop targets for official validation by the SBTi. See the wiki for a change log.

Home Page: https://sciencebasedtargets.org/

License: MIT License

Python 100.00%
suistainable finance portfolio climate-science climate-model climate-data

sbti-finance-tool's Introduction

Visit https://sciencebasedtargets.github.io/SBTi-finance-tool/ for the full documentation

If you have any additional questions or comments send a mail to: [email protected]

SBTi Temperature Alignment tool

This package helps companies and financial institutions to assess the temperature alignment of current targets, commitments, and investment and lending portfolios, and to use this information to develop targets for official validation by the SBTi.

This tool can be used either as a standalone Python package, a REST API or as a simple webapp which provides a simple skin on the API. So, the SBTi toolkit caters for three types of usage:

  • Users can integrate the Python package in their codebase
  • The tool can be included as a Microservice (containerised REST API) in any IT infrastructure (in the cloud or on premise)
  • As an webapp, exposing the functionality with a simple user interface.

To following diagram provides an overview of the different parts of the toolkit:

+-------------------------------------------------+
|   UI     : Simple user interface on top of API  |
|   Install: via dockerhub                        |
|            docker.io/sbti/ui:latest             |
|                                                 |
| +-----------------------------------------+     |
| | REST API: Dockerized FastAPI/NGINX      |     |
| | Source : github.com/OFBDABV/SBTi_api    |     |
| | Install: via source or dockerhub        |     |
| |          docker.io/sbti/sbti/api:latest |     |
| |                                         |     |
| | +---------------------------------+     |     |
| | |                                 |     |     |
| | |Core   : Python Module           |     |     |
| | |Source : github.com/ScienceBasedTargets/     |
| | |               SBTi-finance-tool |     |     |
| | |Install: via source or PyPi      |     |     |
| | |                                 |     |     |
| | +---------------------------------+     |     |
| +-----------------------------------------+     |
+-------------------------------------------------+

As shown above the API is dependent on the Python Repo, in the same way the UI requires the API backend. These dependencies are scripted in the Docker files.

This repository only contains the Python module. If you'd like to use the REST API, please refer to this repository or the same repository on Dockerhub.

Structure

The folder structure for this project is as follows:

.
├── .github                 # Github specific files (Github Actions workflows)
├── app                     # FastAPI app files for the API endpoints
├── docs                    # Documentation files (Sphinx)
├── config                  # Config files for the Docker container
├── SBTi                    # The main Python package for the temperature alignment tool
└── test                    # Automated unit tests for the SBTi package (Nose2 tests)

Installation

The SBTi package may be installed using PIP. If you'd like to install it locally use the following command. For testing or production please see the deployment section for further instructions

pip install -e .

For installing the latest stable release in PyPi run:

pip install sbti-finance-tool

Development

To set up the local dev environment with all dependencies, install poetry and run

poetry install

This will create a virtual environment inside the project folder under .venv.

Testing

Each class should be unit tested. The unit tests are written using the Nose2 framework. The setup.py script should have already installed Nose2, so now you may run the tests as follows:

nose2 -v

Publish to PyPi

The package should be published to PyPi when any changes to main are merged.

Update package

  1. bump version in pyproject.toml based on semantic versioning principles
  2. run poetry build
  3. run poetry publish
  4. check whether package has been successfully uploaded

Initial Setup

  • Create account on PyPi

sbti-finance-tool's People

Contributors

aleks-sch avatar cschmidli avatar daanvdmeeberg avatar dependabot[bot] avatar dlinderyd avatar dp90 avatar hbsbti avatar joriscram avatar leddebruijn avatar max-tikehaucapital avatar mountainrambler avatar ofjpostema avatar pjankows avatar vitomurillo avatar waterstraal avatar zwitsai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbti-finance-tool's Issues

Data Provider Input: company data

Input: the imported portfolio (list of companies + company IDs)

  • A request is send to the data provider to return the following data for each company in the portfolio, based on company name/ company_ID

Required

  • CDP_ACS_industry (industry classification, see also SR15 variable mapping")

  • GHG_scope12 (emissions in metric tonnes)

  • GHG_scope3 (emissions in metric tonnes)
    Required based on aggregation choice:

  • Revenue (in million dollars / euros)

  • Market_cap (in million dollars / euros)

  • Enterprise_value (in million dollars / euros)

  • Total_assets (in million dollars / euros)

  • Cash_equivalents (in million dollars / euros)
    Optional (used for reporting purposes):

  • country

  • industry

  • sector

  • It should be easy to expand on this list at a later stage.

  • The format in which the data should be returned is clear in the documentation (include examples).

Add missing temperature score outputs

On all levels (company / portfolio / aggregated / ...) it should be possible to get 9 different scores:
(s1s2 / s3 / s1s2s3) * (short / mid / long)

Right now it seems that on aggregated (portfolio) level we only report s1s2s3

Convert S1+S2+S3 targets into S1+S2 / S3 targets

In order for targets to fit within the methodology
I want to convert Scope 1+2+3 targets to S1+S2 and S3 targets

Use coverage %s and GHG emissions.

  • Convert the target to two targets:
    Target1:
    -Target Scope = S1+S2
  • Coverage % = (coverage_S1emissions_S1 + coverage_S2emissions_S2 ) / (emissions_S1 + emission_S2)
  • All other data is copied from the original target
    Target2:
  • Target Scope = S3
  • Target coverage % = coverage_S3

If coverage data is missing for scope 3. Do not create target 2.

User input: Portfolio connector Excel

#An excel connector is available for the Portfolio setting endpoint#

Allow the user to use an excel file as input for the list of companies, IDs and portfolio weights

Aggregate temp score on category

In order to gain insight in the sectors / regions / industries that contribute the most to my temperature score
as an asset manager
I want to inspect the temperature scores aggregated per sector / region / ...

  • The user can request (additional) aggregated temperature scores based
  • The user can choose on which categories to aggregate
    -- From the categories provided by the dataprovider (country / industry / sector / ...)
    -- From additional categories provided by the user*

Company data input via Excel

-The user can choose to use Excel files as "Data provider"
-The user can specify Excel files to use

  • A connector is available that gets the necessary company & target data form the Excel files

  • It is clear how the company data and target data should be formatted in the Excel (examples)
    -- See example input format attached

InputFormat.xlsx

UI

simple, easy to use UI for use as stand alone solution

SBT Portfolio coverage

Input:

  • the portfolio

Companies with SBTi status Approved have a score of 100%, all others have a score of 0%.
-- In this version we treat companies with a 'Committed' state the same as NoTarget, this might change in later versions

Use the same aggregation methods as for the TS aggregation (WATS / TETS / etc...)
Aggregation / weighing: TBD

Output:

  • A single portfolio coverage score (a percentage of the portfolio covered)

What if scenarios

In order to set a strategy to lower the temperature score
As an asset manager
I want to get insight how my actions could influence the temperature score

  • After running the temperature score the user can request 3 "what if"-scenarios
  • The output format for these scenarios is equal to the standard temperature score outputs

#Scenario 1: Engage companies to set targets.

  • Calculate the temperature, but all default scores are set to 2.0

#Scenario 2: Engage companies to validate targets by SBTi

  • Calculate the temperature score, but all scores that are calculated using a target are capped at 1.75

#Scenario 3: Engaging the highest contributors to set (better) targets

  • Calculate the temperature score, but the scores of the top 10 highest contributors are capped at 2.0 or 1.75
  • The user can choose to engage the highest contributors "to set targets" ==> use 2.0 or "to set SBTi targets" ==> use 1.75

Add additional info to output

In order to better understand the temperature score
As an Asset owner
I want to see how my scores is build up

  • For the given temperature score (category) the output contains the percentage of the score covered by targets and the percentage covered by default scores
    -- Based on the chosen aggregation method

When looking at aggregated temperature scores

  • Include the perecentage of each category in the output (e.g. when grouping by country, show that 30% of the portfolio is US based, 20% UK, etc..)
    -- Based on the chosen aggregation method

Highest contributors

In order to set a strategy lowering the temperature score
As an asset owner
I want to see a list of the highest contributors to my score

  • The user can request a list of the (top 10) highest contributors towards the temperature score
  • The user can request a list of the (top 10) lowest contributors towards the temperature score
  • Contribution is calculated as the TS x value of aggregation metric (e.g. GHG emissions)
  • Output for these top contributors should be
    -- Company name
    -- Temperature score
    -- Contribution percentage
    -- Value of aggregation metric

Temperature score service

The user can run a portfolio temperature score simulation

  • required: the user has input a portfolio

Process:

  • The data is augmented with the data provider input
  • Through the target validation protocol
  • Through the temperature scoring module

Data provider choice

  • The user can set the data provider he wants to use

-- The user can choose from a list of available providers.
-- Each option from the list should correspond with a data provider connector.

Data Provider Input: target data

Input: portfolio (list of companies + company_ID)

-A request is send to the data provider to return the following data for all available targets for each company in the portfolio, based on company name/ company_ID

For each target the following data is requested:

Required:

  • Target classification

  • Scope

  • Coverage

  • Ambition

  • Base_year

  • end_year
    Optional:

  • start_year

  • The format in which the data should be returned is clear in the documentation (examples).

Let user get data provider data

The user can make a call to the tool to get the data from the data provider

Required to allow the call:

  • the portfolio is imported

  • the user specifies the DataProvider*
    *from a list of available Data providers with an implemented connector
    -- If a connector is not available this is returned to the user
    -- At first: Excel would be only option

Default score as input

[This functionality is probably only temporary for the beta testing phase]

  • The user should be able to change the default score to use
    -- Options: 3.2 / 3.9 / 4.5
    -- the Default value of the Default score should be 3.2

Temperature score raw data output

After a temperature score simulation the user can request raw data output

Output Options:

  • All Portfolio scores (per category (9)
  • Portfolio score per category
  • All (9) scores for all companies
  • Scores per category
    -- All scores for a single category

-- Output needs to be in a standard format
-- Output should include company (or portfolio) & category for each score to identify

Target valuation protocol

#Validate individual targets#
Input: a list of targets per company, boundary coverage option choice,
per target:

  • Scope ( S1+S2 / S3)
  • Target start year, Target end year
  • Target progress: the % of the target already achieved
  • Target type: Absolute GHG emission reduction, intensity GHG emission reduction, procurement, renewable energy target, etc.
  • Target coverage: a % of the emission in the target covered
  • Target ambition: % of reduction from base year

For each target:

  • Test on target type: allow only GHG emission reduction targets (absolute or intensity based)
  • Test on boundary coverage:
    -- option 1: minimal coverage threshold
    ---For S1+S2 targets: coverage% must be above 95%, for S3 targets coverage must be above 67%
    -- Option 2: weighted coverage
    --- Thresholds are still 95% and 67%, target is always valid. Below threshold ambition is scaled.*
    New target ambition = input target ambition * coverage
    *either here or in tem score module
    -- Option 3: default coverage
    --- Target is always valid, % uncovered is given default score in temperature score module.
  • Test on target process
    If target process is 100%, the target is invalid (only forward looking targets allowed)

Output: a list of valid targets per company

#Group valid targets by category & filter multiple targets#
Input: a list of valid targets for each company:
For each company:

  • Group all valid targets based on scope (S1+S2 / S3) and time frame (short / mid / long-term) into 6 categories.
    Time frame is forward looking: target year - current year. Less than 5y = short, between 5 and 15 is mid, 15 to 30 is long
  • For each category: if more than 1 target is available, filter based on the following criteria
    -- Highest boundary coverage
    -- Latest base year
    -- Target type: Absolute over intensity
    -- If all else is equal: average the ambition of targets

Output:
A matrix of the six categories, with each max 1 target per company

Get data provider data

Get the data provider data given a set portfolio.

Option 1: User action

  • The user makes a explicit call for data collection from a given data provider.
    -- The user can inspect and/or supplement the data before starting a simulation (TS/PC)*
    *different ticket

Option 2: the data collection is part of the TS or PC process

  • Only necessary data is requested based on the simulation
    -- For portfolio coverage only general company data, no target data necessary
    -- Data for aggregation purposes based on aggregation method

Change SR15 mapping using ISIC

Use ISIC instead of CDP-ACS classifications

Use target type, intensity metric, scope and ISIC to map targets to regression models.

  • ISIC is required in the dataprovider input - min 3 characters (letter + 2 digits)

  • First check if target is an absolute or intensity based target
    -- If intensity based, the regression model is based on intensity metric & scope (ISIC is ignored)

-- If absolute based, the regression model is based on ISIC & scope.

  • Only use up to the second level of the ISIC code (section & division: 1 letter, 2 digits)
    -- So for example C2435 uses C24.

  • See Excel for mapping

  • Note: for the absolute mapping: ISIC H49-H53 denotes all codes H49 through H53.
    Final regression mapping.xlsx

  • Check if documentation is updated after merge with master: isic no long optional parameter

Add ROTS aggregation method

Add Revenue owned emissions weighted temperature score ROTS as the 7th aggregation method.

Definition:
Sum_i((investment value_i / company revenue * company emissions_i / total revenue owned emissions * TS_i))
(See attachment)

image

Create a data dump to .csv

Create an option for the user to retreive all underlying data.

  • For each company & target score combination print all data used to get to that score
    -- Portfolio input (company name, ID, investment value)
    -- Fundamental data (Data provider input)
    -- Target data (Data provider input)
    -- Data added in tool (target class, mapped SR15 regression model, slope, intersect, linear reduction rate, ....)
    -- Output data (temperature score)

using multiple data providers ("Waterfall")

The user can specify multiple data providers to use and an order.

  • During the data collection a request should be made to each data provider in the order specified by the user
  • All data from the first data provider on the list is used
  • For the 2nd, 3rd, etc. on the list only, the data is only used to fill the gaps left by the previous provider(s).

Data storage

  • The company data from the data providers is stored, so it can be reused later.

  • The temperature score results are stored so the user can request different types of output without needing to recalculate.

Set data standard

Update the data format for user input, target data and fundemental (company) data

Assumptions for data input

  • All monetary values assumed in dollars (for tool irrelevant)
  • All GHG emissions in tCO2
  • All percentage as decimals [0,1]

For user input

  • Add ISIN field, separate from company ID.

For target input data:

  • Split target reference into:
    -- Target type: Absolute / Intensity / Other
    -- Intensity metric: Revenue / Power generation / Aluminum / Steel / Cement / Oil / Product / Other

  • Only if target type = Intensity, an intensity metric is required

  • Split coverage input into coverage per scope (coverage_s1, coverage_s2, coverage_s3) - the coverage should be specified for all scopes in the target (so target scope = s1s2 ==> specify coverage_s1 and coverage_s2, etc.)

  • additional BaseYear_GHG_Sx input fields ==> these are optional, but necessary for ticket #55

For company/fundemental data

  • remove CDP-ACS classification field and replace with ISIC field ==> field is not required for now.

  • Change industry field to industry_lvl1 through lvl4 (optional)

See update input format
See 'Legend' tab for all possible inputs for all fields
InputFormat.xlsx

Use the update fields throughout the rest of the tool
-- use target type + intensity metric in TVP and SR15 mapping
-- We only need coverage per scope for the first (conversion) step. After that link the relevant coverage to the "main" (i.e. current scope independent) coverage field.

  • use ISIN from user input to identify companies with an SBTi approved/committed target

TVP portfolio coverage

  • Input: list of companies

For each company, retrieve the SBTi status (Approved / Committed / NoTarget).

  • Option 1: via Excel
    -- The user can specify the location of the Excel file he wants to use.
    -- Get the SBTi status using 'ISIN' company ID or if that's not available, use company name as fallback.
    (see https://sciencebasedtargets.org/companies-taking-action/ ==> "download all companies taking action" to get the latest excel)
    If company can't be found ==> NoTarget
    else ==> return status based on status column

  • Option 2: via data provider
    -- Add SBTi status to the request to the data provider
    -- Use this to set the company status

  • Output: list of companies, with SBTi statuses

Check on absolute conversion available for intensity targets

If a target is an intensity target and the intensity metric is Other

  • Check if 'absolute conversion % of scope X' is available (where X is 1&2 or 3, the same as the target scope)
  • If available, convert the target into a Absolute Revenue target with the absolute conversion % as the ambition.

Data provider connector skeleton

  • An example data provider connector is created

  • The example can serve as a 'skeleton' for future data provider connectors

  • Dummy connectors are created for the following data providers
    -- Bloomberg
    -- ISS
    -- MSCI
    -- Urgentum
    -- S&P / Trucost

  • The dummy connectors just return a message of "no data available"

Convert S1 or S2 targets into S1+S2 targets

In order for targets to fit within the methodology
I want to convert Scope 1 and Scope 2 targets into S1+S2 targets.

If a company contains a Scope 1 or Scope 2 targets we need to convert ambition and coverage to Scope1+2

If it's not possible to combine the targets or if the is only one target. Convert each target to a S1+S2 target.
For a Scope1 target:
coverage_new = coverage S1 * emissions S1 / (emissions S1 + emissions S2)

For scope 2 target:
coverage_S1+S2 = coverage S2 * emissions S2 / (emissions S1 + emissions S2)

The scope target is adjusted to Scope1+2 and from here on out throughout the tool threat it accordingly (i.e. use Scope 1+2 emissions when aggregating etc)

If any information regarding necesary for this conversion is missing ==> target is invalid

User Input: API endpoints

#An endpoint is available for the user to set the portfolio#
-It is possible for the user to import a portfolio (a list of companies with corresponding ID's and exposures) into the tool
-- assume exposure is monetary and in same ccy)
--It should be possible to expand the data per company at a later date

  • The format required for the input should be clear from the documentation. With an example.

  • The user can set the aggregation method of the temperature score

Temperature score module

Input per company:
-A set of targets (6: short/mid/long * S1+S2 / S3), for each category max 1
-For each target:
--Target type
--Scope
--Industry
--Target base year & target end year
--Target ambition

  • Boundary coverage option

#Target to SR15 variable mapping#
Input per target:
-Target type
-Scope
-Industry
Find the SR15 variable match based on the input, using Annex 1: Target class to SR15 variable mapping (Temperature-Scoring-Methodology-Public-Consultation-Draft.pdf)
Output:
-SR15 variable match per target

#Calculate linear annual reduction rate#
Input per target:
-Timeframe : Target start year, Target end year
-Target ambition: % of reduction from base year

Linear annual reduction rate = target ambition / (target end year – target base year)
Output: Linear annual reduction rate per target

#Calculate temp score#
Input per target:
-Lineair annual reduction rate
-SR 15 variable match
-Time frame (short / mid / long)
Using:
RegModels_Summary.xlxs (see https://github.com/CDPworldwide/TROPICS-regression/tree/master/output)
Model choice (for now set as a static value = 4)

Use SR15 variable, term (short = slope5, mid = slope15 & long = slope30) and model to get the relevant param and intercept from RegModels_Summary.xlxs.

Temperature score = param * lin annual reduction rate + intercept.
Output: a temp score per target

#Calculate final temp score for each category#
Input:
A set of targets (6: short/mid/long * S1+S2 / S3), can be null
For each target:
Temp score (if not null)
Boundary coverage option
Target coverage
For each category
If no target is available:
-Final score = Default score
If target is available:
For boundary coverage option 1 & 2:
-Final temp score = input temp score
For boundary coverage option 3:
-Final temp score = target coverage * input temp score + (1- target coverage)* default score
Output:
Temperature scores for each category

#Add temperature scores for company level#
Input:
-Scores for each of the 6 groups (S1+S2 / S3 * short/mid/long-term)
-GHG Emissions for S1+S2 and S3

The S1+S2+S3 scores are calculated as
((Scope 1+2 temp score)×(Scope 1+2 GHG emissions)+((Scope 3 temp score)×(Scope 3 GHG emissions))/(Scope 1+2+3 GHG emissions)
Output:
-Scores for 9 groups (S1+S2 / S3 / S1+S2+S3 * short/mid/long-term)

#Aggregating temperature score portfolio level#
Input:
-S1+S2+S3 temp scores for each company in portfolio (short/mid/long)
-Company data
-Aggregation method

Aggregate temperature score using table 8 (Temperature-Scoring-Methodology-Public-Consultation-Draft.pdf, p23)

Output:
-Portfolio score for short/mid/long term

  • used aggregation method

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.