“As a consumer of energy, why not just focus on predicting your consumption, then decide what’s the max price spike that our P&L is willing to bear and finally buy an energy option at that price and be done with it?”

Badabing.

That’s why when Phil says he’s trying to “optimize” I presume it’s all on price because seems to me the best way to manage risk is to just cap the price with an option.

“Basically complex models can lull us into being more confident than is justified, especially considering the likelihood for tail events.”

Badaboom. Presumably Phil’s group has some mechanism to account for out of sample events because there have been several in the last few decades and it would be crazy to overlook those, so I’m sure they haven’t. Just the same the more complex the model the more likely something is to sneak through.

]]>I would still model the price by directly modeling the cost curve by market and then varying demand. You can model the correlations on the demand side only.

]]>Thanks much. Very enlightening.

]]>Yes, some of the facilities have the capability of on-site generation, or at least I think so; normally only for emergency use, but if the price of electricity spiked prohibitively then I suppose that could qualify, maybe.

]]>Alan,

Thanks, this is great!

Sapsi,

Let’s consider next August, i.e. one year from now. We can check the market price per MWh for buying electricity in that month. (Actually there are high- and low-price periods of the day, but let’s ignore that). We take the market price as a forecast of what the monthly-average price will be if we simply wait and buy at whatever rate actually occurs on each day next August, possibly plus a premium (e.g. maybe the current market price tends to exceed the actual price in a year by 3% or whatever). If we think there’s a premium we remove it, so we end up with what we think is an unbiased forecast of the future price.

We assume the actual price will be distributed around the forecast price. In our case we are assuming the distribution is lognormal. Based on previous data, we have an estimate of the geometric standard deviation (GSD) of the distribution. We choose the geometric mean (GM) such that the arithmetic mean is equal to the forecast price.

Similarly, we have a forecast for the amount of electricity the facility will use next August (also based on fitting a model to historical data), and we have a model for the distribution of actual consumption around the forecast.

We also assume that the errors are correlated, so if the price is higher than the forecast price then the consumption (the ‘load’) is more likely to be higher than lower than the forecast load.

Putting this stuff together, we have a joint distribution of (price, load) next August. We draw thousands of simulations from this distribution and calculate the 95th percentile cost of electricity. If there were no load uncertainty it would be nearly trivial to calculate the effect of buying a hedge of a given size, but since both price and load are uncertain there’s a bit of a calculation. I won’t bother writing it here, you can probably figure it out, or you can look it up.

Actually I have skipped a detail, in the stuff above: you can’t just calculate the cost of electricity by multiplying (average monthly cost) x (electricity used in the month) because the cost varies from day to day, indeed from hour to hour, within the month. Even if the forecast for the average monthly cost were exactly right — let’s say $60 per MWh — the actual cost might be $140 during some afternoons and $25 during mid-morning some days, and so on. If the electricity’s price and the facility’s electric load were uncorrelated this wouldn’t matter, but in fact prices tend to be high when people (and companies) are using the most electricity, so that has to be taken into account. On the other hand, this company has some ability to shift some load away from the high-cost times, so their price-load correlation is lower than it would be otherwise; potentially they can even get it to zero or slightly negative.

So we add one more layer of sampling to the method I described above. That is, we sample from our joint distribution of (monthly-average electric load, monthly-average price per MWh), and then we draw hourly (load, price) that have those right arithmetic means and have the right within-month correlation. It’s these hourly numbers that we use for the actual calculation. This is really just a detail, though; if you understood the calculation at the monthly level, you’ve got the idea.

]]>Dale,

Sorry about the late response. Yes to everything you say above, pretty much. But I think to convert ‘black swan events’ into statistics-speak, I think the point is that the high-cost, low-probability tail can have more probability in it than people usually assume when they make decisions, or perhaps that people explicitly ignore such events to their peril. So one thing we can do is simply put longer tails on our relevant distributions…maybe instead of a lognormal model for price errors (which is what we’re using) we could use a log-t4 distribution or something. But I don’t think that will really do what we want: in the abstraction of our model, there’s this energy market and you buy and sell energy, and pay these prices, yada yada, but if the ‘black swan events’ are not of the type that we’re modeling then the whole modeling paradigm breaks down. Maybe North Korea hacks the electric grid and brings the whole thing down. Or maybe they can’t hack the controls but they hack the record-keeping and make it impossible to know who used how much electricity. There are lots of low-probability, high-consequence events that we are not going to be able to model, no matter what we do with the parameter values.

