Causal Bandits Podcast

Causal Inference & Financial Modeling with Alexander Denev Ep 14 | CausalBanditsPodcast.com

April 15, 2024 Alex Molak Season 1 Episode 14
Causal Inference & Financial Modeling with Alexander Denev Ep 14 | CausalBanditsPodcast.com
Causal Bandits Podcast
More Info
Causal Bandits Podcast
Causal Inference & Financial Modeling with Alexander Denev Ep 14 | CausalBanditsPodcast.com
Apr 15, 2024 Season 1 Episode 14
Alex Molak

Send us a Text Message.

Video version available here

Are markets efficient, and if not, can causal models help us leverage the inefficiencies?

Do we really need to understand what we're modeling?

What's the role of symmetry in modeling financial markets?

What are the main challenges in applying causal models in finance?

Ready to dive in?


About The Guest
Alexander Denev is the CEO of Turnleaf Analytics. He's an author of multiple books on financial modeling and a former Head of AI (Financial Services) at Deloitte. He lectures at the University of Oxford and has worked for organizations like IHS Markit, The Royal Bank of Scotland (RBS), and the European Investment Bank. He has over 20 years of experience in finance, data science, and modeling. His first book about causal models was published well ahead of its time.

Connect with Alexander:
- Alexander on LinkedIn
- Alexander's web page

About The Host
Aleksander (Alex) Molak is an independent machine learning researcher, educator, entrepreneur and a best-selling author in the area of causality.

Connect with Alex:
- Alex on the Internet

Full list of links can be found here.

#machinelearning #causalai #causalinference #causality #finance #CauslBanditsPodcast

Should we build the Causal Experts Network?

Share your thoughts in the survey

Support the Show.

Causal Bandits Podcast
Causal AI || Causal Machine Learning || Causal Inference & Discovery
Web: https://causalbanditspodcast.com

Connect on LinkedIn: https://www.linkedin.com/in/aleksandermolak/
Join Causal Python Weekly: https://causalpython.io
The Causal Book: https://amzn.to/3QhsRz4

Show Notes Transcript

Send us a Text Message.

Video version available here

Are markets efficient, and if not, can causal models help us leverage the inefficiencies?

Do we really need to understand what we're modeling?

What's the role of symmetry in modeling financial markets?

What are the main challenges in applying causal models in finance?

Ready to dive in?


About The Guest
Alexander Denev is the CEO of Turnleaf Analytics. He's an author of multiple books on financial modeling and a former Head of AI (Financial Services) at Deloitte. He lectures at the University of Oxford and has worked for organizations like IHS Markit, The Royal Bank of Scotland (RBS), and the European Investment Bank. He has over 20 years of experience in finance, data science, and modeling. His first book about causal models was published well ahead of its time.

Connect with Alexander:
- Alexander on LinkedIn
- Alexander's web page

About The Host
Aleksander (Alex) Molak is an independent machine learning researcher, educator, entrepreneur and a best-selling author in the area of causality.

Connect with Alex:
- Alex on the Internet

Full list of links can be found here.

#machinelearning #causalai #causalinference #causality #finance #CauslBanditsPodcast

Should we build the Causal Experts Network?

Share your thoughts in the survey

Support the Show.

Causal Bandits Podcast
Causal AI || Causal Machine Learning || Causal Inference & Discovery
Web: https://causalbanditspodcast.com

Connect on LinkedIn: https://www.linkedin.com/in/aleksandermolak/
Join Causal Python Weekly: https://causalpython.io
The Causal Book: https://amzn.to/3QhsRz4

 014 - CB014 - Alexander Denev 

Alexander Denev: We had the incentive to misreport risk misreport by using historical data. Many people knew this historical data was not representative, but was aligned with their incentives at the time to take more risk and to make more money to take bigger bonuses. And next year, who cares? 

Alex: Are markets efficient. Oh, 

Marcus: hey, causal Bandit.

Welcome to the Causal Bandits Podcast, the best podcast on causality and machine learning on the internet. 

Jessie: This week we're going back to London to meet our guests. We decided to do a PhD in super. Theory, but he quits pursue a career in finance. He loves to cook and cycle an author, entrepreneur, and investor.

Ladies and gentlemen, please welcome Mr. Alexander. Lemme pass it to your host, Alex Molak

Alex: ladies and gentlemen, please welcome Mr. Alexander Denev 

Alexander Denev: Alex, nice to be here. Thank you for having me today. 

Alex: Great pleasure. Thank you for having time to, to meet you with us. It's a pleasure. It's a pleasure for me as well. How was the experience for you going from a PhD program in an advanced field like superstring theory to the world of finance?

Alexander Denev: I would say, you know, when you study physics, you learn to be practical. And of course there is a lot of maths, a lot of statistics, there is a lot of experimentation in the laboratory. So you learn to look for connections between maths and the real world. So this is the definition of physics. At least my opinion, and not just my opinion, but you know, super string theory went way too far away from that kind of direction.

We can't say that super string theory is something experimental. So according to Mitlis, it kind of betrayed the spirit of physics, but You know, I've been raised with this spirit that, you know, the physical laws, uh, you can experiment, you can implement them, you can build engineering applications around those and somehow superstring theory pushed the boundaries way too far.

And it took me more than one year to really realize, you know, after working on pure proven abstract mathematical concept that, you know, I needed to return to something that, you know, I can see, I can feel, I can understand, I can relate to. And I seen in the real world. So I had my baggage of mathematics and statistics.

And at the time, you know, there was a big wave of people like me going to finance. And, uh, it was a pure chance of speaking to, to one of my friends. And he said, well, why don't you come to help us? He was running this financial microcredit company and, you know. I was amazed to hear that something that's like finance, that I had considered to be quite boring and also very political, could benefit from mathematics and statistics.

I joined his startup back at the beginning of this century and I saw there is a lot of connections that could be made between physics and what was required by finance. So at the time we needed to calculate risk based on patterns and behavior. So there is all this data. We're starting to see a lot of data being archived and, you know, a lot of storage started to be available.

So we could do experimentation in analysis this data. Yes, it was a jump, but without losing all my background and preparations and years spent. to work with statistics and mathematics. So I built on that. Yes, it was a slight change of direction, but it's a direction that, besides benefiting from my previous education, was something that was growing, actually could feel.

