Animated AI-EWT logo

Methodology

The use of an artificial intelligence algorithm.

Research design

An interdisciplinary methodology

The research used legal-analysis and economic-statistical tools. From complementary perspectives, the two units addressed the question of assessing the effectiveness of early warning tools, with particular regard to SMEs.

AI-EWT From the legal framework to predictive analysis of SME distress.

Analysis paths

Law and economic-statistical analysis

The legal research and the economic-statistical analysis contributed to the assessment of warning tools from different but coordinated perspectives.

Two complementary perspectives.

01Legal analysis. The legal analysis examined the regulatory framework, including the Italian Code of Business Crisis and Insolvency, Directive (EU) 2019/1023 and the experience of other European legal systems, to identify practical weaknesses and assess whether the warning tools were consistent with early detection. The published collective volume brings together the outcomes of this phase.
02Economic-statistical analysis. The economic-statistical analysis covered financial data on Italian companies available in AIDA, the preparation of time series and the comparison of statistical, machine-learning and deep-learning techniques. The script published on this page documents this technical phase.

Publications

Legal research

The volume La gestione iniziale della crisi (The initial management of the crisis) explores early warning measures, the potential of artificial intelligence in early crisis detection, and pre-insolvency restructuring tools.

Cover of the book La gestione iniziale della crisi
Cacucci Editore La gestione iniziale della crisi (Bari, 2024).

Outcome of the method

The model employed

The economic-statistical research, developed in dialogue with the legal research, employed the model documented in the published R script. The file prepares the data, compares several model families and organises temporal evaluations. The next section describes the operations that can be verified in the code.

3 financial years per LSTM sequence 3 test windows: 2020, 2021, 2022 3 model families compared
time_features_lstm_2020 <- layer_input(
  shape = c(3, 51),
  name = "time_features_lstm_2020"
)
Data and time seriesModel comparisonTemporal evaluations

Research models

The experimental workflow described in the R script

The script published within the PRIN 2022 - AI-EWT project experiments with several model families to classify the allert target: logistic regression, a feed-forward neural network and a multi-input LSTM network.

The file organises temporal evaluations for 2020, 2021 and 2022. The construction of the allert target is external to the published script; the page therefore does not assign an unsupported time horizon or probability to its output.

Pipeline

Processing Pipeline

The pipeline below summarises only operations visible in the TXT, without adding performance figures, sample sizes or techniques not documented in the file.

Phase 1 Sample

AIDA import, S.r.l. filter, ordering and continuous annual series.

Phase 2 Selection

Normalisation, likelihood-ratio and correlation reduction.

Phase 3 Models

Logistic regression, feed-forward network and multi-input LSTM.

Phase 4 Evaluation

2020–2022 tests, ROC, Youden threshold and confusion matrix.

Code

Explore the published file

The file is displayed in full and without modification. It is technical material dedicated to industry experts and documents data preparation, training and evaluation.

Data notice: additional data used in the research are not published with the script because they are covered by the data providers' copyright and related usage restrictions. The TXT is not a standalone prediction service executable in the browser.
Download the published file
Loading Script - PRIN 2022.txt file...

Guided trial

Algorithm simulator

The predictive algorithm

A simplified simulation of the algorithm

Test the published script, which combines a three-year financial sequence, four static variables and region. Choose an example or build a scenario to see the simulated flow.

Choose an example: the data used will appear below the cards before the outcome.

Architecture visible in the TXT

How the signals converge

LSTM · 3 years

Temporal sequence

Synthetic demonstration signal
Dense · 4 inputs

Static information

Synthetic demonstration signal
Embedding · 1 category

Region

Demonstration index

Check whether the selected data activate the alert mechanism. The 0–100 index is for demonstration only.

Privacy: the data entered remain in your browser and are neither transmitted nor stored.

Simplified educational simulation: it does not estimate an insolvency probability or replace a professional assessment. The simulator does not exactly reproduce the trained model because some data are excluded for computational reasons.

Simulation outcome

Is the alert activated?

Demonstration index 0–100
0/100
WAITING FOR CALCULATION

Alert mechanism activation 0–100

Complete the three branches or choose a scenario.

Factors with the greatest effect

  • Details will appear after calculation.
How it is calculated

The three-year sequence accounts for 70% of the educational calculation; within it the years weigh 20%, 30% and 50%. The four illustrative static aspects account for 30% in equal parts. Each new region selection generates a random demonstration contribution between 0 and 6 points.

The diagram follows the structure visible in the script: LSTM branch, dense branch, regional embedding and concatenation. The formula and intensities exist only for this demonstration and are not coefficients of the research model.