In short: Yes.

]]>Electricity markets are geographically separate but electricity prices are correlated across markets, and we care very much about that correlation — …not necessarily the correlation coefficient, but the probability that multiple geographies will experience extremely high prices in the same month. Indeed, this is pretty much the whole ballgame! If the markets were uncorrelated, the problem would be pretty easy, there’ s a central limit theorem thing going on.

]]>In this podcast, he talks about you’re issue, and how his group creates solutions. E.g. when advising the Bank of England on risk assessment, they don’t create complicated models; rather, they create simple rules (e.g. fast and frugal trees).

Not only are these “process models” better at prediction, they are something that people can actually understand and use!

]]>Mendel,

You ask “How encompassing can you make your set of correlation models that will spit out synthetic data that “looks like” the realworld data that you have and expect?” That’s the right question, and the answer is that I have no faith that we can do this, largely because we don’t really know what we expect. We can create a model that generates synthetic data that look like the last few years of real data, but that is not nearly enough years to know what the tail probabilities are. What does a 95th-percentile summer look like? We really have no idea: if you go back twenty or thirty years, the markets and the electricity industry were so different that they don’t seem all that relevant. It’s sort of like Andrew’s example that when you’re building a presidential elections model you really only have fifteen or twenty elections to use for calibration, because it’s not like the election of Martin Van Buren in 1836 tells you anything useful about today.

So, yeah, I don’t really think we can build a model that will have the right statistical properties. On the other hand, we can at least give it our best shot, and if we have a model we can at least look at the sensitivity to the uncertain parameters, and look at some ‘worst plausible case’ kinds of things. Whereas if we don’t have a model at all, what are we gonna do? (Actually the default would be to use our single-facility optimizations and just make up a rule for modifying them, based on our intuition about the problem, so it’s not like we wouldn’t be using any formal modeling at all).

Anyway I agree with your reservations.

]]>Herman,

I, too, am worried about whether using something like lognormal distributions with a specified variance-covariance structure will capture the events the company really needs to be protected from. They might work fine for typical events, but I have little faith that they will capture the tail behavior correctly. But I’m not sure what to do with this worry. Those rare events are just that — rare — so we really have no way to know what their statistical distribution is. We can certainly recommend larger hedges than the simplistic model would imply, but how large exactly?

If we don’t use the simplistic model, we need to use some other model…maybe not explicitly, but if we do it with heuristics that is a kind of implicit model too. We’ve gotta do something!

Several people on this thread have suggested this sort of scenario-based approach and it does make sense to me. We’ll consider it!

]]>I’m curious how these models are done.

Thanks much

Saptarshi ]]>

Rahul,

I think you do understand the issue, but maybe are overoptimistic in assuming it would be easy to “passively outsource the risk.” It’s quite easy to do that outsourcing for a single facility, because there are standard market products to do so: to reduce your risk in month m, you can by k kWh at price P for that facility. Easy peasy.

But electricity prices spatially variable and the company has facilities all over the place. There is no single existing product that they can buy, that lets them buy KK kWh at price PP, which they can then allocate as they choose across all of their facilities. All they can do is buy existing products.

I think you’re going to say “right, that make sense, but surely there is a company out there that will create a portfolio of existing products in order to give them the risk profile they want.” And you’d be right, there is such a company: it’s us. That’s what we’re trying to do. There are surely other firms that can do it too, and I suppose if we don’t do a decent job they might go to one of them, but ultimately those other companies will have to do the same thing we do, which is to model the spatio-temporal variability of prices and electric loads (or, more correctly, errors in predicted prices and errors in predicted loads).

]]>Herman,