A lot of talent was going to finance. A lot of people like me wanted to do something different with very similar motivations, but you felt the Something we couldn't feel in physics for, for a long time. Speaking about theoretical physics, if you think about the greatest breakthroughs in this really marvelous field that they happened in the 70s.

And what came after is just a follow up experimentation to prove results that had been theorized back 56 years ago. There was this kind of feeling of stagnation in the community. A lot of people leaving the academia disappointed by this stagnation, but you know, this is how things are. You cannot move the world as the speed you want, you know.

Yeah. People need to really to take a break, make breakthroughs in other fields and continue a field like physics. I was riding a wave already, so I could feel the growth and the utility of my choice, again, without losing sight of what I had done before in my university degree. 

Alex: Which mathematical tools or concepts did you find the most useful when you started your career in finance?

Alexander Denev: Finance is quite broad and use many different tools. But of course, you must have like the basic of statistics and probability, right? Stochastic processes was the baggage. people who worked in finance and so called quants. So stochastic process, stochastic differential equations, equations were amassed and they had been quite well covered in my physics programs.

And of course, when you work in laboratory in physics, you have to build some pattern recognition tools. So then the early seeds and, you know, machine learning that you have to observations, you had to make sense and decision based on those resonates also in finance. So statistical classification models or regression models, especially when it comes to building credit applications, they were a must.

So I found this really kind of natural, you know, transitioning from physics and using the same tools to apply it in finance. At the time, it, the main two when it comes to markets and derivative pricing was the big thing at the time was, uh, stochastic process, stochastic differential equations that came easy to me after my degree in physics.

Alex: Stochastic differential equations are also a fundamental concept in a new sort of framework, causal framework proposed by a team led by Bernard Shilkoff. 

Alexander Denev: Yeah. 

Alex: That generalizes. Now, in a sense, Perlian framework, you started with causality very early compared to many people who are today in the field. How all of this has started for you?

Alexander Denev: One of the things I realized, and other people before, you know, me, had realized a long time, that, you know, in experimental sciences like physics, you can have a control, uh, environment. So you can conduct an experiment by trying to insulate from all external factors, and you can repeat this experiment many times, and you can draw statistical conclusions about the robustness of the law that you're trying to prove in the laboratory.

But economics is quite Messier when it comes to this. It's not falsifiable. So you cannot like switch experiments back and back again. Sometimes you have one observations and environment is not controlled. So I cannot do in laboratory or experiment, you know, do your measurements without external influence.

There's always something going on. It's a lot of exogenous factors and you have ever change, always change in context. So you don't have fixed laboratory setting. You have a dynamic environment that changes all the time. So I was thinking at the time, you know, the concept of statistical repeatability could not really apply because you cannot fix the environment.

So already starting to realize, but you know, it's not a big revelation that I'm giving here, but it was just my journey of maturation. I really understood now what people mean by that, you know, that economic financial theories are not falsified. But it translates into the fact that you cannot have statistical repetitions many times, so you cannot infer statistically a robust conclusion.

And I did my degrees in Oxford, my secondary and master's in mathematical finance. And during that degree, we started discussing, you know, it was during the financial crisis was back in 2008. that you know something went wrong and the question what what was wrong not that was the big question and previous theories of financial measurement they relied on this concept of statistical repeatability the things are almost stationary so you can extract stable statistical patterns.

Alex: So they assume a stable data generating process without interventions in a sense. That's correct. 

Alexander Denev: That's correct. And that proved to be wrong. And you know, if you think of the most cherished measure in finance, how to measure your risk is value at risk. You construct a statistical distribution of how your portfolio moves.

You have different assets, can be equities, can be commodities, can be bonds. Having a stable distribution, you can measure different percentiles of distribution and you say, you know, the extreme one percentile, it's a risk that I cannot tolerate. So I must have enough capital to withstand this kind of events.

But this one percentile, it's derived from a distribution that's assumed to be stable. What happens if all of a sudden distribution changes shape? And we saw it happening during the financial crisis, was supposed to be like sigma event, you know, so very rare events happening once in hundreds of years.

Things like that started happening very often, so on a daily basis, and a lot of financial institutions went busted as a consequence. So something was wrong with the way we measured risk. If people knew that, you know, speaking also to practitioners without any mathematical background, they understood that we know that VAR has limitations, but this is what suits us now, you know, showing lower risk is, these are the incentives in the system.

So. We had the incentive to misreport risk, misreport by using historical data. Many people knew this historical data was not representative, but kind of was aligned with their incentive at the time to take more risk and to make more money, to take bigger bonuses. And next year, who cares? These were the incentives and there was kind of awakening that especially by regulators that something different needed to be done.

So I started thinking with my supervisor, Ricardo Rebonato at Oxford. He was at the time global head of market risk at the Royal Bank of Scotland, but he also was professor at Oxford University and having published already many, many different books and papers. So quite non figurant, you know, we, we started talking with him, what we could do differently.

And he had this idea. So They really did not originate from me that why don't we create forward looking distributions? Okay. Not like taking stable historical data generating process, but let's try to think what's going to the distribution forward in time. Okay. And how we can construct that. Of course, what is a distribution?

It, you know, we have stochastic setting that it's going to embrace how things can evolve. And you might attempt to have also measurable quantities, you know, around this distribution, what's going to be the level of your risk, okay? And the idea there was, of course, you know, historical distributions, they happened, so you know them with 100 percent accuracy.

But we're thinking, is it better to be approximately right or precisely wrong? Because if you use historical distribution, you can cut really your percent out of the distribution, you're going to be precisely wrong, because it's unlikely. Sometimes the future is going to be the repetition of the past. On the other hand, if you try to build future distributions, there is some degree of approximation subjectivity.

So you're approximately right. If there is an incentive to be approximately right rather than precisely wrong, what are the best tools out there really to make this go? So if you look at finance, there are a lot of events, you know, it's a financial economic systems, geopolitical, they're reaching events.

Some of them are not predictable, they're exogenous, can be meteorological events, for example, you know, all of a sudden they can happen, geopolitical events. And, you know, we've been living for the last two years in a largely geopolitical world. We're seeing a lot of conflicts around the world who were not predictable before, to be honest, unless you're part of some secret service, but even they was probably were misled.

