The article addresses the issue of stress testing based on the probability of bankruptcy and a rating migration matrix. The analysis is conducted on a sample of listed companies in Poland in the years 1998–2016, and the forecasts are made for the years 2016–2018. Particular attention is paid to how the variable on which rating migration matrices are developed is defined. Stress tests are carried out on variables derived from rating migration matrices and economic indicators. The study provides information on the methodology for stress testing.

#### Keywords

- stress tests
- bankruptcy risk
- rating migration matrices
- stress scenario

#### JEL Classification

- G11
- G21
- G22
- G28
- G32

The financial liabilities of enterprises are among the most important financial indicators. This concerns both the current and the future state of an enterprise. An entity's financial capacity can be read from the liability ratio. Considering financial liabilities, reference should be made to other credit risk indicators such as the probability of financial liability repayment.

Remembering the recent global crisis in the US credit market, authorities focus on properly defining credit risk indicators and also look for new ways to prevent this kind of event. Therefore, the new financial reporting standards issued in early 2017 broadly describe the subject of credit risk. Some variables have been redefined and additional indicators have been introduced. There are currently new challenges associated with COVID-19.

In the context of credit risk, it is necessary to look for a way to prevent extreme events. In the case of enterprises, this is undoubtedly too much debt, which in turn leads to bankruptcy. Stress test analysis may be a suitable prudential tool to predict it. As the economy is constantly changing, it is worth considering the situation of world markets when analysing bankruptcy.

The purpose of this article is to conduct stress tests for credit risk on data for Polish non-financial enterprises. The analysis is made on a sample of listed companies in Poland in the years 1998–2016. The forecasts are made for the years 2016–2018. Information about the companies comes from financial statements downloaded from the NOTORIA Polska database. The data have been supplemented with macroeconomic characteristics derived from the Organization for Economic Cooperation and Development (OECD) Statistics database. Stress test analysis is performed using a rating migration matrix. The analysis covers four scenarios. The first is the baseline scenario using real data, another one has been created as a result of forecasting and the next two have been developed using forecasts as extreme scenarios.

The subject of stress testing is explored by the authors of many empirical studies. The authors describe the methodology for conducting stress tests using a rating migration matrix, a macroeconomic approach and methods for creating stress scenarios. The motivation to carry out this analysis is the fact that all the studies on the subject reported in the literature focus on the risk of bankruptcy of large international enterprises and most stress scenarios are subordinated to regulatory criteria (banks, insurers and other financial market entities). In the case of non-financial entities, rating classes are created differently and the liquidity risk is exposed instead of the risk of exceeding prudential ratios. This study makes an original contribution to the existing research regarding these issues.

Section 1 contains an overview of the empirical literature concerning the issues under consideration. Section 2 describes the study carried out on a sample of listed companies in Poland. It also outlines the research methodology, characteristics of the variables used, results of the analysis and conclusions.

An important element of economic market analysis is forecasting hypothetical impacts and sudden fluctuations in the business cycle. The experience acquired during the credit market crisis shows that this type of research should be conducted. Banks do not have specific requirements to conduct stress tests and so scientists propose many new solutions to improve the quality and simplify the methodology of stress tests. This section discusses selected empirical studies, broken down by the methodology used. The literature on stress tests conducted using a rating migration matrix is discussed first, followed by that concerning a macroeconomic approach to this issue and finally ways of designing stress scenarios.

Bangia et al. (2000) used rating migration matrices to show a correlation between economic indicators and asset quality. Among the dilemmas during the construction of migration matrices is the choice of the right period length. Choosing a longer time horizon gives less detailed information but makes it possible to get rid of the problem of excessive time series fluctuations. One of the conclusions is that the probability of a rating migration may change along with changes in the business cycle, recession and boom.

Miu and Ozdemir (2009) decided to conduct a stress test based on the methodology presented in the Basel II requirements. It involves selecting appropriate macroeconomic variables for stress scenarios and then estimating the probability of default (PD) indicator and migration. This method is used when there is no access to internal data.

Beitz and Ehrhardt (2011) show that stress tests help to answer the question of how the potential risk of losing money can be covered by equity. The authors propose a method that allows reducing the data requirements used for stress testing and improving the quality of the estimations. The threat measure is

Costabile and Schmude (2012) describe how asset correlation shock introduced into a rating migration matrix and the default indicator forecast the expected losses and deficiencies in selected stress scenarios used. The CreditManager method was used in the analysis.

Bandt et al. (2013) used rating migration matrices built on credit data for American and European enterprises. They describe the procedure largely based on the Merton model. The researchers point out that they do not model loan default losses and do not combine losses with macroeconomic variables. They argue that the indicator may be exogenously calibrated, focusing only on the PD variable. In this particular study, the authors choose the correlation between the systemic factor and the corporate credit portfolio rating.

Licari et al. (2013) examined the effect of introducing shocks into a rating migration matrix containing the credit ratings of a selected group of enterprises. A multi-stage research methodology was used, divided into the analysis of one-notch and two-notch transitions. Forecasting a two-notch transition is problematic due to the dominance of values close to zero and it was therefore necessary to additionally use the Heckman model. The authors describe the forecasting of the PD by enterprises using a rating migration matrix and macroeconomic variables.