“As you indicated, you can have 199 days of good trading wiped out by one bad day. These cases are also so rare that I don’t think you can test your model adequately to have any certainty that it behaves well in these cases. Also, due to their nature, each anomalous case is different, even if you account for the factors that created the previous anomaly, it is no guarantee that it will capture future anomalies.”

Yes indeedy. It might be that assuming such-and-such is approximately lognormal will work just fine…until it doesn’t. But the response can’t reasonably be to just assume some ultra-long-tailed distributions (in an explicit model, or implicitly) because, well, how long-tailed should it be? You can’t spend all your time and money to protect against some event that you know is extremely unlikely but you don’t know exactly how unlikely.

In essence: you have correctly understood one of the issues we are facing. Got any suggestions?

]]>Roy,

I think part of the reason for hedging in this case is to keep the electricity expense in a range where it doesn’t have a nonlinear effect. If they budget $x and the expense is $1.2*x, well, they’re out $0.2*x but that’s it. Whereas if they budget $x and the expense is $2*x then uh oh, they have to cut some other budget, or delay some planned expansion, or borrow some money, or something. I’m not really sure, actually, but that’s my impression. So, to connect this to what you just said: I think they are worried about some large unexpected expense (large compared to their liquid assets or available resources or something), which might indeed be what you’ve said is called an “absorbing state”, but I get the impression they’re being fairly conservative about how to define that. I think that if they’re hedged adequately against a 95th percentile fiscal quarter, whatever they mean by that exactly, and they experience a 99th percentile fiscal quarter, that will hurt but won’t be crushing. I hope so, since a 99th percentile fiscal quarter happens every 25 years on average!

But what if there are two 99th percentile quarters in a row? It’s not like they’re statistically independent. For a lot of businesses the current pandemic has put them in exactly that situation, in fact. It happens.

So, yes to your point about ‘each time period’. This is relevant.

]]>As I mentioned in an earlier comment, one thing the ‘specified amount of protection’ can mean is:

For instance the function to be minimized could be Z = E + a*c95, where E is the expected cost, c95 is the estimated 95th percentile cost, and a is a parameter that represents the risk tolerance.

This is not the only way to define the objective function, and may not be the one we choose in the end, but for now this is what I mean when I say ‘specified amount of protection’. With this function, the company is essentially saying they will pay $a to avoid a 5% chance of having to pay $c95 or more.

]]>Kevin,

One thing this exercise has already done is to get the client to think a bit more about exactly what it is they are worried about, and how much are they willing to spend in expectation in order to prevent a given level of potential badness.

And yeah, one possibility is to do something like you’re suggesting: just hedge at the facilities where the risk exposure is the largest (which basically means the price is the most volatile and the electricity consumption is the most uncertain), and then not hedge anywhere else. But of course, as soon as you say that, you realize that you should be able to do better than yes/no: maybe buy 90% of the ‘full amount’ of the hedge at the riskiest facilities, and 50% at the less risky, and so on.

But yeah, I, too, am leaning towards heuristics.

]]>Rahul,

If we knew pretty accurately how much it would cost us to write the model, and we knew pretty accurately how much better its recommendations would be would be than what the company doing now (or than what the company would could do if we put a small amount of effort into simply thinking about the issue some more) then I agree, this would be a pretty easy call. But in fact, although it is clearly going to take “a lot of time” to write the model, I don’t know if that’s a full week or a full month or what. And I don’t know if the recommendations it generates will be just a bit better than what they’re doing now, or a lot better, or I suppose it’s even possible they will be worse.

I agree with this somewhat, but suppose this is a company that owns and rents 100 large office buildings. energy consumption is dependent on the weather and occupant demand. it might be difficult to even figure out what the consumption will be. And consumption may correlate highly with price and demand spikes in the region.

]]>Daniel:

That makes sense.

I guess philosophically I’ve a problem with the overall hedging approach: Companies should actively control risks that fall under their core competencies, and passively outsource risks that they don’t understand (e.g. energy costs) to third parties more competent to model and hedge them.

As a consumer of energy, why not just focus on predicting your consumption, then decide what’s the max price spike that our P&L is willing to bear and finally buy an energy option at that price and be done with it?

