Endgame Analytics: Welcome back to Zugzwang the market modeling podcast from Endgame Analytics. unlike past episodes, I am not actually being joined by Oliver Nunn today. Oliver is actually visiting our office in Japan. and so I I guess I'd like to give a bit of a shout out to all of our listeners. I'd love to show that the the listening stats stay strong so we can take Oliver down a peg or two for when he gets back and market. Marcus takes him through the the listening numbers. but so without further ado, I'll I'll I guess I'll get to the topic of today's episode. And so today we're really going be talking about forecasting in the NEM, why prices are hard to predict, what machine learning and statistics can and can't do, and what it's like to bring skills in this area from out in from outside of energy. And so today I'd like to introduce two very special new guests, Our analysts at Endgame Analytics, Trent and Rosalita. So maybe we start with you, Trent. Did you want to give a little bit of an introduction to yourself and your background? Sure, thanks, Jack. Hi everyone, my name's Trent Henderson. I'm an accredited statistician and a principal here at Endgame Analytics, where I'm fresh in my tenure in my first month working in the energy sector. Prior to Endgame, I bring 10 years of prior industry experience in data science, where I was the lead data scientist for an international consulting firm for the past roughly eight years. And I've also recently submitted my PhD in statistical machine learning for time series as well. Which is we I think as you're as you're finding there is a lot of fun time series data to to play around with in the energy space. Yeah, absolutely. I mean, even just in a few weeks here at Endgame, I've realized that the energy market data is definitely unique compared to a lot of the other time series from other domains that I've looked at in, for example, medicine, government policy and kind of other domains like that. I I was literally just looking over your shoulder earlier, seeing some interesting data a around some analysis and time series anomaly d detection in the medical space that you were discussing ideas for how we could be applying that to price spikes. So I'm very I'm very excited to talk a little bit more about that in the session today. And Rosalita, would you like to introduce yourself to the audience? Thanks to act hi everyone. My name's Rosalita and I joined Endgame at the beginning of this year after finishing my honors in machine learning where I took data from different international organizations to predict maternal mortality rates for different nations and the world. since joining Endgame, I've worked on a bunch of different machine learning tasks. mostly involving predicting deterministic and probabilistic price spikes in the N. Fantastic. So yeah, so I guess today is going to be all about data and ML. we'll touch on a little bit on the mathematical optimization side, but hopefully this is a new area that our listenership will find more interesting than Oliver's voice normally. Great. So I guess to get into it, Trent, you come to us with a decade of experience in time series analysis and a lot of experience in consulting working across a few sectors. So what's your impression of of the energy data sets you've been playing with so far and and how how would you compare it to what you've seen in other sectors you've analyzed time series data in? Yeah, it's really interesting. I think so far I've realized that there's this strange and unique. Unique combination of both consistent temporal statistical structure, so things like trend seasonality, whether it's daily, weekly, monthly, that thing. Holiday periods where like people use more energy at Christmas time when they're home, for example. And so you have this combination of those sort of consistent properties, but also these strange anomalies like weird stepwise changes in a price, for example, or other sorts of spiking behavior and level shifts, some of them caused by the physical. System, others caused by the behavior of actors or some unknown cause, even. And I think what I've realized so far is like working in energy in any form of kind of quantitative analysis, it really prescribes the need for analytical methods that can kind of capture this complexity. Like you can't just take traditional methods that handle the consistent parts that are really well studied in the literature. And you also don't want some kind of black box approach that captures some of this complexity, but we can't really understand. Standard and so it's about finding that middle ground of interpretability. Sounds great. And Rosalita, you've been working with some of these data sets and machine learning for for a for a little bit yourself. What what's your impression of of it being? What what was it like for you when you first when you were week one on some of these energy data sets? I think coming into the energy sector, I was surprised at how At the interaction between the underlying physical system of the grid and the economic market that overlays it. And I think it's really easy when you first start out and you're building these models to go straight into the data and try and find interesting trends and patterns where if you don't understand kind of those economic dynamics that feed into the market, it's very easy to miss the big picture and not model what you think you're modeling. Mm-hmm. That that was always my experience when I first got into energy, was often I think I understood the reason why something happened, and then there'd be some detail further further going on underneath the surface that would always I I'd confidently say to someone, this is what did it, and someone would be like, but did you know this FCAST constraint was binding and doing this, and suddenly I've look like a fool. and and so I've I've always kind of learned to be very cautious when I think I understand exactly what has driven some outcome because there they might might be some kind of mechanism going on that I don't quite understand. I mean what what one of the ones that I think is that that I've been spending a lot of time thinking about lately has been you know the role that network constraints and outages play in driving price spike events and that's and that's something right where unless you're delving into you know not just lot demand and And renewable generation and scheduled generation were doing. But because it might be that the system, if you looked at those in isolation, the system should be cheap, but you saw high price spikes, so there must be something else going on that was driving that. And I guess, would would that be like what you're seeing is the need to kind of have that kind of understanding about what new features you need to engineer to have a model that can account for it? Absolutely. There's a massive trade-off between how much information you need to be able to represent, what you need to model properly. with how much detail or how much noise the extra detail would bring. Like to be able to you know predict price spikes, you might need to see everything like network constraints, but which constraints are the most important? Which parts of the region do you want to model which have the greatest impact on prices? And I think that demands a level of domain expertise that has to be really rich to answer those questions. And and I guess it's also compounded by the fact that this is This is a sector and a data set where the things we're most interested in are the outlier events, the rare the the rare things. I I I was recently looking at a constraint an outage constraint that looks set to be invoked in the NEM dispatch engine in December. And so I thought, I wonder what what the history is of that constraint. Let's I and and so I went looking at it. It looks like it's only been invoked four times in the last four or five years. So So it's it it's a it's an interesting area where we care a lot about things where there's very sparse data around them, too. So I guess you've both entered the energy sector at quite a kind of an exciting time. Oliver often you know, likes to I guess play play the old man in the firm and talk about you know what it was like when nobody cared about energy and when it was quite boring. I guess the days when planning was just when you were gonna build a new coal generator, put that on the Barbie. like the Realistically though, at the moment, the trend the energy transition is has completely changed the energy landscape. What with some of you you've been at the forefront of too, Rosalita, with trying to train ML models on some of these data sets. What are the what what are the recent trends? What are the things that have been happening that have basically been making you tear your hair out because they keep breaking your models? Well, there's a lot that's happening and a lot that's changing in the sector. We have had Growth of renewables like wind and solar, we've had a lot of batteries being built out, and those types of generators operate very differently to what we used to seeing with coal and gas. So for example, now in the middle day when there's so much sunlight, prices are really low because there's so much solar generation. And what that means is that when we're training our models, we really have to be careful about what data we choose to train it on. Because if we go say ten years back, we don't have those middle of the day trends. And then the model would learn So we need to be very careful and very aware of what's changing in the market so that we're only teaching our models what's most important for predicting prices in the current state of the market. And how would you say like How how would you say your modeling and methodology is being affected by the fact that we are in such a constantly evolving sector? For for example, at the moment, you know, we've got models that are doing, you know, day ahead and week-ahead forecasting, but there's also ones doing, you know, months to a year out as well. How do you deal with the fact that there's so many new assets coming in, there's new batteries being built in? How how do you factor that in? The model there's no ML training model that has seen like what What the neck the the storage fleet is going to look like in a year's time? That's a great question. And I think you have to lean very heavily on domain expertise and ask people who've seen the changes in this sector, okay, if we had this kind of growth in a certain type of renewable fleet, or we see these changes in the market, what kind of profiles can we expect? And you teach the machine learning models based on features that don't represent the state of the market right now, because that Will change very quickly, but represent kind of patterns and headroom in the market and things that can be true across a range of different contexts. I think a really interesting example of this is the PEC interconnector, where there's no historical data about how that will operate, and it will change the pricing relationships between different regions in the NAM. So we had a lot of internal conversations about what the effect of that will be, and then we created different layers in the model that tried to represent those different prices. relationships looking forward. I yeah, Pe Peck has a special place in my heart at the moment. I've I'm trying to do some work to understand the way that some of some of the tra transformer setting settings impact pec's right hand side values so that's it's a fun can of worms that I guess everyone wa watch this space will be looking to put some more stuff out in this space in the in the coming weeks. as well. So actually that does raise an interesting question too Trent. Like what you in the sectors that you've worked in, like obviously energy is is changing at quite a rapid play pace. what does I guess the research literature and and I guess some of the approaches taken in sectors when you when you you have issues with the historic data? Well effectively you don't have a stationary time series data set. what what was true before is actually a moving target? Yeah, it's a really difficult challenge. like there's so much heterogeneity in the energy market, like the drivers change, capacities changing, like renewables, like the increasing entry of renewables and and the scope. Of their operations are just a couple of examples. And when you have this constantly adapting and expanding system, kind of simple methods that just consider the historical information of, say, a single time series, like price, for example, is going to be insufficient to generate good predictions into the future. You need to kind of consider this shifting system. And I guess compared to other domains and data sets where like you can sit down and draw a pretty good graphical causal model of this variant. variable predicts this which then drives some outcome for example and you can map out how all these variables play together. The energy market's a little more difficult because like capacity's changing and some of the factors are shifting and stations go offline or online. it it becomes a really difficult task to model anything with a semblance of determinism, I guess, compared to to something else. I think one thing that I've been thinking a lot about as well is with all of this changing and the kind of importance that we and a lot of others place on generating good estimates of the future to then obviously inform like planning and all sorts of other behaviours. I think appropriate methods for uncertainty quantification are becoming increasingly important. So for example A single point estimate of a price at some point in the future may not be actually that helpful if it's misleadingly precise and the kind of prediction interval around that is really, really wide, and it could be anywhere in like kind of a $400 range, for example. And so I think trying to both model and communicate that uncertainty will be really important moving forward for like good planning. I guess also the the uncertainty is also compounded by the fact that you you may have trade. Is managing a portfolio where in some circumstance circumstances your position is such that it makes sense to try and trigger a price spike. On the other hand, it it may not actually be in your interest. So sometimes it might be you have all the ingredients there to have a price spike and it just doesn't happen because of human decisions and hidden state information as well. And actually that that that touches on the whole area of managing and for and understanding data around r rare price spike events. I think The thing I always found interesting coming into energy after working in data science and and machine learning in a few other sectors was in a lot of sectors, you know, you typically you take your outliers and you filter them out from the data set and you just treat them as aberrations. Whereas in in energy, the outliers kind of make the economics of the whole system work. and so I guess I'd be I'd be interested in terms of like would you say the fact that it if everything comes down to outlier analysis, does that just inherently make price spike forecasting a hard problem from a statistical perspective, Trent? So good question. I think as a statistician, I think I kind of shudder every time I hear the word outlier, because oftentimes outlier is just kind of an excuse to delete something to fit kind of like a normal distribution or to make the analysis simpler, when in fact there's a lot of value that can be gained from Choosing a better distribution. Like, do we have more values that sit in the tails? Then we can use a probability distribution that much better fits that data. And so I think there's a really interesting question in energy of what these distributions might be. There might not actually be some kind of nice parametric form that exists in the literature that we can well estimate. It might need to just be purely empirical. But I think your point around these kind of anomalies and spikes and low frequency events being the actual thing we care about is puts energy in a pretty unique position compared to other domains where yeah like you said oftentimes these are handled statistically or are kind of like ignored and it's about just predicting a nice smooth mean whereas yeah we're exceedingly interested in trying to predict these rare events. I think I was I was seeing you guys doing a really interesting piece of analysis looking at the anatomy of different price spike events and seeing what bits of data were relevant to them, which ones where you could probably see them coming from some of the data and which ones you you couldn't. I think it it reminded me of that what was that that saying about how happy families all look the same and unhappy families are all happy unhappy in their own way. You were seeing just so much variance in the things trip contributing to it. Absolutely. There's no one feature or event that can always signal a price bike or will signal every price bike. So it's a very interesting exercise to try and identify a range of patterns that can give us a good estimate. Makes sense. And I guess like Rosalinda, did you wanna maybe walk us through what happens on on s price spike days and and what happens when you have a model that's really just trained to minimize, say, average error? Sure. Well a price bike day can look very different between price spikes. You might have something where there's an unplanned outage and suddenly generation can't is can't quite fill demand as it used to. So demand spikes and price spikes with it. You might have other times where there's a wind lull and you know the amount of storage kind of dwindles as the lull continues and demand is elevated because it might be hot and that will push the price bike up eventually. So you have a range of different things leading to these price spikes. And what makes it really difficult to predict them in a machine learning model is generally when you're training a machine learning model, you'll give it some historical data and you'll give it some kind of an error and punish it whenever it makes a mistake. Price spikes make up less than 1% of instances in the NEM. So if a machine learning model always predicts no price spike, it'll get 99% accuracy. And that looks really good because it won't be penalized unnecessarily. And so you can get very good, very misleading. leading accuracy metrics on your model performance when classifying these type of price bikes. So you to think very carefully about how you train your models and what they're being evaluated on. That makes a lot of sense. And I guess we've touched on a little bit about the probabilistic side of price spike. So did you want to talk a little bit to like the almost the two the two issues with the price spike, right? There's the chance of a spike and then there's a size when it happens as well. Did you want to, I guess, untangle that for us? Sure. Well, as there's these different types of price spikes with different causes, they'll look different. So there might be one spike, there might be multiple spikes that are lower or higher. And so there's almost two different problems. Will a price spike occur? demand and supply be mismatched, are weather conditions kind of leading to a price bike? And then you can give a price bike a probability. But once you know that a price bike is going to happen with a certain level of probability, then you can ask questions about what the spike would look like. And you need different features to be able to make those different decisions. You have certain indicators may have we maybe of weather or of headroom that will provide you more information about the shape of a price bike, but it might just be noise when you're trying to predict whether one will occur So you need different ways of thinking and different strategies for predicting these different problems. That makes sense. And I and I guess we've because there's been such a you know relatively quiet side of things in terms of prices for much of this year, the the other question is how do we actually test if the model does well when when, well, to begin with, these are already rare price events, but they've been even rarer up until r probably really the last month or so. How how have you been thinking about managing testing of these models and benchmarking? how do you tell, do I have a better model that I've trained? It's a really tricky problem and I think it involves looking very carefully at the historical data you have and trying to push back as far as you can to have as much data as you can to try and capture as many of the historical spikes as possible to train the model. But some of the kind of tried and true machine learning techniques of taking, say, the last X many weeks of recent data and using that as a standalone test set might not work because there's no price spike in those weeks. And so you have to be very careful about how you split your data, what you train on, what you test on, and think carefully about when price spikes occur and what you can do to make your test set representative of the different spikes that could occur. It it's the it's the thing that always drove me crazy. When you do that kind of withhold of withhold withhold of most recent data, and you'd have a model that did really well or did really bad. And but a little voice at the back of your head will always be wondering: is this because my model is better or worse? Or is it just because, or is the market itself changing at the moment? Or is have the last two weeks actually been weird? And I've actually got a good model, and if I had a little bit more, you know, in another week, we'd actually see it. But this is the only snapshot. of data we have to actually test it. Yeah, it's an interesting problem. And I think applying these kind of strategies in the energy sector with all of these changing trends means that you have to think a bit more creatively than you do, maybe solving other types of problems. Like you might think of more out-of-the-box techniques like synth making synthetic data and trying a bunch of different things. Looking at some of the events that have happened in October and a little bit of November, where we've seen a couple of price spike events occurring again, and it it it reminds me of what was that the the the common adage, you know, the only constant is change. And I kind of I I've been thinking for a while that a lot of the the machine learning training data has been dominated by a relatively you know a market where there hasn't been a lot of big pricing activity going on. And so when you hit a new paradigm, most machine learning models are actually going to struggle to to actually cope with that. what well I guess Trent and Rosalie, like what approaches do you do in that world where suddenly you you kind of hit almost like a step change? Like what how are you What are you thinking about at a high level ideas for how to how to deal with that type of thing? I think you have to think very carefully about the features you use to represent the market, where they'll, regardless of whether there's a paradigm shift or a step change, there'll be certain truths that must hold true, like the relationship between supply and demand. And if you can capture those relationships in your features, then at least the body of your model. stay consistently on point and you might have to tweak other things around that model and that's where it becomes very important to talk to the people around you and profit from that domain expertise and ask, okay, there's been this paradigm shift, there's this new trend in the market. What type of pattern, what shape do you think that will take? And then try and build that interim model going forward. And I think it's just being really flexible and trying to identify when those paradigm shifts occur so you're not caught off guard. And I think there's also been a few other interesting techniques you guys have been playing with around different sampling techniques and even fold some experiments around synthetic data that I'm sure some of our listeners will be excited to hear more about in the coming weeks as well as we release some new versions of things. So yeah, I guess that's that's a bit of an anatomy of a price spike event. So one of the things I'm quite interested in is I guess we've spoken about paradigm changes which suddenly shift the market into a state where the previous data may struggle to represent them. So what are what are the types of things that that you you've kind of seen that seems to be like reflect kind of step changes in in the market? I think there was a very interesting one earlier this year with the growth of batteries and the amount of capacity and storage coming into the system now. Where before batteries were very much price takers, they would try and charge when it was cheap and discharge during the evening peak when they could make a lot of revenue. But recently, you know, with lower volatility, well, not in October, but earlier this year, there were fewer evening peaks, and one of the reasons for that was that they There were enough batteries in the system all discharging during these high price periods that they drove the pro price lower. And that was a step change in the market. And thinking about these patterns and trends and how they inform price is really important to kind of make sure that your models stay relevant. That makes sense. And I guess given this is a a data set where It is it is fundamentally a time series data set and and we're trying to train on a model and know if this is is better version of it. The the issue of data leakage is a constant topic of of discussion. Trent, could you maybe talk a little bit about what what data leakage is and why we why you have to be careful of it when when training models and releasing them? Yeah, so I think definitely when you're building machine learning models, especially with time series data and forecasting and looking ahead, there can certainly be the temptation to include all of the information that you have access to when training the model, when in fact like some data might not actually be be released for some particular cadence. And so if you're training on a model up to kind of the most recent period of data, but then there's one particular variable or data set you're making use of that gets published quarterly. Or monthly, for example, then you have this kind of really big gap in updating frequency. And so maybe that's not the most appropriate choice for the model. And so I think it's really interesting to think about it from that perspective. And then the second one is Rosalita before was mentioning about kind of looking back in time and the value of historical data. And so some of the things I've been thinking about are like what are the appropriate lagged relationships between all of these variables and trying to build this bottom-up empirical understanding of how far back in time do we need to go? between two like time series, for example, to learn the information we need to kind of look forward. And so an example of this is kind of looking at the demand-price relationship, for example. And so do we need to look at the five minutes before any given interval to understand what might happen next? Or can we maybe go to ten minutes before or 15 minutes before, in the absence of a spike event of course, which kind of throws everything out. So there's some of the things I've been thinking about as well. A couple of other interesting thoughts And I guess maybe this is just coming from someone who's relatively new to energy, but I think this idea of bottom-up learning through statistics has been something that I've really been exploring at the start of my tenure at Endgame. And so I've been really trying to think about kind of statistical signatures in the data, which is kind of an area that I was looking at in my PhD with using kind of either global or windowed properties to understand like what are the dynamics over time in a specific. Specific window, and then what does that tell us about what might come next? And so I've been thinking about ways to maybe empirically kind of cluster spike events or kind of use other sorts of anomaly detection algorithms that have been applied in other domains to energy to try and uncover maybe some hidden structure. I th I think the yeah, a lot of this type of statistical and time series approach that you're kind of bringing to this analysis is so so complementary to a lot of the fundamentals optimization modeling that we Often do as well. we've been collaborating on some work where we've been pulling apart the things that drive the right-hand side values of constraints in the NEM dispatch engine. And there's been a fair a lot of work going in around digging into the things that drive that in the dispatch and what AMO has picked up on and formulated into the pre-dispatch version of that. But I also think that a lot of the work that you've been doing as well, looking at what are the drivers. Of these constraint right-hand side values from like a purely statistical approach means that you can pick up on things that complement all of this analysis too. I've been loving seeing that interaction between the optimization model is and you and the two perspectives you bring on that front. Yeah, definitely. And I think one of the things I've quickly learnt here is that domain expertise is absolutely critical. I think in a lot of other domains, such as kind of policy analysis, In the public sector setting, you can often learn from the data and understand kind of what's going on and give a good estimate about something. Whereas here, there's so many, there's such a rich history of such like heterogeneous dynamics that domain expertise and just knowing what you've seen before or how people might act on the system, for example, can be really helpful. And so I think in energy, there's this really useful opportunity to derive something using machine learning or statistics, but then you can kind of come back to the domain expertise. As almost like a sense check of like, does this make sense? what might be what might be being be missing here, for example? And and in fact, I think what what I've been noticing with some of this, yeah, some of this constraint work is we're getting this kind of mosaic of approaches where there's like there's the there's some statistical work that's informing it. There's some where it's work around more of the fundamentals of of some of the things that are driving that that we can see from the constraint equations. And then there's ones where it's a combination of them where it's like we're being informed by some of the the the way that we know that the equ the dispatch engine works, but there's also parts of it where we're actually picking up like the statistical patterns behind the states of equipment or sub-regional demand or things like that as well. So I guess to change tact for a little bit too as well, really Rosalita, one of the things I've found very fascinating about working with such a rapidly evolving field is dealing with the fun of a model that stops working. and then suddenly suddenly seeing now it's not doing as well. And and that's an interesting question. I guess when you roll w when you roll a dice, how how many rolls of a dice does it take to actually know that that it's a loaded, you know, die compared to just being, you know, a statistical aberration. So could could you talk a little bit about like your experience with diagnosing when a model stopped working as well and what what you found to be the cause and how you improved the model after that? I think that's a really interesting question. And I think one of the best ways to start diagnosing that is to kind of understand whether the change you're seeing is in some kind of interesting turning point in the domain. Like for example, is it the start of a new quarter where there might be contracts and new bidding behavior and are you suddenly seeing kind of new pricing relationships in the market that weren't there previously? That's likely due to a step change. But if it's on a relatively random day and it's pretty short lived, then there's probably not going to be a paradigm shift. It might just have been something strange going on in the NAM that won't be long lasting. I think you can do some kind of checks of how long these changes are lasting, when they occur, but like Chen said, it really comes back to the domain knowledge of is this some Does the change look like something we would expect if there's new capacity entering the market or if people bidding suddenly take different strategies? Or is this something that looks like random noise? And often it will be interesting to hear the different perspectives of domain experts around that. Fantastic. And I guess that does touch on we talk about that, the model improvement and training process. Maybe you could give us the two-minute overview for my my my boss has come to me and wants to train a me to train a new model. What what what does it look like to actually build these models? especially for a lot of our listeners who are probably a little bit more on the more mathematical optimization side of things, which I I always thought was interesting while with the optimization front where it was like describing the rules bottom up, whereas the ML it seems to be a bit more about the data. Yeah, absolutely. And they work together in interesting ways, but that's a different conversation. I think if somebody comes to you with some kind of a modeling question, the first thing to do is very clearly define what you're modeling, the output variable, and what looks like a successful kind of prediction. And then you think about well, what are the patterns and trends and things that signal this outcome? And then based on domain expertise and the statistical structure of the data, you probably want to define different features or variables that capture those patterns as best you can. And then you might try and combine those. Variables using different model architectures. It might be a statistical model, an optimization model, or a machine learning model. And you often run experiments with using different combinations of features or formulations of features or different kinds of data processing techniques and different types of models, and then compare them in some kind of rigorous structured way for which captures the outcome most comprehensively under the largest range of context. So you've spoken a few times about the role that domain expertise plays in choosing these features. So why why can't I just throw the whole MMS database at an ML model and have it figure it out? It might never stop training. There's a lot of data in the MMS and I think that was something I realized easier on early on is it's easy to come at the MMS and think, you know, demand is important, supply is important, and interconnectors are important, and then to get very much lost in the weeds of all of the data that's there. And it's really important to be able to take a step back and think, okay, demand and supply interact in this way. This is where interconnectors are important. And then to hand engineer those features. That feed into your models. And I think it was a really interesting kind of outcome that I saw quite early on, where you can do a lot of tuning of different model architectures and in university especially. They put a lot of emphasis on choosing the right model architecture and the right hyperparameters. But often in such a data rich domain, the real kind of value add is choosing good features that represent the underlying patterns in the energy sector. I've I've heard a few people say in the past that for for the most part there's a few broadly sensible, machine learning algorithm decisions and then the rest of it just comes down to yeah, just the careful curation of that data that you give to the model. Absolutely. I I guess the other thing too that's also interesting about this problem is we're dealing with a lot of pr rare price spike events, the data's very noisy and if you throw a huge data set at it, it's probably pretty easy to come up with a whole bunch of spurious correlations. As well. Absolutely. There's so much noise and there's so many trends that might only apply in certain months, but then not others. You need to know what's relevant to give your model so that it only learns what you want it to. What one of the things I've I've found really interesting as well have have has been the role of different of simpler simpler versus more complex models that can account for more of the complexity in it, but at the risk of overfitting as well. And sometimes you may actually want to choose. use a model that is potentially less accurate and sensitive overall but is actually More like this when you run it through bunch of sensitivity analysis, you can see it seems like it's picking up on more of the structural, the real structural things in the model. Trent, did you want to talk a little bit about though those two types of models and how how they deal with the role of simpler models versus more complex models? Yeah, so funnily enough, one of the kind of guiding philosophies of my PhD thesis was something that I called incremental complexity, which is this notion of in a given kind of machine learning modeling task. There's often a lot of value, and I showed this empirically in my research. There's a lot of value in starting with a simple baseline. That baseline looks different depending on the context. And so, for example, for a time series problem, maybe your baseline ignores temporal information and purely just looks at something like the distribution, so like mean and variance, for example. And then you can start asking kind of incremental questions like what's the value of then including temporal information? How well does it perform a Above something that's extremely interpretable. And so I think by extension, into systems such as complex as energy, I think there's a lot of value in kind of starting with interpretable methods that can be explained. So these, for example, could look like classical statistical methods that decompose a time series into just trend seasonality and noise, for example. And you can basically start there and say, how well do we do? And from there you can kind of figure out what are the things we're missing. Well, maybe one of your answers is odd the trend. Trend is nonlinear, and so, okay, we should include something that can capture that, then how well do we do? And it's this notion of kind of building complexity as it kind of improves performance, because there's almost always going to be some trade-off in interpretability. And so I think The current machine learning and data science literature and and even industry more broadly is heading towards this black box modeling approach, right? Where people wanna fit the newest kind of neural network or something rather than kind of starting from a simple baseline and and adding that complexity as it kind of improves performance, noting that there are going to be some trade-offs in interpretability. And I guess while we're on the topic of modeling approaches, could what one of the things that has become quite an active area of interest for us has been the whole probabilistic modeling versus point forecast. could you maybe explain the the difference between those and the philosophy behind them and the reason you would choose one over the other, Trent? Yeah certainly. So I was mentioning earlier, you have this notion of if you produce a single estimate for some future value, obviously we don't know exactly what that future value is, which is the whole point of forecasting in in the first place. And so there's obviously some degree of uncertainty around that estimate. And so this is where the kind of notion of probabilistic forecasting comes in is giving an appropriate estimation for how uncertain we might be about some future value. And so for the listeners out there who might be from an optimization background as opposed to kind of statistical modeling. I think a couple of the key terms would be this notion of a point forecast usually just refers to some measure of central tendency, like a mean or a median estimate into the future. You then have like a confidence interval, which is basically your lower and upper bound, which are likely to contain the true value of a parameter from a model. So in a simple regression model, this could be an intercept or a coefficient. But then you have this notion in forecasting of a prediction interval. which is the kind of range of values that likely contain the true value of a future quantity such as a price or a particular demand at some time horizon. Now, prediction intervals are usually wider than confidence intervals because they tend to encompass both the uncertainty of the model, so of the parameters, as well as our uncertainty about going further out into the future. And so this we become less confident in a single number the further out we go away from the data that we have. And this has a lot of implications for training and fitting and evaluating machine learning models because the way that you evaluate point estimate accuracy compared to distributional accuracy is very different, and there's different metrics. tricks for doing both and you might end up with a different optimal model for example if you choose one over the other and so there's a lot of careful decisions to be made when choosing a model. Actually could you talk a little bit too that that the work that goes into judging a probabilistic forecast I've I've noticed that with some of the work that we've been doing recently we tend to just collapse the the forecast down to just the the highest probability outcome. But how how how do you like think about evaluating accuracy in that world and compare even comparing models and out outcomes and how would you explain that to people whether this was this was a good outcome? Yeah, it's it's interesting. And so I think Rosalita before was mentioning things such as like mean absolute error and these kind of like error metrics and these all relate to kind of point forecast estimates because we're kind of looking at a single number. whereas to kind of evaluate a prediction interval, there's been a whole suite of kind of tools developed in the the time series literature for doing this. and there's things such as like winkler scores and basically a whole suite of other metrics that consider the whole distribution. And I think this is really important because you might have some models that assume like symmetry in the distributional forecast. So you have your point forecast smack bang in the middle of the distribution, and it's even on both sides in terms of how certain we are about what that value might be. But then you may have really complex cases where you're more uncertain in the higher end of scores. Like, for example, we might not have many kind of high-value outliers, but we have a lot of low values. And so we have this kind of asymmetric distribution for our forecasts. And so we need metrics that can kind of consider the shape of any of these distributional forecasts. Do you think a probabilistic approach also makes sense in in a sector where you know where have things like the hidden state of like portfolio position driving the decision of people to trigger a price spike? Like where it might actually be that the more interesting thing isn't that the highest probability you know, pricing bin is in the you know 200 in the 200 or 300 range, but that there's little price spikes picking up in the higher price bands as well. Definitely. I think two things that come to mind that I've been thinking a lot about are yeah, this kind of like hidden state modeling, which is hidden Markov models and things for the for the people familiar with the statistical literature out there, where you kind of have these states, and so for example, in whether you can look at rainfall and have obviously dry and wet states based off like the rainfall data. But then from that you could infer some hidden state like sunny or cloudy, for example, which is a lot trickier to get from just a rainfall time series. And so can we infer maybe like the bidding behavior states of an actor, for example, on data that we can't see based off the data that we do have access to. I think that's a really interesting and very underexplored Question that would be very hard to answer, but would be very valuable. I think the other one is, and I've kind of spoken to you a lot about this, is Bayesian approaches seem very, very useful in energy. the biggest limitation is definitely the data set size for fitting kind of these huge probabilistic models that don't have kind of this closed form solution. And so you need to relate you need to rely on sampling algorithms, which can obviously take a very long time, better as kind of computing infrastructure is going. Gotten better, they've become a lot more accessible, and I think where their value lies is in the ability to statistically encode domain expertise. And so, for example, if we think the relationship between a weather variable and demand has a certain shape, we can encode that into the parameter, and which basically constrains the search space and leads us to hopefully a more accurate answer at the end that is still probabilistic. Fantastic. I guess we've spoken a little bit about price spike events, but there's another area we spend a lot of time thinking about too, and that is demand in the grid. I thought maybe I'd split this up with Trent, starting off with some of the short term work that you've been doing from a statistical perspective, and maybe Rosalita, then you might be able to chat a little bit about some of the longer term thinking you've been doing on the demand front. but yeah, Trent, what what's your what have you noticed so far with some of the and I guess could you also explain the difference between taking a statistic. statistical approach to demand modeling and how you can use that in you know the short to medium term compare and then what you do for longer term trends as well. Yeah, so before I was talking about statistical repeatable structures that show up in data. So things like seasonality, where we can see heating and cooling cycles, for example, in the energy data of when people are turning their air conditioning on for one or the other use. and so I think there's a lot of value in these kind of repeatable structures in like trend and seasonality and holiday period identification, which can lead to pretty good short-term forecasts with Very little kind of domain expertise or input in the statistical model, and just using a purely kind of bottom-up modeling approach. But as you start to look further and further out, suddenly the spikes and the anomalies and the other things we've been discussing come into play, or the increasing fleet size for renewables plays a role. And so the future gets a lot harder to predict, and suddenly these kind of nice and interpretable models may be insufficient for like kind of long horizon forecasting. And so that's when the bringing in some more complexity to help try and identify some of these more complex structures can be really valuable. Rich Liddy, you've you've spent a bit of time thinking about you know what goes into a longer-term price forecast. Did you want to maybe talk a little bit about like all all the elements that you see typically getting modeled bottom up in in those? Sure. Well the long-term price forecasts tend to rely on demand forecasts and forecasts of what renewables will do. And I think demand is a really interesting one to talk about because the changes in the energy sector have made it a really interesting outcome to model. where now we have to consider things like EV charging and what that looks like, solar PV on houses, batteries in residential properties, where they all change the shape of demand during the day because people aren't necessarily charging from the grid, they're charging from consumer energy resources on their roof. And so it becomes Becomes a really interesting question of what do we expect to happen in this space in the future, whether that aligns exactly with policy targets or like what bend, what approach you're taking to figuring out what's happening next really starts to inform your forecasts and what your view, the view of the world that you produce through your models looks like. So demand is a very interesting one, but then you also have renewables where that is intrinsically uncertain because we don't know what the weather is going to look like. in eight to ten months. So you start to have questions of do we use, say, the weather profile of a previous year where we know. The sun was shining, say at 12 p.m. on Tuesday, or do we take some kind of probabilistic approach? And we say, well, based on these conditions, weather is most likely to look like this. Or this is what a really extreme weather event would look like. And so there becomes many different questions of what you're trying to model over those long term horizons, whether you're trying to model the most likely event or the most extreme event for some kind of a system security study. And so I think the longer term models have a lot more questions. about the scenario that you're trying to build up than the shorter term does. It it's interesting, right? Because often we treat demand as some kind of you know exogenous output input that we hold constant but it it sounds like in the same way that when we do a lot of market modeling we do lots and lots of scenarios looking at different events it's it sounds like you should be holding your demand inputs to the exact same bar and you should be looking at lots and lots of different demand scenarios not not just like POE fifty, ninety or things like that, but fundamentally different views of what could happen on the d on the demand front in the coming years. Absolutely. it's a very interesting question. And I think the type of generation mix that is now seen in the grid also makes this kind of forecasting more difficult. Where now we have price responsive elements that can turn on and off really fast, like batteries, where we might say, you know, based on the supply and demand for this specific interval with forecasting, price is really high. A battery might see that and turn on. And then all the batteries turn on and they all discharge. And so supply increases and price decreases. And then the price might decrease. The batteries say, we should turn off. And they all turn off. Supply decreases, price increases again. So there's some really interesting feedback loops that make these kind of forecasting processes a lot more challenging. All the batteries don't just turn off, they start charging and increase demand. I would see some some spicy bounces around between some some non-scheduled price responsive things in the in the NAM which has been a a very interesting one to to drill into as well. For sure. Fantastic. Well, I think we're about coming to time here. So but I guess before we wrap up, I guess I've got one question for you both. and that would really be, what what what piece of advice would you both give to a data scientist thinking about moving into energy? Don't do it or or it's great fun. I I I know I must say like the part of the reason I ran very quickly into the energy sector after bouncing around analytics in a bunch of sectors was in most sectors the challenge was finding the data was getting access to any data, then it was cleaning the data, and then maybe I had a little bit of time to do a slightly interesting bit of analysis. Whereas it seems like my my experience has been in energy, the challenge has been understanding the data less rather than getting it. What what what what's is that similar to you guys? What's your experience? Been. I think I know you asked for one piece of advice. I think I'll give two. One is more general for data scientists, which is always plot your data. even I've fallen into the trap of just going straight to numbers and analysis sometimes, but it can be really useful, particularly when working with the kind of phenomena that we see in energy, to always graph your data. I think that's it's been immensely useful for me so far. And the second piece of advice would be always talk to domain experts because oftentimes they may. have the answer that you just can't kind of infer from numbers alone. And you were slito? Yeah, you stole my answer. So today next word. I think my piece of advice would be don't just rush in and start looking at the data that you immediately think of. I think take a step back and think about what underlying trends in the market might be causing this so you know what to look at. And then don't just go to kind of your tried and favorite model. Think about like exactly what you're trying to model and then think outside your normal toolbox for how things can be combined in interesting ways because they There's so many relationships that happen in the energy sector that you might not just want one model to represent it. You might want a machine learning model combined. A statistical model, an optimization model. So I think it's really important just to take that pause before you start a modeling question and really think through the problem. That's great advice. Well Trent and Rosalita, thank you so much for joining me. It's been an absolute pleasure. And thank you to all of our listeners who have stuck around. I'm very keen to rub Oliver's nose in the listening statistics soon. Oliver will be back in our next podcast in two weeks. Thank you. Thanks so much. Thank you.