So the question is how you make a model of reality like that. Of course, there are the so called black swans that you can't really predict and they happen. If a meteorite falls on earth, you know, it's very hard to predict a black swan. It happens all of a sudden, it's going to shake everything, not just the financial system.

But there are other events that we call graceful ones that you know that they're going to happen. You know, this can be political elections, for example, can be like the referendum. We live in an information rich world. There are already a lot of early warning indicators of what might happen, apart from this pencil to read in the calendar.

Events like elections, you can really, thanks to machine learning, sweep through the world and understand if there are early warning indicators of something happening. But once you have clarity that something might happen, so what do you do? Okay? So there'll be elections in the US, for example, next year.

Okay? So it's very difficult to predict elections, especially in the United States, because the electoral system is very sensitive to variations. You already know that it's going to be one of the two. You can assign the probability to this. You can use numerous polls and simulations. So you have kind of information.

You can also use information from the market. So the question is, let's reason in terms of causality. So this is, where causality comes into the play. We know that even in finance, certain relationships are not symmetric. So if you want to measure your risk with value at risk measures, so you need the correlation matrix.

So you assume that things are associated. But I can give some examples of why things are not necessarily associated in finance. So if there is, let's say, crush of the S& P 500, implied volatilities will spike up. Okay. But if implied volatilities has spiked up, not necessarily there has been a crush. in financial markets.

This spike in implied volatilities might have been caused by somebody else. So you already see that we're reasoning in the direction of mechanisms, okay? We know that water causes mud, but mud does not cause water. So you have, in nature, you have asymmetric relationship, but also in financial markets and also in geopolitics.

Things unfold. There is an event which can be the cause and there's some consequences. So if we speak about this example of political elections, you know, we can assign a probability based on quantitative measures like poll. Suppose it's not perfect, you know, sometimes posters they get it wrong, but we can assign some already or some have a gut feeling it, you know, not feeling but substantiated with this submission.

What are going to be the events and what is going to be the impact, let's say, you know, for your bond portfolio or stock portfolio in case one of the candidates wins. Okay. And they have their different agendas. One of them can promise tax cuts. The other can promise more aid for Ukraine. So more weight already on the federal budget.

So they're already giving us signals of what they might do. Okay, so in the case they get elected, what are going to be the consequences? And according to this consequence, you can ramify, and you can think of consequences of consequences. But when you do that, you're using probabilistic terms. You never say this is going to happen.

It's not a kind of 100 percent probable chain of events. So we're not in the interpretation of David Hume, you know, of causality, necessary conjunction. We are more in the probabilistic setting of Judea and Paul. 

Alex: So what you're saying is that we have some structural information regarding the directional influence of the events, but the influence is probabilistic.

So there are some probabilistic functions. They are not necessarily deterministic relationships between different nodes in the network, so to say. That's correct. 

Alexander Denev: That's correct. You have enough information to assign this probability, 

Alex: okay? And why do we talk in the terms of probability? Because we don't have a rich enough description of the system?

And probability captures our uncertainty about certain details of the system? Is that the reason? 

Alexander Denev: That's the reason essentially. Background causes that you cannot model. For example, barometric rain. According to the pressure, you can make an estimate, you know, whether it's going to rain. But it's not like 100 percent prediction, you know.

You can predict the weather a few hours before with great accuracy. But, you know, it's not 100 percent because there are other external causes there. So they determine this level of uncertainty that certain events can cause other events to happen. Hmm, hmm. But not with 100% certainty. So yes, it's, let's say the level of uncertainty in the system.

Also, economists that the reason already, in terms of probabilities and uncertainty, there are very few bold economies who reason like straight is going to happen 100%. So there already reason in terms of scenarios and in competing narratives this could happen. But 50 50 is going to be other thing is going to happen.

So the question is how to encode already this existing thinking. into a mathematical framework where we reason in terms of cause and effects rather than associations. And you've been in this field for a long time, so these tools, causal networks or Bayesian networks, they have some nice properties. Since we speak about probability and speak about conditional probabilities, this event will happen, we generate a certain probability, this other event, and so on.

There's this nice object called joint probability that you can derive from this Bayesian network. And essentially, once you have this joint probability that's now forward looking, because you made consistent mathematically certain events with their probabilities, you can do whatever you want. You can calculate the percentiles of this distribution, so you can have a forward looking valid risk.

If you think correlations are what mess up things in finance, you know, correlations between stock and bonds, usually the conventional wisdom is that they hedge each other well in times of crisis, but very much depends on the crisis. Sometime during 2007, 2008, you know, all the assets Went down together.

So this had never been observed, uh, stock and bonds. And now in terms of high inflation, neither stocks or bonds are good for, for your portfolio, uh, in the short term, they all get, get hits up. They're not a natural hedge. So if you want to hedge your stock portfolio, I would advise you to buy bonds maybe for the next few months.

But. then depends on many other factors. And so every crisis is different. So having backwards historical distribution doesn't make sense. So how to be forward looking and causal and derive a future joint probability, you know, that you can use and you can query. And this is one of the statements of John Maynard Keynes that I really like.

The world is uncertain, but we as humans cannot do without attaching probabilities. And even they're not exact. Having an imprecise figure is better than having no idea of what's going on. John 

Alex: Maynard Keynes also said famously, that when the facts change, I change my mind. How about you? When we build machine learning black box, machine learning systems, associative systems, and those systems fail.

It might be very difficult for us to learn something about what we've done wrong because the entire structure is modeled in a sense that is hidden from us in a way that is hidden from us. With causal models, we need to make hypothesis and you said we might be approximately right, right? Because our structure, the structure that we propose for a given problem.

It's our hypothesis about how the world works. So there is a risk in explicitly defining our hypothesis because we might be wrong. But there's also a benefit because if something goes wrong, we were explicit about our hypothesis and so we can correct it explicitly as well. 

Alexander Denev: That's true. So one of the advantages is transparency, 

Alex: auditability.

Alexander Denev: Language of communication. So with graphical models, causal models, the structure can become more transparent. So you see what causes what. And this also fosters discussion. It's not some quantum calibrated machine learning model in a lab. You know, you can expose your model even to the senior management.

They can understand your thinking. They can have other input that, you know, you can create very strong in group. Yeah. Being able to understand this, this kind of model is key. And. Even if something else happens, not exactly what you hypothesize, but the fact that you had a discussion, so you had a social model, that's a social model.