This is sort of model complexity creep that leads to disaster I feel. Historically it’s just a tiny step to delude oneself that we have such a good model that we accidentally drift into options-as-speculation territory than using them as merely a hedge.

Basically complex models can lull us into being more confident than is justified, especially considering the likelihood for tail events. e.g. to confidentially cap company-wide consumption at 15% while relaxing the per-company cap is bound to require system-wide / country-level assumptions stronger than justified. Mostly no problem, but a tail event leads to catastrophe. And it is impossible to model these systemic events well from a few years of within-company datasets.

Or perhaps I am not understanding the intricacies of Phil’s modelling approach…..

]]>But do you have to? How encompassing can you make your set of correlation models that will spit out synthetic data that “looks like” the realworld data that you have and expect?

And then, can you devise a hedge buying strategy that will do well against all of these models? I.e. run your hedging strategy not against the one “true” model that you picked, but the space of possible models, and then see how well it works?

It would allow you to get a better handle on the question “what if we’re wrong”, and actively looking to broaden this model space means you’re looking for ways to be wrong instead of trying to find the one way to be right, which may be what you need to do at your current state of knowledge.

Maybe I’m too uneducated and this is already baked into your workflow, in that case, please disregard.

]]>I think the idea is that Phil knows how to solve the problem for each individual location… He can make each location have less than a certain amount of variation in energy costs.

What he can’t figure out without a complex model is how to relax the individual constraint that *each* location has the specified amount of energy cost variation, into a cheaper hedge where the *whole company* has a specified amount of energy price variation at minimal cost.

]]>A company say in India exporting products to the USA is exposed to the risks of dollar to rupee price fluctuations.

The solution is buying forex hedges.

But here’s where the difference in approach lies: as a manufacturer-exporter you don’t try to model forex trends. That’s the job of the financial firm selling you the forex options.

As a exporter all you need to know is how much exposure you are likely to have and what’s your risk appetite.

Any that’s where I find Phil’s approach puzzling.

]]>Isn’t this again ill defined?

What does “specified amount of protection” even mean?

]]>Is Herman really Taleb under an alias? But that is a valid point. I have never worked on exactly this type or problem, but in a previous life did a lot of work on stochastic capital accumulation and consumption models (or equivalently stochastic harvesting models). Policies that are optimal under an expected utility over a given time horizon, are often not optimal when you are concerned about the properties of sample paths, most importantly if there is some return that would act as an “absorbing state” which is basically what Herman refers to. The extreme case is in life histories models, where the returns over time are multiplicative, so even one zero (or the equivalent of some low value that has the same effect) blows up all the other returns. Even to say that the policy provides “the specified level of protection” you have to be very careful if that is the expected level of protection or some actual property of the sample paths. Or to put it another way, the difference between solving a problem for the expected risk or a problem where at each time period the probability of the undesirable event is below a given level. The former problem is usually doable, the latter problem is quite hard.

]]>Yes, writing the model on paper is going to happen anyway. But coding it up and getting it to converge is a much bigger task.

I think I’ll start by coding a toy problem that has some of the key characteristics. Maybe it won’t be as hard as I think.

]]>Yes, I like the idea of at least starting by looking at some specific scenarios.

I think you have captured the flavor of my concerns by distinguishing between uncertainties (and other parameters) we can estimate and those we can’t.

]]>“Optimizing” in this case means buying hedges that provide the specified amount of protection against price spikes. That’s the whole point of the problem!

]]>Good points nonetheless.

]]>Wow. Lots of spot-on stuff in three succinct paragraphs! Maybe you need to repeat this message about once a week to help keep us all in touch with reality.

]]>Yes to your first couple of paragraphs. Actually I think the model that we are contemplating should be useful for a long time, but due to continuing changes in the markets and the company’s operations the input parameters are never going to be estimated with decent precision.

My gut feeling is that you are right and we will do just as well with a simpler approach.

]]>It is indeed a standard model and we are applying a standard solution…when applied to a single facility for a single well-defined time period. What makes this non-standard, at least as far as I know, is the multi-month, multi-facility optimization. If the goal is to avoid exceeding their electricity budget by more than 20% in a given quarter year at a specific facility, with 95% certainty, that’s standard, we know how to buy hedges to handle that.

