Jose Andrés Ortega Barrantes

On the applications of category theory to economics

Resumen: Las matemáticas son una de las herramientas analíticas más importantes de la economía. Se utiliza para describir el comportamiento individual y agregado, así como para validar modelos económicos con datos del mundo real. Sin embargo, evidencia experimental reciente ha arrojado luz sobre la naturaleza incompleta y poco realista que los modelos matemáticos económicos tienen para enseñarnos. En este artículo, analizo el uso potencial de la teoría de categorías matemáticas, en algunas ramas de la economía, como la economía conductual y computacional, y cómo estas ramas pueden conciliarse con el enfoque neoclásico.

Palabras clave: Economía, Econometría, Teoría de categorías, Agentes racionales, Teoría de la decisión.

Abstract: Mathematics is one of economics most important analytical tools. It is used to describe individual and aggregate behaviour, as well as to validate economic models against real world data. However, recent experimental evidence have shed light in the incomplete and unrealistic nature that economical mathematical models have to teach us. In this paper, I analyze the potential use of mathematical category theory, in some economics’ branches such as behavioural and computational economics, and how these branches can be reconciled with the neoclassical approach.

Keywords: Economics, Econometrics, Category Theory, Rational Agents, Decision Theory.

1 Introduction

Several mathematical tools have been widely used in economic analysis in order to draw conclusions about consumer’s and firm’s behaviour, market equilibria, economic growth, among other phenomena. Modern mathematical economics is heavily based on convex sets, diffential calculus, optimization theory, functional analysis and topology. Feasible production or consumption allocations are modelled as convex sets in Rn. Optimal paths in static environments are found using linear or nonlinear programming. No matter what neoclassical concept you want to study, there will be a mathematical object, sufficiently abstract and rigorously formalized, that will help to model it. This fact is a consequence of the formalist era of economics, which transformed the discipline in a «mathematical science».

In 1959, Gerard Debreau, influenced by the Bourbaki group, set up an axiomatic approach to competitive markets in which he proved that a price system exists for which aggregate demand vanishes in every market. Debreau’s work clearly followed this formalist tendency, which was motivated in part by «the increase in the rigor of mathematical formalisms» (Crespo and Thomé 2016). On the other hand, Von Neumann and Morgenstern approach of economics, based on game theory, tried to include a notion of rationally and agent behaviour upon the formal rigor that was prevailing among economists. In spite of all this advances in the field and the introduction of much more elaborated mathematical tools, some economic issues arising from its social science nature have not yet been successfully addressed. In this paper, I analyze some potential applications of category theory in economics, mainly reflexive economics (which may drive further developments in behavioural economics) and computational economics, that may help to address these issues and reconcile neoclassical economic theory with the new research areas of the field.

2 Reflexive Economics

Economics, as a social science, is reflexive in its nature. Human beings are the first living systems to be aware from themselves and this supposes a big problem when modelling how it interacts with others and his environment. One of the first references to the problem of reflexivity in economics, was given by the Lucas’ critique:

Given that the structure of an econometric model consists of optimal decision rules of economic agents, and that optimal decision rules vary systematically with changes in the structure of series relevant to the decision maker, it follows that any change in policy will systematically alter the structure of econometric models.

This is, agents behaviour change the way some economic series (such as GDP) evolve, but as well agents change the way they behave given the changes in this series evolution. Lucas critique was Aquiles heel of keynesian macroeconomics and motivated microfoundations and the revolution of rational expectations. However, this advances in economic theory did not take into account the real problem behind Lucas’ critique: the reflexive nature of economics. In here, we refer to reflexive structures as self-referential. Beyond agents affecting their environment and the environment affecting back agents, reflexivity arrises as one think of agents as being not only conscious of their environment but of themselves: preferences over preferences, beliefs of beliefs, are jus examples of this issues. Later on, Soros, a successful investor, published his paper The Alchemy of Finance, in which he study the philosophical nature of economics and its applications to financial investing. Soro’s work is one of the most famous works in reflexive economics, although it does not provide a mathematical framework to model it. Other kind of reflexivities are given in (Winschel, s.f), such as institutions as being rules to change rules. Some of this reflexive structures have already been analyzed in terms of category theory (Vassilakis 2002). In the next subsections, I will discuss the applications of category theory in the cases of preferences over preferences and beliefs of beliefs, and in the more general case of rational agents as an all.

2.1 Preferences over preferences

