ITR.portfolio_aggregation

Classes

PortfolioAggregationMethod

The portfolio aggregation method determines how the temperature scores for the individual companies are aggregated

PortfolioAggregation

This class is a base class that provides portfolio aggregation calculation.

Module Contents

class ITR.portfolio_aggregation.PortfolioAggregationMethod(*args, **kwds)

Bases: enum.Enum

The portfolio aggregation method determines how the temperature scores for the individual companies are aggregated into a single portfolio score.

WATS = 'WATS'
TETS = 'TETS'
MOTS = 'MOTS'
EOTS = 'EOTS'
ECOTS = 'ECOTS'
AOTS = 'AOTS'
ROTS = 'ROTS'
static is_emissions_based(method: PortfolioAggregationMethod) bool

Check whether a given method is emissions-based (i.e. it uses the emissions to calculate the aggregation).

Parameters:

method – The method to check

Returns:

static get_value_column(method: PortfolioAggregationMethod, column_config: Type[ITR.configs.ColumnsConfig]) str
class ITR.portfolio_aggregation.PortfolioAggregation(config: Type[ITR.configs.PortfolioAggregationConfig] = PortfolioAggregationConfig)

Bases: abc.ABC

This class is a base class that provides portfolio aggregation calculation.

Parameters:

config – A class defining the constants that are used throughout this class. This parameter is only required if you’d like to overwrite a constant. This can be done by extending the PortfolioAggregationConfig class and overwriting one of the parameters.

c
_check_column(data: pandas.DataFrame, column: str)

Check if a certain column is filled for all companies. If not throw an error. :param data: The data to check :param column: The column to check :return:

_calculate_aggregate_score(data: pandas.DataFrame, input_column: str, portfolio_aggregation_method: PortfolioAggregationMethod) pandas.Series

Aggregate the scores in a given column based on a certain portfolio aggregation method.

Parameters:
  • data – The data to run the calculations on

  • input_column – The input column (containing the scores)

  • portfolio_aggregation_method – The method to use

Returns:

The aggregates score