The analysis carried out by Yang and Du (2015) includes three components: the unconditional rating transition matrix, asset correlations and stress testing factor models for a systematic downgrade (including default) risk. The authors point out that, in practice, stress tests are based on systemic risk and shocks that come from the market or macroeconomic factors.

The second part of this section describes studies that include macroeconomic stress tests. Hoggarth et al. (2005) used a new approach to stress testing, covering the dynamics between bank write-offs and macroeconomic variables. The analyses were based on the vector autoregression (VAR) model, which takes account of feedback effects on the explained variable.

Mager and Schmieder (2009) conducted stress tests for selected portfolios of various banks. Single and multiple credit risk ratios were used in accordance with the internal risk model (IRB) procedure. Moreover, the analysis was expanded to include a correlation between credit risk indicators. Stress scenarios included historical events. The results obtained show that, if the above correlations are taken into account, stress tests give much greater increases in capital requirements compared to traditional credit risk indicators.

Varotto (2011) conducted a study showing that capital requirements during market turmoil may be mismatched with the ongoing conditions and cause erroneous risk estimation. The author has distinguished two types of scenarios. The first of these are hypothetical scenarios that are created based on simulations of several macroeconomic models, and the second of these are created based on historical events. Prior to the crisis, studies omitted feedback and the systemic risk. Rating migration matrices for a single period are characterised by significant differences and so the average rating migration matrix was used to compare individual periods. In this way, it is easier to observe the behaviour of indicators depending on the economic situation. It is therefore important that the level of capital maintenance requirements is adapted to market conditions, and that it is appropriately adjusted to risk levels during the crisis.

Assouan (2012) performed stress tests using an error correction model. The author used a time series approach to determine the value of the PD ratio that is related to macroeconomic factors. The results show a strong correlation between individual macroeconomic variables and the PD ratio.

Acharya et al. (2013) compared the results of macroeconomic stress testing with the results obtained based on real data. The authors divided the analysis into three steps. Initially, they divided the losses obtained from the tests into those that depended on the market and those that actually occurred. Then they compared the expected capital shortfall with the share capital shortfall using the systemic risk (SRISK) measure. Finally, they considered regulatory risk weights and observed their impact on bank asset portfolios. They have demonstrated that Basel II standards based on risk-weighted assets pose a problem in the context of diversification.

Guarda et al. (2013) used macroeconomic methods for stress testing. They decided to use the mixture vector autoregressive (MVAR) model, which allows a multimodal distribution. The modified VAR allows for more effective assessment of the impact on solvency, the economy and the capital requirements of banks. According to the study, the VAR model underestimates credit risk, and MVAR allows the capture of more extreme movements occurring in the time series for extreme events and gives better results. When generating scenarios, Monte Carlo simulations can be used. The baseline scenario is created by drawing a sample from the normal distribution. The extreme scenario is developed in a similar way, with the difference that the introduced macroeconomic variables are subjected to shocks.

An article published by the Bank of England in 2017 contains an analysis of the economy affected by two stress scenarios. The first is called an annual cyclical scenario. The other one is referred to as the biennial exploratory scenario. It is a complementary element to this study and contains persistently low interest rates. The results allow us to conclude that the banking system can be treated as a whole and the total supply of loans will be maintained, including the coverage of losses that may result from them. The results indicate that, using several economic indicators, it is possible to carry out a solid and probable analysis of a country's response to given shocks, not only those caused by the situation in a given economy, but also by the global situation.

The third part of the section focuses on publications describing the methodology for generating extreme scenarios. Loretan (1997) discusses the creation of market risk scenarios using principal component analysis (PCA). This analysis makes it possible to identify the factors that explain a significant part of the variance of a group of variables and so we obtain a significant reduction in dimensionality when building a model. Stress scenarios should be generated by combinations of the most significant principal components obtained from the analysis of a selected group of variables. The disadvantage of using this method to create macroeconomic scenarios is that indicators that have less impact on the economy's behaviour will certainly be omitted. In some cases, there may also be the problem of variable orthogonality that will make it impossible to make a meaningful economic interpretation of the risk factors.

Hughes and Hillman (2013), in cooperation with Moody's Corporation, describe the way in which extreme scenarios are created based on multi-stage simulations. The process of creating scenarios using the accelerator proposed in the study involves selecting the most important economic indicators.

Zandi and Hoyt (2015) conducted an advanced scenario analysis for a model covering the entire economy of a selected country. The basic information on which economy models can be built is the equality of aggregate demand and supply. Though in the short term, changes are determined by shocks as a function of demand, in the long term, they are determined by changes in the function of aggregate supply. Forecasts are based on an approach that involves building many structural models and subjecting them to shocks at the same time. They use structural model methods because they consider them to be a more precise tool for studying economic implications than VAR or the dynamic stochastic general equilibrium (DSGE) model. The disadvantage of this method is its lower flexibility compared to the VAR model. However, it is less prone to errors when assumptions are not fulfilled that cause significant errors in DSGE models.