Although rational choice theory models agents as choosing among a set of alternatives A the one which maximizes their utility, human behaviour is not just that straightforward. As conscious agents, humans can reason about their decisions and can consequently affect them by deliberately restricting their alternatives or by forcing themselves to choose a particular alternative. This can be thought as «rational management of one’s own perceived irrationality» (Nehring 2006). The problem with the real nature of human choice arises in the way that rational choice theory models agents’ preferences. Let A be a set of alternatives and a, b, c denote some of them. A preference relation is a binary relation with the following properties:

  1. a b (Reflexivity)
  2. a b b a (Completeness)
  3. iii. a b b c = a c (Transitivity)

Consider a smoker who has two alternatives: s which stands for smoking and n which stands for no smoking. The preferences of this smoker are obviously given by s n. However, as this smoker may be completely conscious of how damage can smoke cause to himself, he may prefer to reduce his set of alternatives in order to do not smoke, that is:

{n} {s,n} {s}

Alternatively, one can say that he prefer not to prefer smoking, this is:

(n s) (s n)

Note that this contradicts completely our assumptions about the preference relations, although one can completely imagine this situation happening in reality. When preferences are given among preferences we are talking about second order preferences. Different approaches have been taken in order to model second order preferences that are consistent with neoclassical formulation, such as the one given in (Nehring 2006) for preferences over subsets. However, hierarchy of preferences don’t end there. One can actually think of more complicated situations in which n−order preferences may arrive. Continuing with the smoker example, imagine a situation in which this smoker prefer not to prefer smoking but he actually prefer smoking over this, in some sort of unconcern about potential lung damage. Although this may seem counterintuitive, it is actually part of the nature of addictive consumption, and issues of this type arise more than often in economic analysis (say, for example, altruistic behaviour).

Some economists may argue that one can start including a bunch of terms in utility functions as some sort of externalities in order to «rationalize» this issues: adding a disutility for damage associated with smoking, for example. However this may lead to solutions that do not account for the real structure behind this kind of reflexivities and that shed no light in the real incentives that a policy for reducing cigarette consumption should create. What kind of behaviour may and agent have, based on their n−order preferences? A first remark to be made is that, just as Mertens derived a universal belief space which accounts for the complete hierarchy of beliefs in a simpler way (see Section 2.2), one should seek for some sort of universal preference space which is isomorphic to the actual hierarchy of preferences. I proposed here an approach based on category theory, focusing on preferences over preference systems and not over subsets of the set of alternatives.

Consider a category Pref(A) which has as objects all possible preference relations among alternatives in A and as morphisms any mappings that preserve order. We will let this preference relations to be incomplete, this is, two alternatives a, b may be incomparable. Note that such a situation may also happen in real world scenarios. This way, preference relations can be seen as partial orders over the set of alternatives A. Thus one can let the objects of the category to be partially ordered spaces and morphisms to be dimaps. Let C be a «choice» functor which assigns to each object A in Pref(A) a new object in the same category B and some new dimap. One can think of this (endo)functor as a second order preference among preference relations. Subsequently applying this functor will mimic the logic of n−order preferences. By Lambek’s lemma if this category has a colimit, then this colimit is a fixed point of the functor, and is actually isomorphic to the complete hierarchy of beliefs.

Note that we have just mentioned the way one should think of this construction, but formalizing it is obviously beyond the scope of this paper. One important remark is that pospaces are also Haussdorf spaces, thus a similar construction as the one given in Section 2.2 for universal belief spaces may work. Also, we have not take into account more complicated situations. An example where things get more complicated with preferences over preferences is in the case that one let them coevolve with their environment over time. I will discuss this case in Section 2.3. For a more detailed philosophical discussion of the concept of person as preferences over preferences see (Frankfurt 1971).

2.2 Beliefs of beliefs