So this makes you prepared. So as I like citation, another great general Eisenhower said, all plans in battles in battle tend to be useless, but preparation will prove to be indispensable. Okay. All plans are useless in battle, but the fact that you prepared. With different scenarios and plans that's indispensable for you to do.

So having this communication internally in an institution, it's very important to foster a healthy discussion. All these things I'm, I'm saying, and I've been working on them for a long time and publish or read two, two books on the subject, you know, mine sound obvious, you know, you present something transparent, forward looking, causal, and so on, something causal that Can be populated with a lot of information because we now we live in information aid.

You have information from everywhere. You have minutes from board meetings. You have satellite images. You have new scrape data. So you have information to build to the best extent possible causal models. But this object, to my regret, actually have failed to take over in finance and in economics. And it has been quite disappointing, but there are reasons for which this actually happens.

Alex: What is your diagnosis? What do you think are the main reasons why financial institutions and people in finance did not? Thank you. Yeah. Start using them more extensively. 

Alexander Denev: Again, as I said before, in finance and economic and people who work within those fields, they have incentives. Okay. And they act according to their incentives.

So think about, you know, how, let's say, stress testing is done in practice. So it's a regulatory requirement of the financial crisis you have by annual, depending on geography stress testing, where you have to perform a resilience test on your organization. I know this model, you know, it can play different scenarios, test your portfolio on, according to these four world looking scenarios.

But there are many factors that are dragging this back, this kind of approach. One is. You know, if you look at econometrics that still dominates, of course, economics, you know, it's, it's, it's a very respectable, uh, science, a lot of progress in the 50s, 60s, 70s, a lot of useful concepts. But again, you rely on historical data there, and, you know, the people, uh, who have worked for so many years are in that field are reluctant to change their mind to something new.

There is always resistance when you try to do something new. Of course, there is. It's the old school that it's trying not to, to, to make you change anything for they're doing in a lot of Nobel prizes have been given, you know, to be dissipated like that, you know, with saying that, you know, you have to change your point of view.

Second is a resistance within institutions to do these things. And you know, they invested in methodologies and training and software systems that do the things old way. So why change, which requires an investment? The stimulus to change would be if regulators ask them to change. But also, in the wake of a financial crisis, you know, regulators try to do something quick and dirty with banks, you know?

We do stress tests. We provide you with the scenarios, which Sometimes they're not even coherent. They're sometimes contradictory, you know, high level macro economic string of numbers, GDP fall, unemployment, all these things that they don't have any context or narrative explaining, but they just give you a string of numbers, put them in your econometric models.

You know, what is the outcome, but it's not very forward looking. You're, you're kind of replaying history. And, uh, one of the requirements you should use stress scenarios. Uh, and, uh, some of them are past stress scenarios. So replay the great financial crisis on your portfolios and look for the association with your assets, but the great financial crisis is not going to happen, at least in the same form.

The world has changed since then. So you cannot use data from that period. So. A lot of incentives being misaligned and when all these frameworks, you know, backward looking frameworks being implemented, we were already out of the financial crisis 2014 to 2015. So there was no incentive, you know, to really to innovate, to change, to change that time, unfortunately.

And, uh, we've seen, you know, banks continue to default and, you know, not to the same extent as in great financial, uh, crisis, but with Silicon Valley Bank and the bank, and not only banks also. called corporate. So having forward looking stress test is really necessary, but it hasn't happened, at least in the way I wish that 

Alex: to happen.

In economics, maybe particularly in macroeconomics, it might be challenging to actually decide about causal direction between certain nodes. This is an artifact of, I think, the scale. that we are looking at events at, right? So maybe we have quarterly measure, measurements of, of, of certain variables. What are your thoughts on this?

And do you think that even having those variables, those difficult variables, where we cannot meaningfully decide on the, on the causal direction, Can we still apply causal modeling to systems with such variables? Maybe model those as 

Alexander Denev: correlational 

Alex: relationships and other relationships that are clearer at a given time scale as causal relationships.

Can this be still beneficial? 

Alexander Denev: Just to make it clear to my previous point about the scenarios, having some kind of sensitivity to macroeconomic variables of your portfolio, your institution, it's useful. But as I said, sometimes it's difficult to speak about causality. And if you think what caused the great financial crisis was not fall of GDP or anything like that.

employment, it, it was mismanagement, it was leverage, a lot of other variables that are not macroeconomic in nature, interconnectedness between institutions, uh, the, the huge derivatives book that, that were mispriced, you know, that this is not macro scenario. So you shouldn't always reason when it comes to stress testing in terms of macroeconomic variables, which are just aggregates.

Usually, you know, this macroeconomic variables lag. What, what happens? Because, you know, the GDP, of course it felt during the great financial crisis, but it followed all unwinding of exposures of the banks and defaults and so on. So it's on the GDP for caused or institution to default. But you know, this huge leverage and the default of Fleeman brothers and other banks that caused, you know, the whole mess in the economy and the GDP four and employment went up.

So, but in general, if we speak strictly about the, the macroeconomic domain, how we can input. causality in the macroeconomic, it's more difficult because as you said, you deal with, with, uh, aggregates and the timescale is, you know, it's very low frequency and somehow you can have feedback loops between economic variables for one variable causing the other, the other in its turn causes the first two to go in certain.

So they feed on each other. So it's. It's difficult to find pure established relationships between macroeconomic aggregates. You know, they're very few and they don't work across all times, across all geographies. But one of the clear links and causal links is the relationship between oil prices and inflation.

Of course, if oil prices spike, this will cause repricing of the assets because everything depends on oil. If regulators or central banks, the race interest rates, we expect an inflation to to go, to go down, of course. So there is a clear causal relationship. But again, not for all economists, certain banks in certain countries are very bad at managing inflation.

So there is no causal relation between rates and inflation. They're trying sometimes their best, but sometimes there is reverse causality. When inflation goes up, they raise rates. Inflation goes down, they lower rates. So they kind of following inflation rather than lean money. And 

Alex: this is also a very zoomed out picture, right?

Like a macro picture. Yes. But we cannot understand the intricacies of decision making on like institutional or individual level. So we lose a little. A lot of detail zooming out, that's 

