| Title: | Multivariate-Weighted Indexing of CAMEL Ratios for Bank Performance |
|---|---|
| Description: | Computes a composite year-on-year index for bank performance assessment using the CAMEL framework (Capital Adequacy, Asset Quality, Management Efficiency, Earnings, Liquidity). The multivariate weighting scheme employs factor analysis with robust covariance estimation to derive communality-based weights from the correlation matrix of CAMEL ratios. Provides functions for index computation, visualization, and comparison across banks and time periods.The methodology is described in Ayimah et al. (2023a) <doi:10.9734/bpi/mono/978-81-19315-32-1> and Ayimah et al. (2023b) <https://ajtem.com/index.php/ajtem/article/view/53>. |
| Authors: | John Coker Ayimah [aut, cph, cre], George Kyei Agyen [aut, cph], Raymond Achiyaale [aut, cph] |
| Maintainer: | John Coker Ayimah <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-06-20 17:28:56 UTC |
| Source: | https://github.com/cran/CamelRatiosIndex |
CAMEL ratio data for 21 Ghanaian commercial banks as of 2015. Data sourced from Bank of Ghana publications.
camel_2015camel_2015
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2016. Data sourced from Bank of Ghana publications.
camel_2016camel_2016
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2017. Data sourced from Bank of Ghana publications.
camel_2017camel_2017
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2017. Data sourced from Bank of Ghana publications.
camel_2018camel_2018
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2019. Data sourced from Bank of Ghana publications.
camel_2019camel_2019
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2020. Data sourced from Bank of Ghana publications.
camel_2020camel_2020
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2021. Data sourced from Bank of Ghana publications.
camel_2021camel_2021
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
CAMEL ratio data for 21 Ghanaian commercial banks as of 2022. Data sourced from Bank of Ghana publications.
camel_2022camel_2022
A data frame with 21 rows and 6 columns:
Bank name (character)
Capital Adequacy ratio
Asset Quality ratio
Management Efficiency ratio
Earnings ratio
Liquidity ratio
Bank of Ghana and Ghana Stock Exchange
Computes a composite year-on-year index for bank performance assessment using the CAMEL framework. The multivariate weighting scheme employs robust factor analysis to derive communality-based weights from the correlation matrix of CAMEL ratios.
camel_index( base_data, current_data, bank_names = NULL, n_factors = 3, scale_data = TRUE, cov_control = rrcov::CovControlOgk(), method = "pca", scores_method = "regression" )camel_index( base_data, current_data, bank_names = NULL, n_factors = 3, scale_data = TRUE, cov_control = rrcov::CovControlOgk(), method = "pca", scores_method = "regression" )
base_data |
A data frame or matrix containing the base year CAMEL ratios.
If a data frame, the first column must contain bank identifiers (character or
numeric). If a matrix, bank identifiers must be supplied separately via
|
current_data |
A data frame or matrix containing the current year CAMEL
ratios, in the same format and order as |
bank_names |
A character or numeric vector of bank identifiers. Required
when |
n_factors |
Integer specifying the number of factors to extract in the
robust factor analysis. Default is |
scale_data |
Logical indicating whether to standardize the data before
factor analysis. Default is |
cov_control |
A control object for robust covariance estimation, passed to
|
method |
Character specifying the factor analysis method. Default is
|
scores_method |
Character specifying the method for computing factor
scores. Default is |
The index is computed as the arithmetic mean of two multivariate-weighted Laspeyres-type and Paasche-type indices, scaled to a base of 100. The percentage difference (PD) from the base year is also reported.
A list of class "camel_index" containing:
A tibble::tibble() with columns bank, I_mw
(composite index, base = 100), and PD (percentage difference from base).
Numeric vector of multivariate-weighted Laspeyres indices.
Numeric vector of multivariate-weighted Paasche indices.
Numeric vector of composite indices (base = 100).
Numeric vector of percentage differences from base year.
Numeric vector of communality-based weights from base year factor analysis.
Numeric vector of communality-based weights from current year factor analysis.
Numeric vector of eigenvalues from base year correlation matrix.
Numeric vector of eigenvalues from current year correlation matrix.
Integer, number of eigenvalues > 1 in base year.
Integer, number of eigenvalues > 1 in current year.
The fitted robustfa::FaCov() object for base year.
The fitted robustfa::FaCov() object for current year.
Matrix of current-to-base ratios for each CAMEL variable and bank.
The processed base year data (matrix, no bank names).
The processed current year data (matrix, no bank names).
Character vector of bank identifiers.
Integer, number of factors used.
The matched call.
When supplying data frames, the first column must be the bank identifier (character or numeric), and the remaining columns must be the five CAMEL ratios in the standard order:
Capital Adequacy (Ca)
Asset Quality (Aq) – inverted internally
Management Efficiency (Me) – inverted internally
Earnings (Eq)
Liquidity (Lm) – inverted internally
The inversion of Aq, Me, and Lm is handled automatically because higher values of these ratios indicate worse bank performance.
# Using the built-in example data base_year <- camel_2015 current_year <- camel_2022 result <- camel_index(base_year, current_year) result$index_table # Access individual components result$mw_lasp result$mw_pash result$weights_base # Using matrices with explicit bank names base_mat <- as.matrix(camel_2015[, -1]) curr_mat <- as.matrix(camel_2022[, -1]) banks <- camel_2015$Bank result2 <- camel_index(base_mat, curr_mat, bank_names = banks) result2$index_table# Using the built-in example data base_year <- camel_2015 current_year <- camel_2022 result <- camel_index(base_year, current_year) result$index_table # Access individual components result$mw_lasp result$mw_pash result$weights_base # Using matrices with explicit bank names base_mat <- as.matrix(camel_2015[, -1]) curr_mat <- as.matrix(camel_2022[, -1]) banks <- camel_2015$Bank result2 <- camel_index(base_mat, curr_mat, bank_names = banks) result2$index_table
Creates a ggplot2 line graph showing the percentage difference (PD) from the base year for each bank, enabling visual comparison of bank performance across the CAMEL framework.
plot_camel_index( x, highlight_banks = NULL, add_reference_line = TRUE, point_size = 3, line_size = 0.8, colour_palette = NULL, title = NULL, subtitle = NULL, caption = NULL, theme_fn = ggplot2::theme_minimal, ... ) ## S3 method for class 'camel_index' autoplot(object, ...)plot_camel_index( x, highlight_banks = NULL, add_reference_line = TRUE, point_size = 3, line_size = 0.8, colour_palette = NULL, title = NULL, subtitle = NULL, caption = NULL, theme_fn = ggplot2::theme_minimal, ... ) ## S3 method for class 'camel_index' autoplot(object, ...)
x |
An object of class |
highlight_banks |
Optional character vector of bank names to highlight with distinct colours. All other banks are shown in grey. |
add_reference_line |
Logical indicating whether to add a horizontal
reference line at PD = 0 (the base year level). Default is |
point_size |
Numeric, size of points. Default is |
line_size |
Numeric, size of line segments. Default is |
colour_palette |
Character vector of colours for highlighted banks. Default uses a ColorBrewer qualitative palette. |
title |
Optional plot title. If |
subtitle |
Optional plot subtitle. |
caption |
Optional plot caption. If |
theme_fn |
A ggplot2 theme function. Default is |
... |
Additional arguments passed to |
object |
An object of class |
A ggplot object.
# Basic plot result <- camel_index(camel_2015, camel_2022) plot_camel_index(result) # Highlight specific banks plot_camel_index(result, highlight_banks = c("Absa", "Ecobank", "GCB")) # Custom styling plot_camel_index( result, highlight_banks = c("Absa", "Ecobank"), title = "Bank Performance: 2015 vs 2022", subtitle = "Percentage difference from base year", colour_palette = c("#E41A1C", "#377EB8"), theme_fn = ggplot2::theme_bw )# Basic plot result <- camel_index(camel_2015, camel_2022) plot_camel_index(result) # Highlight specific banks plot_camel_index(result, highlight_banks = c("Absa", "Ecobank", "GCB")) # Custom styling plot_camel_index( result, highlight_banks = c("Absa", "Ecobank"), title = "Bank Performance: 2015 vs 2022", subtitle = "Percentage difference from base year", colour_palette = c("#E41A1C", "#377EB8"), theme_fn = ggplot2::theme_bw )
Print Method for camel_index Objects
## S3 method for class 'camel_index' print(x, ...)## S3 method for class 'camel_index' print(x, ...)
x |
An object of class |
... |
Additional arguments (ignored). |
Invisibly returns x.
base_year <- camel_2015 current_year <- camel_2022 result <- camel_index(base_year, current_year) resultbase_year <- camel_2015 current_year <- camel_2022 result <- camel_index(base_year, current_year) result
Provides a detailed summary of the CAMEL index computation, including eigenvalues, factor loadings, and weight attribution.
## S3 method for class 'camel_index' summary(object, ...)## S3 method for class 'camel_index' summary(object, ...)
object |
An object of class |
... |
Additional arguments (ignored). |
Invisibly returns object.
result <- camel_index(camel_2015, camel_2022) summary(result)result <- camel_index(camel_2015, camel_2022) summary(result)