But if the goal is to avoid exceeding their company-wide electricity budget by 20% it gets more complicated. Obviously one way to attain this goal is to apply it to each individual facility: if no facility exceeds 20% over-budget then obviously the sum over all of them will also be acceptable. But if you do it that way then you are hedging more than you need to: it’s unlikely (though not impossible!) that all of these geographically dispersed facilities are going to face exceptionally high energy costs at the same time.

I guess I’m just repeating myself.

]]>That’s why I’m a fan of scenario analysis, at least as a first step. The less understood uncertainty is represented as a set of representative values or constraints, and you see how the model responds to each. This can also suggest which scenarios are potential black swans with dominant impact over a long sequence of outcomes — if you can even construct scenarios for them. (But you have a better chance of doing this as an ad hoc exercise than by looking for tail outcomes in a model intended to be applicable generally.)

I know nothing about energy markets, so it could be that none of this applies.

]]>Great comment.

The central question: do you want to optimize – in which case your model opens the risk that the optimization will periodically fail and destroy it’s accrued value – or protect against spikes?

]]>“The goal is to find the optimal set of ‘hedges’ ”

What’s confusing is that it’s not clear what makes your problem different than the hedging problem that all kinds of commodity consumers have to solve on a daily basis.

So it seems like a common hedging problem that occurs in different flavors in all kinds of businesses, from energy to hog bellies.

Seems like the question you’re being asked is: is there some way to make a major leap in modelling beyond the standard hedge model already available on the market? Unless you have some new insight into the problem that’s not recognized by probably thousands of other companies and organizations trying to do the same thing, the answer is probably: no.

Don’t write the model.

]]>One other issue is lurking in the background. As the model becomes more complex (hence, more realistic), the danger of tunnel vision increases. There are always some unquantifiable (and barely identified) risks, and these are easy to ignore when the model is complex, but less so when the model is simple (although that danger never disappears). Such “black swans” pose a real challenge. Did you model include the next pandemic? For me, the most important insight from Taleb’s work has been to be alert to the fact that the most serious uncertainties are probably not modeled at all. In other words, what gets included in the model is generally the least consequential factors!

I think my last statement is debatable, and perhaps wrong. But I don’t think it is easily dismissed. Decision-making remains an art, and if these considerations were not important, then I think you would not have been hired to do the analysis for this company. Without needing to make such judgements, an algorithm will always perform better. But (thankfully, I believe) the world remains sufficiently uncertain that decisions about how much detail, what uncertainties to include, how to communicate with decision-makers, etc. remain decisions that humans must make.

]]>Does the company have the ability to modulate its consumption significantly? Can it resell electricity that it bought a while back? if so it seems that you constantly have to choose not just what to buy but also what to plan to consume and what to sell. the planning to consume part might well be the most important portion of the model as this involves altering business operations and has unique components well beyond what a pure trader deals with. To me that’s where the modeling gold is likely to lie. it’s also even more interesting of the client generates, such as from solar installations or as a byproduct of certain operations (cogeneration).

]]>There’s a certain cost to writing the model. On the other hand, you can probably estimate how uncertain are these parameters and when fed to the model how uncertain would be the outcomes.

e.g. Is the effort going to cost $100,000? What’s the 95% CI you expect on your MWhr forecasts. Is it +/- 1%? 5%

I realize that the exact answer will only be available post model but surely you must have some estimates?

PS. Isn’t this rather strong to say: “We know how to write the model and we know how to choose the optimum purchases conditional on the model.”

If you really know all this accurately, then the question is kinda moot. How much money do you save them and how much consulting fees will you be charging them?

What’s the cost of maintaining status quo? If you pay as you consume (no hedge) how large is a black swan event loss? If I have a 1% chance of a 100M USD loss and your consulting fees are $100k its a no brainier to go ahead and model.

Well actually, the status quo may not be a “no hedge” but how much better is your model over whatever hedge the company may do heuristically anyways.

]]>The best solution depends on the company’s exposure, of course, and to what extent DR etc. can mitigate risk. I assume that it can’t, otherwise you would not have the problem.