Alexander Denev: true. So we, we, we dilute the micro causality, which we are not able, I'm able to measure in something that we aggregate, uh, less frequent and you can better describe it through associations.

Sometimes you have to relinquish causality, you know, causality when you consider exogenous events, you know, it can be. flood, weather condition, election, war, and so on. So it can inject information externally, exogenous, but when it comes to measuring the equilibrium between relationship between macroeconomic variables, sometimes association can be more useful.

And you have sometimes reverse bidirectional. So it's, you have other models. I spoke in my second book on probabilistic graphical models that, you know, sometimes it's better to have a hybrid picture. Yes, having causality where it's possible, leaving associational measures where you can't have this clear causal view and the hybrid model.

Also, if you want to model things purely associationally, you have the so called Markov networks, Markov random fields, and directed graphical models are all synonyms of the same thing, but they're very useful. They've been used in physics extensively to model crystals, but when it comes to economic and finance, you can model association relation between a network of agents and network institutions.

So again, a graphical model, like Cosmos, like Bayesian networks, they have Very nice properties. And you know, you're aiming to derive a joint probability distribution, okay, by accounting on about the different, you know, our relationship in the network, because you can have screening properties. So you derive the joint problem.

In the same way, in a causal model, you have cause and effect that screen each other. You know, if you think about chain events, you know, you have screening properties, also in undirected graphical models, you have spatial screening between different objects, like we've seen in a lattice in physics, you know, if different institutions are connected to that relationship, they're not one institution is not connected to all the others, you know, have intermediates, you know, so you see a network that you have nice screening properties.

Alex: So you can talk about some types of separation as we have this separation. Yeah. Yeah. And causality in spatial separation. That's correct. 

Alexander Denev: And you have in the end of the hybrid model, which can contain directed relationships. So we can Can think in terms of causality, but also in terms of spatial separation, so it can mix the two concepts, you know, temporal causality, but also spatial separation.

And these are called chain graphs and chain graphs have not been explored extensively. There are some examples and successes in genetics to my knowledge. I put in the book some examples of that, but imagine that you have this big network of nodes, institutions connected. So you want to perturb the network.

So you want to, you know, you have some intervention. So how is it going to propagate? across the rest of the network. So this is where these hybrid networks, they can help you. So modeling interventions, causal interventions into big interconnected systems. But again, applications have, have been very few, you know, so when I published My book back in 2015, almost 10 years ago, it was, uh, still very early days.

And, you know, I collected a lot of research that other people also had done there, but, and try to give a coherent picture at that point in time, how we could use those, those objects. Now things have, you know, thank God I see things evolving and causal AI reasoning in terms of. Graphically, you have graphical networks.

It's coming back to the fall, something that I see quite with pleasure that that's going on. But again, there's, it's a lot for work to be done in that space. 

Alex: Finance is not only macroeconomics in one of the books that I'm reading recently. A, a one that you recommended to me, we have it here actually about Jim Simmons.

I think it's fair to say that he's one of the most successful investors in history. We can read about him applying, maybe we should even say pioneering the application of mathematical methods to the field of investing. And so in the book, we can see that his hedge funds Renaissance and A couple of other financial endeavors that, that he was engaged, engaged in before renaissance were pretty successful using what we could say, associational correlational models.

But each of those successes was also a failure later on. at some stage. So those models brought him a lot of money, but also a lot of losses. Investment in itself is a decision making problem. So we would want to understand what will be, what will be the outcome if we, if we will do something, we are not only interested in predicting something, but rather predicting an outcome and maybe comparing it to.

to another potential potential outcome. Do you find the usage of graphical models and causal models in particular useful in the case of building investment strategies? 

Alexander Denev: Yeah, definitely. Still there is a lot to be explored here. As we discussed previously, once you are confident about the causal relationship, for example, you build a scenario.

And once you have built a joint probability distribution, so that the forward looking vape generating process, you can do whatever you want. So if you think of the Markovits investment thesis and how, you know, minimizes risk by maximizing returns by building efficient frontiers of different outcomes, you know, it's based on historical distribution.

But the concept behind it states It's about diversification. Okay. And once you have the variance of your assets and the correlation, you can maximize returns for, for given level of risks. So that stays, you know, that the main building block of the modern investment world, but things can be improved, but by instead of using the historical distribution, historical correlation in variances, variances.

you use the forward looking distribution based on causality. So you can derive the forward looking correlation matrix, but which is not purely association. Association is derived from causal consideration. And once you have that, you can plug it in your optimization engine. And for different level of a frisk build, you're the maximizing the maximum possible returns.

Okay. So in this sense, you're again, you're dealing with a concept of efficient frontier. So you can build forward looking causal efficient frontier. So definitely this can change the world of investing provided that you're able to make use of this approach, you know, all the framework behind building these different scenarios.

And now this is one thing when doing scenario based investment, it's a big thing. You know, you want to, to know what or how you want to invest your money in case one of the candidates in the U. S. wins. The other approach could be not event driven, but you want to build, let's see, your causal model of the economy.

Okay, which means that, you know, you have to predict different macro financial variables, okay, and make an investment decision based based on those, you know, how much rates are going to raise how much unemployment is going to move and so on. But this boils down back to the problems that we mentioned, if you want to build a purely macroeconomic and financial model of reality, you encounter problems like the lack of capital.

Direction, for example, sometimes the fact that these are aggregated measures, so you cannot have a clear view on causality. So from that point of view, if you try to build a structural causal model of the economy, it's still a research problem, a big research problem. Unlike, you know, exogenous shocks like scenarios unfolding and different consequences coming from that primary cause, the root node of the scenario.

So yeah, these are two different approaches. If you're a macro event driven investor, of course, you should play with these scenarios, build your forward looking efficient frontier. So if you want to do a lot of statistical trading, high frequency trading, yeah, it's better. Of course, if you build your causal model, but you encountered the problems that I mentioned before, it's a holy grail essentially to build a fully causal structure model of the economy.

that's dynamic and up to date and it's adaptive. This is the biggest challenge as of today in causality, uh, in general. Whilst in stable environments, you can be confident that you can infer a causal model from the data, and there are a lot of automatic training algorithms, PC, MPC, and so on, and you can be confident that since you're modeling a stable distribution, you can infer these causal mechanisms in quite a stable way.