An article published by the Board of Governors of the Federal Reserve System describes a different methodology for stress testing. It contains three scenarios with varying degrees of risk. Negative and extremely negative scenarios help in assessing the resilience of institutions to economic fluctuations and indicate their strength. Basic scenarios contain information predicted by analysts. Elements of both market and macroeconomic conditions have been included in the resulting negative scenarios, which is the advantage of this study.

Another article which presents selected stress scenarios has been published by the European Systemic Risk Board. The methodology also includes a method of defining the PD. According to the authors, a scenario should contain many factors that may act simultaneously. Thanks to this kind of scenario, the stress test analysis will be more complete and fully useful. The scenarios contain historical relationships between all risk factors. The scenarios are created in a two-stage simulation, each of which covers a period of two months.

Philippon et al. (2017) focus on backtesting for stress tests. The process of stress testing consists mainly of designing scenarios, applying models and monitoring the results obtained. The authors criticise the methods of stress testing due to unrealistic stress scenarios and the lack of knowledge on how to use the available data and their impartiality. The results show that the logistic regression model is suitable for stress test analysis. Initially, the principal components are analysed to identify the macroeconomic factors. Then the model using the results of the stress tests and parameters defined for a corporate portfolio is estimated. Backtest analysis is the final stage of the study.

To sum up, this section contains a review of the empirical literature discussing the methodology used in stress testing. It shows successive test methods that use a rating migration matrix, followed by articles containing the macroeconomic approach to stress testing and creating stress scenarios. The introduction of the literature on the subject is necessary for conducting a good empirical analysis. Section 3 contains the results of the analysis, as well as a detailed description of the data and methods used.

This section presents the individual elements of the study related to stress testing based on a rating migration matrix. The study consists of several parts. For this purpose, the power transformation function and the Hadasik indicator (1998) are used. Then stress tests are carried out using a rating migration matrix. It is also necessary to define appropriate stress scenarios that are applied to the model based on the rating migration matrix.

Due to the nature of the study, its initial stage involves selecting an appropriate method for determining the PD taking account of the research sample used. Given that the selected sample includes a group of listed companies operating in Poland, one of the better PD indicators is obtained from the Hadasik model. Model validations carried out by Nehrebecka (2018) showed that model V was characterised by the best statistics. The selected Hadasik model is as follows:
_{1} – total liabilities/balance sheet total, _{2} – net sales revenues/average receivables, _{3} – inventories*365/sales, _{4} – net profit/total capital.

Then two indicators are combined: the PD is calculated using the existing Hadasik model (1998) and the Herfindahl–Hirschman Index (HHI), which identifies the industry effect using a non-linear model. To calculate the HHI, industries have been divided into six main groups: industry, construction, transport, retail and wholesale, and other services.

This approach combines the information obtained from quantitative and behavioural models. The quantitative model should contain basic information about the financial indicators of a given enterprise. The behavioural model contains the characteristics of a given enterprise. Each of the two elements has been transformed into a score ranging from 0 to 100 and the power transformation function has been used to estimate the non-linear model. The transformation function used takes the general form as follows:
_{1}, _{2}..., _{n}

In this study, a constrained non-linear least squares method is used, making it possible to obtain coefficients that add up to one and above zero. This model is called the optimal mixed model. The goal is to find the best power coefficients for the transformation function, in other words, weights, and thus obtain an optimal PD ratio that contains comprehensive information about the companies concerned. The calculated PD ratio can be used to further analyse data on the rating migration matrices. However, an additional element involves transforming this indicator into rating classes to determine a rating migration matrix. The individual classes have been grouped as follows:

A – Class 4, where PD > p(75),

B – Class 3, where PD > p(50) and PD <= p(75),

C – Class 2, where PD > p(25) and PD <= p(50),

D – Class 1, where PD < = p(25).

The next stage of the study is conducted using a rating migration matrix defined based on the PD variable. A rating migration matrix is closely related to the theory of Markov chains. A Markov process is a series of events in which the probability of each event depends only on the previous event. This means that information for a given event can only be obtained from the previous state, and no other event will matter. A Markov chain is a Markov process defined in discrete state space. The definition of a rating migration matrix is derived precisely from the property of the Markov chain, that is, homogeneity.

Łańcuch jest jednorodny, gdy prawdopodobieństwo warunkowe, że proces znajduje się po n krokach w danym stanie, jeśli po n—1 krokach był w innym stanie nie zależy od n.

When the Markov chain meets this property, the distribution of probabilities of the transitions between individual states can be presented as a transition probability matrix. This matrix is stochastic, and its individual elements are expressed by the formula:Moreover, homogeneity shows that the individual probabilities do not depend on the size

When moving on to the analysis of variables from a rating migration matrix, one should start with PCA. It has been decided to use PCA as only the most important indicator from the rating migration matrix has been identified. The chosen method is used to reduce the number of dimensions and identify a linear combination of variables that explains the phenomenon to the greatest extent or otherwise has maximised variance. PCA is a factor analysis model that does not take account of the variance structure. It is used to change the coordinate system so as to maximise the variance of the first coordinate and then the subsequent coordinates and group the variables into subsets. The generated coordinates are called loads of generated factors, in other words, principal components that are orthogonal to each other. The variance of the new variables is called the eigenvalue. The observation space obtained is characterised by the fact that the initial principal components explain most of the variance. The analysis described above is mainly used to reduce the dimensionality of the data set. It is possible to interpret new generated variables, yet this can often be complicated. PCA can be based on a correlation matrix or a covariance matrix. The set used in the analysis should be homogeneous. The model takes the following form:

The principal component (PC) function is maximised depending on the vector. Then the eigenvalues of the vector are looked for:

In the next stage, we use a variable obtained from the PCA for one-notch upgrade and one-notch downgrade migrations, respectively. The above variables are transformed to the 0–1 form, where they assume the value is 1 if the variables derived from the rating migration matrix exceed the median value. The probit model is used to identify the relationship between the business cycle and changes in the solvency of enterprises. The probit model assumes that the cumulative distribution function has a normal standard distribution. The probability function for a single event takes the following form:

The last element of the analysis of variables from the rating migration matrix is quantile regression on the probability values obtained from the probit model for the downgrade and upgrade migration variable. Quantile regression has been performed for the first lower and upper quantiles. This approach allows estimating the quantile functions of the conditional cumulative distribution function. An additional advantage is the more complete description of the basic conditional distributions. As the conditional cumulative distribution function for the variable obtained from median mapping on the variable from the rating migration matrix does not have a standard shape and is varied, the chosen method is appropriate.

In the case of quantile regression, the hyperplane is the conditional expected value:

This methodology does not assume a distribution type for the random residue vector in the model. The main purpose of this kind of regression is to identify the relationship between the selected quantile range and the explanatory variables.

The first scenario for the stress testing method is the result obtained from the forecast using the VAR model presented in the next section. The baseline scenario is a real path for the development of macroeconomic variables. The forecasted development paths using VAR models with plus/minus standard deviation are used as the next scenario. The selected methods of creating scenarios can be treated as the real paths of economic development. Thanks to such methods, all the results obtained will be interpreted as the real impact of the economy on the solvency of enterprises. The main problems with the choice of scenarios are related to the way of choosing such development paths so that the results obtained from the experiment are as close to real values as possible.

The final stage of the analysis is the use of the VAR model for macroeconomic variables. The purpose of the forecasting used is to determine the probable paths of given variables for subsequent periods. Forecasting based on the VAR model is treated as one of the scenarios used in stress testing.

Then the values obtained from quantile regression are combined using the following equation:

The VAR model is used to detect linear relationships between multiple variables in the form of a time series. Their genesis is associated with one-dimensional autoregressive (AR) models. VAR is expressed in the form of many equations for response variables. An equation is made for each variable depending on the appropriate number of this or other variable delays and random error. The advantage of this method is that there is no need to provide specific knowledge about the factors affecting the variable. The general form of the VAR equation for the response variable is as follows:

The equation extended by explanatory variables is as follows:

Forecasts made using this method are of much better quality than those made with traditional structural models. Another reason for choosing the VAR model is the nature of the data used. The selected time series are stationary and causal and so there are grounds to use this forecasting method.

In summary, this section presents the stages of econometric modelling and statistical analysis. Particular attention is paid to the initial analysis related to the generation of the PD variable. Moreover, it outlines the methodology for each stage of the study using a rating migration matrix for stress testing.

The publications presented in the literature review are mostly based on the data of international companies and use ready-made extreme scenarios. One of the serious problems faced by researchers is choosing and developing appropriate scenarios that match the selected sample of enterprises at risk of default. In this study, it has been decided to use a sample of small and medium-sized enterprises as they dominate in the Polish market. Extreme scenarios have been selected for the selected sample and include macroeconomic data for the Polish market. This section is divided into two parts. While the first part discusses the database used for the study, the other one presents the characteristics of the variables used in the modelling process.

The data used in the study are divided into microeconomic and macroeconomic data. While the first of these are used to calculate the relevant variables regarding credit risk, the others determine the economic situation in the country and are used primarily for extreme scenarios. Selected data come from two sources. Microeconomic data come from financial statements published on the NOTORIA Polska website (Emerging Markets Information Service). This portal contains data on over eighty emerging markets from around the world. It provides financial information, political and macroeconomic news and, what is particularly important in this study, data on listed companies in Poland. It contains financial statements of companies listed on the Warsaw Stock Exchange, both on the Main Market (main and parallel markets) and the NewConnect market. Information from the quarterly financial reports of these entities from 1998 to 2016 have been used to create the basic data set. Macroeconomic data come from a database available on the OECD Statistics website. The OECD makes data on the economic situation in all international markets available on its website. This study uses variables such as gross domestic product (GDP) in terms of consumption, share prices, export, unemployment rate, retail trade and GDP in terms of import.