The assumption is often that the trader has a monthly “premium”, whereas the model is “cheaper” to operate. However, models of such complex and rapidly evolving systems tend to be a lot of work and require continuous adjustment. So they are not necessarily lower maintenance. At best they are valuable, high-maintenance inputs to an expert.

In my experience, models with such variance-covariance matrices tend to make money here and lose money there. Each model is different, of course, but in the ones I’ve done, the false-positives and false-negatives (opportunity costs etc.) have cancelled out the good decisions. It isn’t that half of the decisions are good and the other half bad. It is that the bad ones are so much more expensive than the good ones are profitable. In the business-as-usual case, the model might do as well as an expert trader, or even better. But the anomalous cases you want to protect against are ones that cannot be captured adequately by a model, and there you might lose big. As you indicated, you can have 199 days of good trading wiped out by one bad day. These cases are also so rare that I don’t think you can test your model adequately to have any certainty that it behaves well in these cases. Also, due to their nature, each anomalous case is different, even if you account for the factors that created the previous anomaly, it is no guarantee that it will capture future anomalies.

]]>The goal is to find the optimal set of ‘hedges’, I.e. advance purchases of electricity at market prices, in order to minimize an objective function that takes into account both the expected electricity cost and the cost of an unusual event such as a 95th percentile spike in prices. For instance the function to be minimized could be Z = E + a*c95, where E is the expected cost, c95 is the estimated 95th percentile cost, and a is a parameter that represents the risk tolerance. Here E is the expected cost for a set of months and a set of facilities, not a single month at a single facility.

At a given moment, for a given facility, there are market prices for electricity any number of months in advance. The price for a given month for a given facility can be thought of as a forecast for what the price will be when the time comes. The errors in the forecast prices at different facilities are correlated — if the forecast is too low at one facility it’s likely too low at others — but the correlations are very poorly estimated from the data available. Also, for each facility we have a forecast for the number of MWh they will need in each future month. These forecasts are uncertain and the errors are correlated across months and facilities but these correlations, too, are poorly estimated.

We need to decide, every month, how much electricity to buy 1, 2, 3, 4, …, up to say 12 months in advance, at each facility. So, for instance, we could decide this month to buy 800 MWh at Facility A for September, 700 MWh for October, 700 MWh for November, etc., and similarly for Facility B and C and D and E and so on. Next month maybe we should buy some more at Facility A for November but not for October, or whatever. We are looking for a method of making these decisions.

But this is not what I am asking about. We know how to write the model and we know how to choose the optimum purchases conditional on the model.

What I’m hoping for is some insight on whether to bother. It is going to be a bear to write the model and to do the optimization, and the decisions are going to depend on a lot of very uncertain parameters.

There are some problems for which it is clearly not worthwhile to write a model. There are other problems for which it clearly is worthwhile. With this problem It is not clear to me in either direction. I can’t think of any way to be sure what we will get out of the model until we try it, but my gut feeling is we won’t get much. But I could be wrong. And the alternatives aren’t great either. What to do, what to do, that’s my question.

]]>Why are we not framing the problem this way?

Or: How can we do better than this without making very strong and probably wrong assumptions about the robustness of the national energy market?

]]>Seems to me that you are trying to solve an underwriting problem. Whereas what’s important to the consumer company is different metrics.

The model that is useful to an options issuer will be quite different to the one required for an options user ( as a hedge). The first problem is much more difficult than the second.

]]>Maybe you can restate the precise GOALs of your modeling exercise. I believe that’s the cause for the confusion.

]]>That suggests to me that even if you can put together a reasonable multi facility and month model, it might have a limited useful life.

The simpler approach may be more durable for a longer time period.

I guess the suggestion is to think about what it would take to break the simple model or the complicated model.

]]>Then you can at least triage by the probability a facility or set of related facilities might cross that threshold. Obviously, I’m arguing for a heuristic approach here, but in a somewhat systematically defensible way. Coming up with the systematic heuristic is some work, but not as much as a global optimization project, so might serve as a middle ground.

You could also doublecheck this against what you elicited from an expert. This seems like a reasonably cost effective way to generate two points of comparison.

]]>