In macroeconomics, it's a very dynamic system with lots of feedback loops, data generating process that, you know, is continuously changing in time. So having that approach, it's more difficult. And so, you know, we think now calls are coming to the fore and that. Um, you know, almost in every conference just offers on AI, there is still work to be done.

Okay. And especially one, when it comes to economics and finance, I like more stable environment, which have their challenges. I think about genetics and you have so many gene expressions and so, so many unobserved things. factors, you know, you have this, but luckily that the distribution is stable. Unlike in economics, sometimes you don't have to deal with this big amount of data.

You know, sometimes everything boils down to a few factors, but inferring them in a dynamic environment, that's a tricky bit. It's, it's, I think we'll see some nice developments in the next decade on that front. 

Alex: It sounds to me that The dynamic structure is, is, is one challenge here. But another challenge is also the measurement.

What actually we are able to, to measure and with what frequency. So in this sense, it's also a data problem. 

Alexander Denev: It's also a data problem. A lot of variables that been latent, you know, now can be measured, you know, for example, propensity to consume of consumers in the economy. Okay. It's been in economics for a long time, but now we have the big data to be able to measure these, you know, there are a lot of service on your phone with thousands of users.

And this, these things can be measured almost like in real time, you know, so you don't have to. To use aggregates that are a very low frequency. And then as we said, if you look at lower frequency, sometimes you have to, to, to return to the associational world because you cannot afford all the micro cosal steps now.

Yeah. Now I agree with you fully that you know that there is a, a lot of data, more data compared to before, which will help us to discover some. causal micro mechanisms of the economy, which can be profitably incorporated in that. Yeah, I believe that the data will help, of course, and will stabilize things.

But again, economies are, you know, time varying. They're subject to a lot of external, exogenous, unpredictable shocks. And, you know, also causality, although we can measure some micro causal laws in, in finance economics, behavior in economics, the question is how stable in time we'll continue seeing challenges there.

And we need an adaptive causal system, you know, and this is, this is the holy grail also for, for, for AI, I think, you know, purely associational mechanisms and, you know, Deep learning in language models, their, their associational, associational models be built on stationary stable data, you know, but how to make that something that's adaptive.

And continuously learns and adapts the causal link, you know, this is data will help, but we'll see a lot of challenges also coming from, from the methodological, from how to deal with this data. And do we have enough computational power to deal with this? Because, you know, learning in causal models, it's especially if they're discrete models, it's NP hard, it's extremely difficult to do this.

And, you know, with few factors, yes, but if you have to deal with thousands of data sources and trying to discover different causal mechanisms between those, it's, it's becoming also mythological and computational problem. But I'm confident we'll see some, some developments now with availability of more data, computational power and awareness that, you know, if we're really true to build a general AI, which is an adaptive system that can be applied also to economics and on a big brain that learns these economic relationships and makes inferences and predictions, you know, there is awareness that, you know, if you want to build something that's truly universal to the artificial intelligence, we need to look at causality, not just associations.

Alex: In one of our previous episodes, we had a conversation with Naftali Weinberger, a philosopher of science, and he specializes in causality and dynamical systems in particular. And one of the ideas that he thinks is a very important idea in causality that maybe we don't have that much awareness of this in the community is that causal models are scale specific.

So when we're talking now about dynamical structures in economics, one of my thoughts was That perhaps those dynamical structures are almost also scale specific, which means that if we zoom in further down, we could maybe understand the changes in this structure at a higher level of aggregation as a consequence of interactions on the lower level in the most stable causal structure.

Alexander Denev: Yeah, definitely. To the point before, now that we have more breadth of data. Okay, and we have more high frequency data, we can hope to disentangle this microcosm structure, you know, which is wasted. If you look at the different timescale, which is like the zoom out, you miss the whole picture. So none are fully, fully agree with the statement.

But again, easier said than done, you know, how to approach this, you know, forgetting about data collection and availability problems that you have. A lot of them in also computations, you know, what is the amount of resources that you need to put in place, you know, it's even training a large language model.

It's quite a lot of energy in computational resources to do something like that. It's also adaptive. I don't think it's going to be a less lesser effort in terms of computation. But yeah, definitely. I'm very optimistic that that's I think the right intuition, but we need to prove it in practice now how to make work.

So you make it work and, you know, That there's a lot of work going on the UI. that will make things happen. 

Alex: Are markets efficient? 

Alexander Denev: Oh, it's been debated since the invention of concept efficiency. Not sure I'm the most suitable person to, to enter this debate, but there, there's a lot of people making money out of inefficiencies in the markets.

Yeah. You know, and, uh, it, it's a concept of the interception of Finance economics, especially behavior finance economics, you know, is the price that you see in the market really reflective all the phenomenon that, you know, counted in pricing assets or not. So do all these agents, thousands, millions of them possess a price?

Perfect information to come with a fair price depends on the many formulations of the efficient markets hypothesis, strong and weak and so on. It seems that to a certain degree, the markets are efficient, but the strong efficiency is the easiest to prove. And I think a lot of that revolved around that they did to disprove it and they managed to disprove it.

But, uh, are they reflective of all information? Most probably not. So no, not strongly efficient. Are they reflecting the best information possible? Most probably, yes. But then you have, you know, questions about the liquidity as well, because if liquidity dries, you cannot even get the right pricing because nobody's buying the drilling that does it.

What I can say is that. say that, uh, markets are very, if you take an economic model made by an economist and you're trying to predict something, but if you take the market view on what that prediction might be, can be having a future inflation from inflation swap markets. And so on markets have proven to be more right than the average opinion of economy.

So there is a lot of information, even there'll be some experiments is machine learning better predicting market, just doing all fundamental information like interest rates, unemployment, GDP, and so on. Or if you take the, the, the, what's the marketing since, you know, It seems that the market is a better predictor than any machine learning so far.

So I would say that they're not fully efficient, but they have a good degree of efficiency. 

Alex: In associative financial culture, would building a relevant causal model be a good way to exploit the inefficiencies in the market? 

Alexander Denev: I mean, uh, building a causal model, it's always a plus. You know, even in the book of Paul, when he postulates what are the advantages of a causal model, it's, it's, one of the advantages is stability of relationships.

