We consider the problem of how to distribute public expenditure among the different regions of an economic entity after all taxes have been collected. Typical examples are: the regions that make up a country, the states of a federal country, or the countries of a confederation of countries. We model the problem as a cooperative game in coalitional form, called the tax game. This game estimates the fiscal resources collected in each region, or coalition of regions, by differentiating between what comes from economic activity within each region and what comes from trade with the other regions. This methodology provides a measure of the disagreement within a region, or coalitions of regions, with respect to the budget received. Similarly, the stability of a budget allocation can be inferred by its situation within the core of the corresponding tax game. We consider the Spanish case as an example and show that the current regional financial system has a moderate degree of instability. We introduce two budget allocation rules, both borrowed from the cooperative games literature: the balanced allocation, which coincides with the nucleolus and with the Shapley value of the tax game, and the weighted balanced allocation, which coincides with the weighted Shapley value. We compare both budget allocation rules with the current Spanish financial system.