One of the most common examples of reflexive structures in economics is the hierarchy of beliefs studied by Mertens, as part of Harsanyi’s proposal for incomplete information game modelling and by Keynes with his beauty contest. This structure is not just of importance in game theory, but also in rational expectations formulation, where one can think of expectations as being beliefs of beliefs (Winschel, s.f). For example, think of Keynes’ beauty contest, where there are three juries and two contestants. Each jury wants to vote for the winner of the contest, nevertheless it is the most beautiful or not. The problem arises when we question who would be the winner and how to reason about it. Juries may start by generating some belief over each other vote. But, a jury can also generate a belief over the beliefs of the other juries and so on. This is the classical example of «I, Jury 1, think that Jury 2 thinks that I think that he will vote for Contestant 1». Thus, just as hierarchies of preferences arise naturally in human way of reasoning and making decisions, hierarchies of beliefs do as well. The usual formalization of beliefs in economic theory, is done by assigning some probability measure to the space of alternative states S. This probability measure is supposed to contain all the information that may arise from the hierarchy of beliefs. Although the structure of the hierarchy is not explicitly described, some authors have shown that this «universal» belief space exists, no matter the topology of the state space S (Heifetz and Samet, 1998). Hierarchy of beliefs has been extensively studied, not just in means of probability theory, but as well in categoric terms. In this case, I’ll go a little deeper in order to explain the categoric construction of the hierarchy of beliefs and the idea of the universal space of beliefs.

Moss and Viglizzio (2004) formalize the idea of (Harsanyi) type spaces as coalgebras over some endofunctor F: MeasI −→ MeasI, where the category MeasI is constructed by taking the category Meas of (Hauss- dorf) measurable spaces and the (discrete) set of players I. These measurable spaces capture the (implicit) uncertainty of beliefs. The logic of the endofunctor is that it is contructed in a way that «assigns» beliefs to beliefs. The authors then prove that there exists a final coalgebra for this (endo)functor that corresponds to the universal belief space. One can think of this as applying iteratively the functor until one reach some (fixed) point X such that F(X) X, this is, X is isomorphic to its own system of beliefs, and thus captures all the information of the hierarchy of beliefs. The authors claim that this construction may be useful in the formalization and study of similar structures. Note that this is in the same line as what I propose in Section 2.1, just reformulated in coalgebraic terms.

Just as in Section 2.1 I made the assertion that the proposed approach does not take into account many other real world issues of preferences modelling, this construction given by (Moss and Viglizzio 2004) does not take into account issues such as when an agent has none information on some parameter in order to generate a belief. Take, for example, and investor who has to decide to whether or not to buy a stock. The investor may want to calculate his fundamental value for the stock and compare it to the stock price, to see if it is under or overvalued. However, the stock can be an IPO (initial public offer) and thus there may not be any information in which the investor can based his beliefs. In next section, I’ll analyze category theory as a way of approaching all this issues in preference and belief modelling and introduce concepts such as coinduction, bounded rationality and self-fulfilment.

2.3 Rationality and reflexivity

Rationality has been one of economics’ key concepts since the development of game theory and rational expectations. Economic agents are assumed to be rational, that is, they have transitive and complete preferences; they choose any feasible alternative which maximizes their utility, they form consistent and correct beliefs about uncertain situations and, when deciding over time, they are prospective. However, this assumptions have led to a number of contradictions between theory and evidence. One of the most famous examples are financial bubbles. If one assumes rational agents, theory predicts that there should not be financial bubbles, no matter your are approaching it from some CAPM model or from game theory. Are our assumptions failing or are we drawing wrong conclusions from them? At a first glance, some experiments (Guadalupe et al. 2020) have suggest that preferences may be intransitive and some theoretical developments (Dalkiran et al. 2017) have demonstrate that one can model intransitive indifference under uncertainty. What these approaches have in common is that intransivity arises from changes in the environment in which the agent is taking its decisions. Let’s extend this to decisions over infinite time. A rational agent will take an optimal decision over time by recursion (backward induction does not apply). However, this process will not take into account that today’s decision may affect the environment and the way it can evolve and thus this will eventually affect agent’s optimal path. This notion is called coevolution. Not just the environment evolve as the agent take decisions, but agent’s preferences (and preferences over preferences) may coevolve with the environment. (Lescanne and Perinnel 2010) and (Lescanne 2018) have proposed a «backward coinduction» method which is corecursive and thus takes into account this coevolution. These works have shed light in financial bubbles’ rationality. The way the authors formalize this process is heavily based in category theory, and the original coinduction process has its roots in it.

At this point, the reader may have conclude that economists’ assumptions about agents behaviour may not be wrong, but is the way we draw conclusions about them what is failling. Moreover, are the mathematical tools which are not adequate to the social nature of economic analysis. In the same line, one can add uncertainty and lack of infomation to this coinduction process, in order to model a more realistic way of generating beliefs and how they are updated when the evolution of the environment shed light on some parameters. This is of particular importance because most agents that are not well modelled, can be thought as infinitely living agents (investment funds, institutions, society as an all) playing some sort of (uncertain) game and coevolving with their environment. When an agent lacks information about important parameters that help to generate beliefs, we say it has bounded rationality. Hommes (2013) analyzes how Soros’ idea of reflexivity actually implies that agents are not rational but actually exhibit more like a bounded rationality and adapt to the evolution of the environment and what they learn from it. He then proceeds to describe what he called «almost self-fulfilment equilibria» which is a solution concept for games which self-fulfils based on expectations (beliefs of beliefs) generated by this bounded rationality.