And, you know, associational relationships that they can break, like there was an experiment to predict flu from Google searches on flu, the trend on flu. Do Google searches cause flu? No, definitely not. That's not cause of relationship, associational relationship, but it broke up. It broke up. It's been proven.

It broke up. So having a causal mechanism to exploit any inefficiency, it's, it's going to you to More stable results because we're to be reflective of the mechanism that generates this inefficiency. So you're trying to understand why it happens, you know, so you could, you understand the, try to understand the mechanism that it's more stable, more robust, more reliable in time than saying that something happens because another thing happens, you know, association.

Alex: For many people coming into complex fields. Like causality, machine learning or finance, it might be overwhelming when they realize how much they need to, they need to learn in order to start be effective in those fields. What would be your advice to people that are just starting with something new, something complex?

Alexander Denev: It's a very broad field. So there is no kind of recipe or a book that describes all these things. It's a learning. And, you know, being in. causality for more, more, more than 15 years. And still I'm far from. fully grasping, you know, all the aspects of it, especially keeping up with the latest evolution of this.

So there is no, no text, you know. So of course, important thing is, especially when it comes to causalities, to understand what you're modeling. I'm not economist background, but no, yeah, my, my firm, which I co founded with Sid a few, few years ago, uh, predicts inflation in data macro variables. And you know, we have to know what we want, so we're not economists, but I had to do a lot of work to understand the domain.

So, which means that we don't just crunch numbers, you know, thousands of data series to predict the future. We have to understand what is important. And this goes to causality. We are thinking, although we don't have fully fledged causal model about this, is that it's still a research in progress, but at least help us understand.

Then what causes what you, 

Alex: although you don't use a fully fleshed causal model in terms of like a compute having a computational model, you are using a causal model of reality in order to. design your system. 

Alexander Denev: Yes. 

Alex: Yes. 

Alexander Denev: Yes, definitely. So we don't crunch all the variables in the world, you know, it crunch around 6, 000 time series, but there are hundreds of millions of time series.

They were there. Why did we select 6, 000 out of billions of time series? Because This is a kind of preselection and it's based on your causal understanding of the world. It's, you know, the, the, the level of the river Thames here around the corner, and it's not going to increase inflation. Although if you plot the two, that can be quite strong correlation.

So we don't put variables in this pool that on prior grants can be completely unrelated. You know, so there is always causal thinking, even if we have now this big, big correlation machine, it's not fully correlation because a lot of thinking went to. Selecting the pool we put into it and everything came from understanding better this domain.

So I had to read a lot of books on inflation, almost all of them are available out there. So before approaching, so it's, you know, understanding the domain, it's really important about that. So, and since we are dealing with big data, understanding of course, data engineering, of course, he wrote a book on Python.

This is a must. This is a must now. I was surprised by switching from C and C MATLAB. to Python, you know, changes the world. So having a baggage, a good, good kind of Python training helps a lot. So understanding data, understanding programming languages, understanding the domain that you're trying to model, understanding also machine learning.

It's important that there are a lot of excellent machine learning books out there. And we have some of them here. I can recommend the book of Marcus Lopez de Prado if you're started and he doesn't shy away from code. So you can see really code there, but you also have to leverage all the other texts that are more like texts that are more traditional, but it's the marriage between.

So, uh, and I, I seen a mistake and you know, some. You know, I, I manage big teams in machine learning developers and engineers. Sometimes people neglect the past and, you know, econometrics models, they, they, they failed traditional financial models. And, you know, see many people that let's start from. what might work.

Let's start directly from, from, from machine learning and let's disregard all the stationarity testing in econometrics because the, the, you know, the neural network is, is going to learn by itself, obviously, but that, that doesn't work. So always is, you know, build on the shoulders of giants who are before that.

So having kind of classical formation depends on the field of physics. Finance, derivatives, pricing, markets, microstructure, or predictions, or econometrics, you always start from the base. So that, you know, you can't do, at least in my view, this kind of leap. It's kind of quantum, you know, without having a solid base.

So yes. Thanks. having a knowledge of what's been done before. It's extremely important. We also be open to learn all the time. I'm still learning. I hoped and they'll stop running, but, you know, it's kind of trivial, you know, you have to always look, it's kind of LinkedIn post, but it's really to, if you want to be the cutting edge research and you have to learn, not just in depth in the world is complex.

So you have to. to, to stretch over several domains actually to, to make things work. And patience is one of the things that, because it's so complex, but you know, you have tools like chargeGPT now that can make your life easier. And when it comes to summarizing. writing code. So we're living on shoulders of giants, but those giants can be also AI giants.

Yeah. But it's a very exciting learning experience in finance for the last years. 

Alex: What is one or two books that changed your life? 

Alexander Denev: You know, I've done many things in life from physics to, to, to, to IT, uh, studies economics finance. So, in each domain, you know, there are books that, you know, that, that, that are there, they're there to stay.

But of course, the book of Judea and Peru is the one that opened my eyes and if you can see that the first editions were written a long time ago, I think the first thing was in the 90s, I'm half a second. The big book, Causality. The big book. Yeah. The book of why is, I haven't read it to be honest with you, but they say it's, it's, it's really not nicely written and, you know, brings this culture of asking the question why.

Okay. So, this is. This was the book that changed, changed my thinking and also the book of Ricardo Rebonato called Coherence Trust Testing that is the first book that introduced causality in finance. And yeah, these are, these are the books that changed my career for the, for the last, uh, 15 years. And of course, when it comes to machine learning, yeah, I have this one, it's still here.

It's, it's the book of Rasti Tibshirani, Elements of Statistical Learning. It's, you know, this is where I learned first edition, uh, uh, Machine learning also the book of Kevin Murphy on on on machine machine learning and he he speaks also about Directed and directed graphical models. So these are the books that changed my way of thinking and switching me from from Thing associationally to asking questions like, like what, so it's not just, you know, it's a textbook, mathematical textbooks, but changes your perspective of how, how to think about how to think about events.

Alex: What keeps you, what keeps you going? 

Alexander Denev: Curiosity, maybe the sense of purpose that, you know, I want to do something, uh, uh, different You know, life is short to leave a mark on something that, you know, from which many people can benefit, you know, and, uh, you know, I've been many years, you know, in finance and that I worked for many exceptional bosses, which I'm hopeful.