Entities involved in financial or insurance activities as well as the entities of public administration, national defence and compulsory social insurance (sections K and O according to the Polish Classification of Activities, PKD, 2007) have been excluded from the research sample as these enterprises are subject to the law that to some extent regulates the financial variables used in this study. Importantly, the study considers all enterprises, particularly those that have financial problems and it can be argued that they are on the verge of bankruptcy. The elements that allow identifying such enterprises are negative equity or removal from the National Court Register (

The database ultimately used in the study is an unbalanced panel from 1998 to 2016, which contains information about 530 enterprises, and the number of observations amounts to nearly 25,000. The sample contains information on the vast majority of the Polish market and, in this sense, it can be considered representative. In this study, it has been decided to use quarterly frequency panel data, which have then been transformed into time series.

To sum up, using the financial statements of listed companies included in the NOTORIA Polska website and additional macroeconomic data from the OECD database, a data set has been created and then used to develop variables for the study. The exact definitions of the variables created based on the collected data are presented in Table 1. The next section discusses them and presents descriptive statistics.

List of variable definitions used in the study

PD | 2.41753 – 2.62766 *(total liabilities/balance sheet total) + 0.0013463*(net sales revenues/average receivables) – 0.009225*(inventories*365/sale) + 0.0272307*(net profit/total capital) | NOTORIA |

HHI | Herfindahl-Hirschman index | NOTORIA |

Import | Increase in import of goods and services compared to the previous period | OECD |

Retail trade | Increase in retail trade compared to the previous period | OECD |

Share prices | Increase in share prices compared to the previous period | OECD |

Export | Growth in export of goods and services compared to the previous period | OECD |

Consumption | Increase in consumption compared to the previous period | OECD |

Unemployment rate | Δ (unemployment rate) | OECD |

One of the key issues examined in this study is undoubtedly the relationship between variables determining the state of the economy and variables describing the state of indebtedness of enterprises and the selection of the PG variable. It has been decided to first discuss the PD ratio, followed by the variables from the rating migration matrix and, finally, the macroeconomic indicators.

The PD response variable has been defined using the power function, which contains full information about the examined entities. The methodology has been taken from a practical approach that allows combining several indicators, such as those from a behaviour scorecard. When developing the risk-of-bankruptcy variable, it is crucial to cover all the available information about a given entity. In this study, the market concentration indicator and PD Hadasik indicator have been used, excluding the behavioural model, which would not add valuable information in this case. This study somewhat supplements the current considerations regarding financial debt under Polish conditions.

As the financial debt indicator has been developed based on two variables, full information has been obtained for this phenomenon. The first PD variable, calculated using the Hadasik method, is characterised by a left-skewed distribution in the range of 0–100%, where the highest values mean default, as shown in Figure 1.

The market concentration ratio is another variable used to build the full corporate solvency ratio. To calculate the HHI, individual industries have been aggregated into general groups. Transformed industries have been included in 17 groups, of which the main ones are: construction, trade, transport, industry and services. The distribution of the ratio is shown in Figure 2. The index assumes values close to 100 when the market is characterised by excellent competition, and values close to 0 when the market is taken over by one main industry (monopoly). A monopoly means that companies have better credit standing.

Ultimately, the variable on corporate solvency has a left-skewed distribution. The ratio is presented in Figure 3. It can be seen that the vast majority of enterprises remain in a good financial situation regarding solvency. However, there is an area of the market where the situation is close to being insolvent or bankrupt. Using the financial liability repayment variable defined in this way, we obtain an integrated indicator that provides full information about the phenomenon under investigation. This enables full risk assessment analysis using the rating migration matrix.

The analysis of variables from the rating migration matrix is the next stage of the analysis. Figures 4 and 5 show one-notch upgrade and downgrade transition variables. These variables are characterised by a time distribution similar to the business cycle. While the variable for the highest degree of risk assessment has the highest variance, variables close to default values have the lowest variance. Variables of downgrade and upgrade migrations have similar critical value distributions. The highest peaks occur at a similar time. Very high variance occurs around 1998 and 2007, that is, at the time of fluctuations in world markets caused by crises, among other things. The most stable indicators occur for values close to default. This means that if a company becomes insolvent, it is very difficult to change its status.

Variables from the PCA for the rating migration matrix have been median mapped. Depending on the median value, this variable takes 1 when the series values exceed the median or 0 when they are below this value. The variables defined in this way for upgrade and downgrade transitions are shown in Figures 6 and 7, respectively. It is worth noting that in the above-mentioned figures, the behaviour of indicators stabilises after 2012.

When explaining risk variables from the migration matrix, macroeconomic indicators, which are used for further analysis, should be presented. As this study is conducted using time series, it is necessary to present the variables over time and their transformations, which have ultimately been used in the modelling. The form of the series used for modelling should be stationary, seasonally adjusted and not cointegrated. These procedures should be carried out to avoid the problem of spurious regression. Figure 8 presents the development paths for selected macroeconomic variables and, if necessary, seasonally adjusted and stationary forms of these variables. Stationary tests, such as the Dickey–Fuller test and KPSS, are presented in Table A1 in Appendix.

In order to clarify the risk-of-bankruptcy variable, it has been decided to introduce variables such as the unemployment rate, export, share prices, consumption, import and retail trade. It is necessary to bring all variables to a stationary form and eliminate cointegration. Of the selected variables, only the unemployment rate shows non-stationarity, which is why it has been decided to use it after single differentiation. The largest variance of this variable occurs around 2008. This may be due to changes in world markets. Another variable, export, shows stationarity without the need for differentiation. As in the case of the unemployment rate variable, the largest variance occurs around 2008. This is the most pronounced outlier over the period under review. The next three variables, also in stationary form, show a similar distribution. Attention is mainly drawn to the outliers in 2000 and 2008. It is worth linking these characteristic periods of change with periods of change for the variable determining the solvency risk of enterprises. It can be seen that the variables behave similarly. The last selected variable, retail trade in the stationary form, does not contain seasonality. A characteristic outlier appears around 2000. This is the only such clear observation. Then the series is quite stable.

The preliminary data analysis presented in this section allowed drawing basic assumptions about the studied issues. However, another important element is to forecast macroeconomic variables and submit them to stress scenarios. Having analysed the selected literature in terms of variable selection and compared the conclusions drawn from that with the available database, we have proposed a set of variables to explain the studied phenomenon. The results are presented in the next section, which contains the conclusions and estimations of all models.

The final section of the article presents and discusses estimations of econometric models and stress tests.

Due to the nature of the data from the migration matrix and the methodology based on the rating transition, it has been decided to estimate one model by which the default variable and two models for the final analysis are obtained. The model for the default variable presents a combination of PD variables from the Hadasik model (1998) and the HHI. The model allows obtaining more information about the default variable created. Next, probit models for variables derived from the migration matrix are estimated. The first one explains the phenomenon of a one-notch upgrade transition and the other explains a one-notch downgrade movement. This approach will allow a comprehensive study of the phenomenon of the changing degree of solvency risk for enterprises. The next stage involves obtaining residuals from the models for the upgrade and downgrade migration variables, and then using them in quantile regression as response variables.

The parameter estimates, the results of their statistical significance tests, and diagnostic test results for all models are presented in Tables 2 and 3. The models have been selected using the general-to-detail method and also paying special attention to the prognostic possibilities of the selected variables. The forecasts have been made using the VAR model. It is worth noting that for the above variables, the null hypothesis that there is no causality in the Granger sense based on the Granger causality test performed has been rejected. Table 2 contains the results of the VAR models used to forecast future paths for variable development. Moreover, autocorrelation tests and the Jarque-Bera test for residue normality have been included. In Model 1, the response variable is the one-notch downgrade transition variable, explained by macroeconomic indicators. In Model 2, the response variable is the one-notch upgrade transition variable, explained by macroeconomic indicators. The results of the probit estimation are presented in Table 3 for the explanatory variables used in the VAR models (Models 3 and 4). The main reason for constructing such models is to identify the determinants of macroeconomic variables, that is, those that determine the economic situation. It has been decided to use the seasonal factor, that is, the variable determining a given quarter.

Results of estimation of VAR models

0.2020 | [1.61; 0.113] | |||

0.0954 | [0.76; 0.453] | |||

0.1622 | [0.67; 0.508] | |||

−0.8204 | [−3.41; 0.001] | |||

30.5003 | [0.91; 0.366] | |||

−16.7610 | [−0.49; 0.627] | |||

−33.3054 | [−2.35; 0.022] | |||

0.0545 | [0.82; 0.414] | |||

0.1183 | [1.78; 0.081] | |||

0.3884 | [3.02; 0.004] | |||

−0.3914 | [−3.08; 0.003] | |||

3.3631 | [0.19; 0.850] | |||

5.0669 | [0.28; 0.780] | |||

−19.9736 | [−2.67; 0.010] | |||

0.1817 | [1.49; 0.141] | |||

−0.1262 | [−1.04; 0.305] | |||

0.1074 | [0.90; 0.370] | |||

−0.3177 | [−2.64; 0.010] | |||

0.0994 | [0.58; 0.562] | |||

0.4579 | [2.78; 0.007] | |||

−0.1223 | [−0.74; 0.459] | |||

0.3918 | [2.33; 0.023] | |||

0.9983 | [1.58; 0.120] | |||

0.1541 | [1.57; 0.122] | |||

0.1742 | [1.77; 0.082] | |||

0.0693 | [0.72; 0.473] | |||

0.0036 | [0.04; 0.970] | |||

−0.0547 | [−0.4; 0.692] | |||

−0.0515 | [−0.39; 0.699] | |||

−0.1656 | [−1.25; 0.216] | |||

−0.0344 | [−0.25; 0.801] | |||

0.9983 | [1.32; 0.191] | |||

0.2917 | 0.2931 | |||

0.3998 | 0.1346 | |||

0.9985 | ||||

[4.32; 0.001] | [3.05; 0.006] | |||

[6.99; 0.000] | [1.147; 0.346] | |||

[7005.84; 0.000] | ||||

[0.540; 0.4625] | [3.812; 0.0509] | |||

[0.946; 0.6231] | [6.728; 0.0346] | |||

[1.573; 0.6655] | [7.059; 0.0701] | |||

[1.947; 0.7456] | [7.180; 0.1267] | |||

[4.23; 0.1205] | [4.71; 0.0947] | |||

[27.99; 0.7145] | [22.89; 0.9057] | |||

0.89 | −0.56 | |||

0.25 | −0.03 | |||

0.25 | −0.03 | |||

−0.38 |

Model estimation results using probit models

−0.035 | [−1.9; 0.057] | |||

0.066 | [2.27; 0.023] | |||

5.151 | [1.13; 0.260] | |||

0.044 | [0.10; 0.921] | 0.9295 | [1.98; 0.048] | |

0.563 | [1.25; 0.212] | 1.3360 | [2.77; 0.006] | |

0.582 | [1.29; 0.199] | 0.8352 | [1.77; 0.076] | |

−0.425 | [−1.28; 0.202] | −1.1117 | [−2.89; 0.004] | |

0.1610 | [2.22; 0.027] | |||

0.0898 | [1.89; 0.064] | |||

0.1089 | 0.1853 | |||

[10.71; 0.0976] | [18.50; 0.0024] | |||

_hat [3.19; 0.001] | _hat [3.81; 0.000] | |||

_hatsq [1.71; 0.088] | _hatsq [0.51; 0.608] | |||

[6.49; 0.5920] | [6.9; 0.5472] | |||

0.215 | 0.368 | |||

0.620 | 0.708 | |||

0.229 | 0.417 |

The next step involves performing quantile regression and modifying the variables obtained from the probit regression using a mixed equation, described in detail in the research methodology. Moreover, all variables have been appropriately forecasted to perform stress testing.

To sum up, based on the estimates received and the model assessment carried out, it can be concluded that there are no grounds to talk about the econometric incorrectness of the models. The resulting estimates and forecasts are now used in the stress test analysis. The results obtained in the next section are used to verify the research goals.

The final step of the study involves applying stress tests using the rating migration matrix. To carry out this test, we use the actual values of the analysed variables as the baseline scenario, the values of the forecasted variable obtained using the VAR model and values from the forecasts modified by (plus/minus) one standard deviation as extreme scenarios. The extreme scenarios have been divided into positive and negative ones, respectively. The results of the stress test for one-notch upgrade and downgrade transitions are presented in Figures 9 and 10.

The results obtained indicate that the one-notch downgrade transition ratio is less stable over the forecast period than the one-notch upgrade migration ratio. The one-notch downgrade transition ratio increases over the forecast period compared to the baseline period. However, comparing it with the baseline scenario, they create a similar development path. An interesting observation is the development path for the upgrade migration variable. Both the baseline and extreme scenarios have a similar variance. This means that the shocks introduced do not affect the direction of changes, only their size.

In summary, the stress tests used provide information on future events and answer the question of whether early preventive action should be taken to improve the credit standing of enterprises.

The purpose of this article is to conduct stress testing for credit risk on data concerning Polish non-financial enterprises. The data obtained from financial statements from the NOTORIA Polska database are used. The study is conducted on a sample of listed companies in Poland covering the years 1998–2016. Moreover, data for macroeconomic variables come from the OECD Statistics database. Then, the models for variables derived from the rating migration matrix are estimated using a probit model and these variables are forecast using a VAR model and subjected to endogenous shocks.

The article proposes a methodology for stress test analysis on a sample of listed companies in Poland. Due to the characteristic behaviour of transition indicators from the stochastic matrix, it is possible to explain these variables through macroeconomic characteristics. This stress test approach is an extension of the existing methods. The study provides complete information about the phenomenon studied and allows the forecasting of future indicators.

This method also has deficiencies. The main disadvantage is the number of stages needed to perform this analysis. As the PD ratio is initially developed, followed by migration matrices and forecasts, it is necessary to build a significant number of econometric models. The complexity of the study can make it difficult to perform systematic analyses.

The results obtained in this article may serve as a valuable source of information for the credit-related sector and for other researchers who want to verify the stress test methods applied. Knowledge of the future indicators of corporate bankruptcy in Poland may help to identify extreme situations and when to apply appropriate preventive tools. It should be emphasised that, nowadays, prudential and warning methods are necessary due to the constantly changing economic conditions. The issues discussed in this article constitute an important part of the problems under consideration, however, they do not exhaust the topics related to credit risk and stress testing. This article can be a source of inspiration for further research in this field, also in relation to the method of creating extreme scenarios.

#### Model estimation results using probit models

−0.035 | [−1.9; 0.057] | |||

0.066 | [2.27; 0.023] | |||

5.151 | [1.13; 0.260] | |||

0.044 | [0.10; 0.921] | 0.9295 | [1.98; 0.048] | |

0.563 | [1.25; 0.212] | 1.3360 | [2.77; 0.006] | |

0.582 | [1.29; 0.199] | 0.8352 | [1.77; 0.076] | |

−0.425 | [−1.28; 0.202] | −1.1117 | [−2.89; 0.004] | |

0.1610 | [2.22; 0.027] | |||

0.0898 | [1.89; 0.064] | |||

0.1089 | 0.1853 | |||

[10.71; 0.0976] | [18.50; 0.0024] | |||

_hat [3.19; 0.001] | _hat [3.81; 0.000] | |||

_hatsq [1.71; 0.088] | _hatsq [0.51; 0.608] | |||

[6.49; 0.5920] | [6.9; 0.5472] | |||

0.215 | 0.368 | |||

0.620 | 0.708 | |||

0.229 | 0.417 |

#### Test results for stationary variables and seasonality

−6,380 | −2,907 | 0,256 | 0,6129 | 0,0576 | 0,146 | 2,119 | 0,3466 | |

0,356 | 0,8371 | |||||||

0,393 | 0,9418 | |||||||

1,772 | 0,7776 | |||||||

−3,147 | −2,911 | 0,386 | 0,5343 | 0,1 | 0,146 | 0,000 | 1,000 | |

0,394 | 0,8212 | |||||||

1,298 | 0,7296 | |||||||

1,406 | 0,8432 | |||||||

−3,951 | −3,477 | 2,447 | 0,1177 | 0,128 | 0,146 | 63,537 | 0,000 | |

2,449 | 0,2940 | |||||||

2,610 | 0,4557 | |||||||

6,679 | 0,1539 | |||||||

−8,911 | −2,907 | 0,738 | 0,3903 | 0,0456 | 0,146 | 0,634 | 0,9831 | |

0,887 | 0,6417 | |||||||

2,286 | 0,5152 | |||||||

2,287 | 0,6832 | |||||||

−8,621 | −2,907 | 0,030 | 0,8617 | 0,0436 | 0,146 | 0,000 | 1,000 | |

0,581 | 0,7479 | |||||||

3,283 | 0,3500 | |||||||

9,925 | 0,0417 |

#### Results of estimation of VAR models

0.2020 | [1.61; 0.113] | |||

0.0954 | [0.76; 0.453] | |||

0.1622 | [0.67; 0.508] | |||

−0.8204 | [−3.41; 0.001] | |||

30.5003 | [0.91; 0.366] | |||

−16.7610 | [−0.49; 0.627] | |||

−33.3054 | [−2.35; 0.022] | |||

0.0545 | [0.82; 0.414] | |||

0.1183 | [1.78; 0.081] | |||

0.3884 | [3.02; 0.004] | |||

−0.3914 | [−3.08; 0.003] | |||

3.3631 | [0.19; 0.850] | |||

5.0669 | [0.28; 0.780] | |||

−19.9736 | [−2.67; 0.010] | |||

0.1817 | [1.49; 0.141] | |||

−0.1262 | [−1.04; 0.305] | |||

0.1074 | [0.90; 0.370] | |||

−0.3177 | [−2.64; 0.010] | |||

0.0994 | [0.58; 0.562] | |||

0.4579 | [2.78; 0.007] | |||

−0.1223 | [−0.74; 0.459] | |||

0.3918 | [2.33; 0.023] | |||

0.9983 | [1.58; 0.120] | |||

0.1541 | [1.57; 0.122] | |||

0.1742 | [1.77; 0.082] | |||

0.0693 | [0.72; 0.473] | |||

0.0036 | [0.04; 0.970] | |||

−0.0547 | [−0.4; 0.692] | |||

−0.0515 | [−0.39; 0.699] | |||

−0.1656 | [−1.25; 0.216] | |||

−0.0344 | [−0.25; 0.801] | |||

0.9983 | [1.32; 0.191] | |||

0.2917 | 0.2931 | |||

0.3998 | 0.1346 | |||

0.9985 | ||||

[4.32; 0.001] | [3.05; 0.006] | |||

[6.99; 0.000] | [1.147; 0.346] | |||

[7005.84; 0.000] | ||||

[0.540; 0.4625] | [3.812; 0.0509] | |||

[0.946; 0.6231] | [6.728; 0.0346] | |||

[1.573; 0.6655] | [7.059; 0.0701] | |||

[1.947; 0.7456] | [7.180; 0.1267] | |||

[4.23; 0.1205] | [4.71; 0.0947] | |||

[27.99; 0.7145] | [22.89; 0.9057] | |||

0.89 | −0.56 | |||

0.25 | −0.03 | |||

0.25 | −0.03 | |||

−0.38 |

#### List of variable definitions used in the study

PD | 2.41753 – 2.62766 *(total liabilities/balance sheet total) + 0.0013463*(net sales revenues/average receivables) – 0.009225*(inventories*365/sale) + 0.0272307*(net profit/total capital) | NOTORIA |

HHI | Herfindahl-Hirschman index | NOTORIA |

Import | Increase in import of goods and services compared to the previous period | OECD |

Retail trade | Increase in retail trade compared to the previous period | OECD |

Share prices | Increase in share prices compared to the previous period | OECD |

Export | Growth in export of goods and services compared to the previous period | OECD |

Consumption | Increase in consumption compared to the previous period | OECD |

Unemployment rate | Δ (unemployment rate) | OECD |

Has Economic Growth in Balkan Countries Been Pro-Poor in the 2012–2017 period? Expectations of older workers regarding their exit from the labour market and its realization Professionalisation of Family Firms and Accounting Function: Empirical Evidence Can People Trust What They Don‘t Understand? Role of Language and Trust for Financial Inclusion Sources of Finance for Public-Private Partnership (PPP) in Poland How to create an engagement-friendly environment in reward-based crowdfunding? Home Advantage Revisited: Did COVID Level the Playing Fields? Public Debt Sustainability and the COVID Pandemic: The Case of Poland Covid-19 Pandemic and Day-of-the-week Anomaly in Omx Markets COVID-19 Pandemic and the Situation of Immigrants in Enterprises Taxation, Inequality, and Poverty: Evidence from Ukraine Identity and Private Transfers of Time and Money