One important step in economics will be to include backward coinduction, together with adapting bounded rationality, in multi-agent interaction models. As we saw, hierarchies of beliefs and backward coinduction can be modelled in means of category theory and thus one can imagine a complete categoric framework for modelling agents exhibiting these characteristics. What remains, is to formalize game theory in categorical terms. Several approaches have been taken, but one of them will be analyzed in Section 3.1 as part of computational economics.

3 Computational Economics

Computational economics is an area of research which attempts to use computational modelling in order to approach economic issues such as general equilibrium models with no analytical solutions, or emergent macro phenomena from micro behaviour. Traditionally, tools such as object-oriented programming have been used to model these systems, mainly when working with agent-based computational economics. However, this programming tools does not account for some properties inherent from economic and agent systems. Just as computational statistics is better done when using a domain-specific language, one would want to design a domain-specific programming language for computational economics modelling. This language should admit almost any economic concept representation. In this paper, I will focus on what can be a programming language for agent-based computational economics.

Before going into details, it is important to remark that programming language theory has been heavily influenced by categorical tools such as coalgebras. Functional languages such as Haskel admit a complete representation in terms of categories. This is what motivates the use of category theory in designing an economic language. One potential advance in this matter, is (Blumensath and Winschel 2013) formalization of game theory using coalgebras over the category of sets. The authors themselves claim that their approach can give hints in thve design of such a language for agent-based computational economics. Moreover, they claim that this approach can reconcile behaviorual economics, computational economics, econometrics and neoclassical economics; and even explain the emergence of macro phenomena from individual behaviour, given the compositionality of their framework.

3.1 Coalgebraic Game Theory

(Blumensath and Winschel 2013) model games as coalgebras over the category of sets. The authors first define the notion of process. Let:

A process π becomes a coalgebra for some functor Π0 named the process functor given by: Π0(S) = C(R + S × O)

After demonstraiting some (useful) properties of them, the authors proceed to generalize the notion of processes. A game γ is a Γ−coalgebra for some functor Γ of the form

Γ(S)=C(R+S×O)∏ pN Ap

Where N is set of players and the input I is given by the product of the actions of every player in a given moment. Blumensath and Winschel then go deeper on how strategies, game trees and equilibria may be formalized in their framework. Note that this formalization, although incomplete in some of the things I have mentioned over this paper, is a good starting point for the development of a categorical economic theory of (realistic) agent behaviour. As the authors assert, their framework can be used both in finite and infinite games. Thus, one can think of combining this framework with coinduction and adaptive bounded rationality, in order to give a better description of economic behaviour.

One of the most important features of this formulation is that it gives a description of the types that a economic programming language may exhibit and how a economic interpreter should be constructed. Moreover, it is an important step in the reconciliation of neoclassical and computational economics. In this line, Blumensath and Winschel formulation seems to resemble the structure of a (functional) programming language, such as Haskel, in categoric terms. This is important because it provides a basis in which one should build a complete interpreter which accounts for modelling economic phenomena, such as equilibria, in a pure type way. The authors even claim that their formulation, reflexive and compositional in its nature, may provide an important research area in econometrics and macroeconomics, giving hints in the solution of some important issues that arise in these fields. For a more detailed discussion on this topic see (Blumensath and Winschel 2013).

4 Conclusion

In this paper, I have proposed a specific path which may be followed if one seeks to solve some economic problems using category theory. Further developments may be made, in order to formalize some of these concepts and include them in a complete formulation of agent behaviour. These developments are obviously beyond the scope of this paper. Categorical economic theory seems to open a bunch of research opportunities in the discipline, although it has not gained the recognition it should.

References

Abramsky, Samson and Winschel, Viktor. 2012. «Coalgebraic analysis of subgame-perfect equilibria in infinite games without discounting». Arxiv. https://doi.org/10.48550/arXiv.1210.4537

Abramsky, Samson and Zvesper, John. 2012. «From Lawvere to Brandenburger-Keisler: Interactive Forms of Diagonalization and Self-reference». In: CMCS, n. 7399 Lecture Notes in Computer Science, edited by Pattinson and Schröder, pages 1–19.