So, uh, Uh, I'm asking the question, so, but what's your contribution? Maybe it's too early to speak about, uh, legacy and I'm, I consider myself still young, but I'm thinking that, you know, the perspective that, you know, I have to do something, maybe this is the right moment to leave a mark in how people think about causality, at least in the financial and economics to me.

Who would you like to thank? To thank? Yeah. I had many, uh, mentors in life and again, in different aspects from culture to music to sports, but, uh, being in the same domain, my mentor has been Ricardo Rebonato and extremely talented and cultural person with a very sharp mind. Sharper than me, so I still look up, uh, up to him.

I also thankful to, to Marcus Lopez de Prado, who actually gave me the idea to write the last book to the book of alternative data and, uh, in finance, I'm, I'm grateful to, to my supervisor, Daniel Amit. unfortunately passed away some, uh, some years ago. And, but he, he, um, he wrote a book on modeling brain functions.

So this one were like the first examples of neural networks, but they were mimicking brain functions rather than having in engineering. And, you know, this also made me think that Uh, you know, there's lots of cross pollination between fields in physics in that, in that example and how we understand, uh, neural activity and, and, um, pattern, uh, uh, recognition.

Yeah. These, these are the, the people who, who, who have influenced my life and they still have impact on my way of thinking. 

Alex: What question would you like to ask me,

Alexander Denev: Alex? I really know what to say that I'm really thankful first of all, because you know, you're doing something that's. Uh, nobody else is doing it, bringing this way of thinking to, to, to the wider community and being also active and promoting this, this podcast. It's an example that, uh, I, I think we will, we will leave a mark, but what's your motivation?

If I can reverse the question, but what keeps you awake at night and why causality? Why this keyword in 

Alex: your mind? Great question. Um, so causality, well, I think at some point I understood that we are just not able to, to answer certain questions using correlational and correlational stuff. And I was also struck by the clarity of, of, of Pearl's theory.

So that was something that I, I've, I thought remarkably interesting. And I also felt like we as a community of people interested in modeling reality and answering interesting questions. So very broadly speaking, that this is something we could benefit from. But when I was starting with causality, there was not much awareness about all this.

Huh. Kind of thinking on this way of thing, the style of thinking about the world, about modeling out there. I couldn't find information about this. Um, when it comes to your first question, why I do it and why I'm motivated to, there are many aspects to this. One is my gratitude to, to the open source community because I learned from this community a lot.

Um, the other one is that, Um, it took a significant, a significant effort to learn myself about causality and go from things like first causality book to code, to understanding practical implication and practical challenges of implementing this from computational point of view, from implementation point of view and so on and so on.

Um, and so I realized that, you know, it was four or five years for me to have a Good, practical understanding how to do these things. And I thought that I can help other people, uh, just take this journey and, you know, go from, from the beginning to, to a place where they can, where they have good fundamentals and they can already do something in reality much faster than, than it took me, you know, to do this too.

To build the skillset. And, you know, it's also research about the libraries, you know, testing the libraries, if they work actually, because, you know, in open source is amazing. But it also doesn't come with any guarantees. It's a jungle. Yeah. Yeah. Definitely. So. Yeah. So these were, these were some of my main motivations, not all of them, but some of them.

Alexander Denev: Yeah. We're both on a mission. It's a causality mission. 

Alex: Yeah. 

Alexander Denev: Yeah. I hope we can progress it. You know, yeah. The more awareness, the better, the bigger the community. 

Alex: Yeah. And I think we can see that, you know, those ideas are getting more and more traction. Um, so when I look at NeurIPS every year. You know, this year at NURIPS, there are so many excellent COSL papers.

I don't even know how many, but it's, I think it's dozens of papers. And the number of publications grows exponentially. Now, if you look, if you look at the history, like since, I don't know, 2018 or 17, it's going exponentially up. And you can see this also in the, you can see this also in the software, in the software space where you have, we have just more and more libraries, COSL libraries addressing particular.

Because of problems, right? We have general libraries like the one that we are talking about in this book, or you can email, but also people doing like fixed effects, causal models, you know, specifically in Python and so on. So this is really amazing to observe. This is this dynamics, you know, and how people are just opening themselves to this idea and how it changes their way Modeling or general modeling culture to better, because even if we don't implement causal models literally, like I know using do I or any other package, the thinking about the, that problems have structure and that this structured matters, the structure matters.

I think this is something that already, uh, changes how we're modeling culture to better, more efficient. 

Alexander Denev: Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. 

Alex: Yeah. Yeah. And we understand that this conditional independence, this conditional independence, um, landscape that our models build depends on the features that we put there.

And if we put features that I know colliders or mediators that will affect how the joint probabilities represented and was affected generalizability of those models and so on and so on. 

Alexander Denev: Yeah. 

Alex: So this is something really great to observe people realizing the state, these things and using their, this in their work.

It really feels like, you know, we progress somewhere, right? It's yeah. Amazing journey. Yeah. Alexander, where can people find more about you and your work? 

Alexander Denev: I think, no, I mainly my work is publications, uh, you know, it's on Amazon, you can find my books. So the first one on causality back written in 2011, published in 2014, then the second one on 2015, the most fitting in the most recent one in 2020.

And yeah, it's, I think it's, it's, it's, uh, Amazon and it's, it's a good, yeah, I've written some papers, but, uh, usually my preference is for books rather than papers. I know people, you know, prefer writing lots of papers. Uh, I prefer to write books because I like to, to tell, to tell the story. So my, you know, my history is my books, essentially, it depends, um, what kind of information, but.

Um, you know, I'm, I created this firm, uh, that, that, you know, faces financial professionals and we're trying to predict inflation, which has been one of the most relevant problems for the last two years. So on the website of the firm that there is more about what we do, we're not fully causal, but I said we have causality embedded in our thinking.

So we're hoping to, to progress the firm.

So 

Alex: yeah, and where can people reach out to you personally? 

Alexander Denev: Personally, it's, uh, on LinkedIn. Yeah. I, I, I, I watch LinkedIn more than my WhatsApp or Facebook or whatever. This is the medium I use the most and yeah, happy to connect with everybody, take 

Alex: questions, discuss. Great. Amazing, Alexander. Thank you so much for the conversation.

I'm confident the community will love this. Thank you, 

Alexander Denev: Alex. It's been a 

Alex: pleasure. Thank you.