Judicial Fiscal Risks: Using Lawsuit Metadata to Estimate the Time until Federal Payment Orders in Brazil
fiscal risks; court-ordered payments; forecasting models; duration; time to event prediction; survival analysis; machine learning; lawsuits.
This research explores the problem of predicting judicial fiscal risks, focusing on the duration of legal proceedings. This is a critical aspect for forecasting the timing of public expenditures and improving fiscal policies. Although the literature on judicial prediction is extensive, with numerous studies on outcomes and decisions, the duration of legal cases remains an underexplored topic. Our primary objective was to assess the usefulness of metadata from lawsuits as independent variables in statistical and computational models, aiming to predict the duration of the enforcement phase, which begins with the final judgment and ends with the inclusion of the judicial order in the Annual Budget Law. We analyzed data on judicial orders (precatórios) requested by Federal Regional Courts and included in federal budget laws from 2012 to 2024. We developed cross-sectional and longitudinal data models using machine learning algorithms to predict the duration of legal proceedings. We considered metadata such as the year and month of the final judgment, court and judicial chamber of origin, subject matter, and government agency involved. For longitudinal models, we also included duration at the time of prediction. Our findings reveal that: (a) judicial orders requested in the same year are highly correlated; (b) longitudinal models outperform crosssectional models in predicting the total duration; and (c) metadata are valuable for duration prediction but require additional features to enhance accuracy. This research advances the understanding of judicial risks, improving fiscal management and increasing information availability for stakeholders, as well as supporting future studies on this topic.