Blumensath, Achim and Winschel, Viktor. 2013. «A Compositional Coalgebraic Semantics of Strategic Games». Arxiv. https://doi.org/10.48550/arXiv.1712.08381

Crespo, Ricardo and Tohmé, Fernando. 2016. The Future of Mathematics in Economics: A Philosophically Grounded Proposal. Heidelberg and Berlin: Springer.

Dalkıran, Nuh Aygun, Dokumacı, Emin, & Kara, Tolga. 2018. «Expected Scott–Suppes Utility Representation». Journal of Mathematical Psychology 86: 30–40.

Debreu, Gérard. 1959. Theory of Value. An Axiomatic Analysis Of Economic Equilibrium. New Haven and London: Yale University Press.

Debreu, Gérard. 1991. «The mathematization of economic theory». American Economic Review 81: 1–7.

Frankfurt, Harry. 1971. «Freedom of the Will and the Concept of a Person». The Journal of Philosophy 68, No. 1: 5-20.

Guadalupe-Lanas, Jorge, Cruz-Cárdenas, Jorge, Artola-Jarrín, Verónica and Palacio-Fierro, Andrés. 2020. «Empirical evidence for intransitivity in consumer preferences». PMID: 32154417 PMCID: PMC7058914 DOI: 10.1016/j.heliyon.2020.e03459 Free PMC article.

Harsanyi, John. 1967. «Games with incomplete information played by ‘Bayesian’ players, i-III. part I. The basic model». Management Science 14, No. 3:159–182.

Harsanyi, John. 1968. «Games with incomplete information played by ‘Bayesian’ players, i-III. part II. Bayesian equilibrium points». Management Science 14, No. 5: 320–334.

Harsanyi, John. 1968. «Games with incomplete information played by ‘Bayesian’ players, i-III. part III. The basic probability distribution of the game». Management Science 14, No. 7: 486–502.

Heifetz, Aviad and Samet, Dov. 1998. «Topology-free typology of beliefs». Journal of Economic Theory 82, No. 2: 324–341.

Hommes, Cars. 2013. «Reflexivity, Expectations Feedback and Almost Self-fulfilling Equilibria». Economic Theory, Empirical Evidence and Laboratory Experiments, No 13-19, CeNDEF Working Papers from Universiteit van Amsterdam, Center for Nonlinear Dynamics in Economics and Finance.

Lawvere, William. 1969. «Diagonal arguments and cartesian closed categories». In: Category Theory, Homology Theory and their Applications II, volume 92. Berlin, Heidelberg: Springer.

Lescanne, Pierre. 2018. «Dependent Types for Extensive Games». Journal of formalized reasoning 11, No. 1. DOI: https://doi.org/10.6092/issn.1972-5787/7517.

Lescanne, Pierre and Perrinel, Matthieu. 2012. «‘Backward’ coinduction, nash equilibrium and the rationality of escalation». Acta Informatica 49. No. 3: 117–137.

Mac Lane, Saunders. 1998. Categories for the Working Mathematician. Berlin: Springer.

Mertens, Jean-Francois and Zamir, Shmuel. 1985. «Formulation of bayesian analysis for games with incomplete information». International Journal of Game Theory 14, No. 1: 1–29.

Moss, Lawrence and Viglizzo, Ignacio. 2004. «Harsanyi type spaces and final coalgebras constructed from satisfied theories». Electronic Notes in Theoretical Computer Science 106: 279–295.

Moss, Lawrence and Viglizzo, Ignacio. 2006. «Final coalgebras for functors on measurable spaces». Information and Computation 204, No. 4: 610–636.

Nehring, Klaus. 2006. «Decision-Making in the Context of Imprecise Probabilistic Beliefs». Economics Working Papers from Institute for Advanced Study, School of Social Sciences. No. 34.

Vassilakis, Spyros. 2002. «Rules for changing the rules». In: Game Theory and Information from University Library of Munich, Germany (repository).

Von Neumann, John, & Morgenstern, Oskar. 2007. Theory of games and economic behavior (commemorative edition). Princeton: Princeton University Press.

Jose Andrés Ortega Barrantes (jose.ortegabarrantes@ucr.ac.cr) Es licenciado de la Escuela de Economía de la Universidad de Costa Rica.

Recibido: 29 de septiembre, 2023.

Aprobado: 6 de octubre, 2023.