5 ms·
Show HN: I simulated closing the Strait of Hormuz on real oil trade data
OP here: I created this visualization tool as the byproduct of a supply chain class I taught at Columbia. The pedagogical exercise grew into a full blown visualization and paper about global oil trade.
The model:
The mechanics are the same as the financial network Eisenberg-Noe: Instead of banks, every country consumes oil interconnected via bilateral trading. Shocks propagate throughout the network, depleting oil reserves when bottleneck nodes (such as the Strait of Hormuz) are blocked.
Insights:
The interesting part is the mechanics of how the crisis unfolds: for example, France receives 0 oil from Hormuz directly, yet their reserves are depleted faster because other countries reactively increase their safety oil stock, increasing oil price, making stockouts more expensive for everyone.
The model also gives price dynamics which are interesting on their own: the price increase is not immediate, it follows sequentially as countries reserves deplete.
Some caveats:
1. For producer nodes, depletion means their export slack is reduced/exhausted.
2. No sanctioned trade (UN Comtrade data)
Technical Details:
The visualization is 600 lines of flask plus js frontend (LLM assisted visualization with ground-truth matching the original numerical exercise of the paper)
Paper with proofs/theory:
https://arxiv.org/abs/2607.17491 https://arxiv.org/abs/2607.17491
- deleted 3mo ago[deleted]
- HarHarVeryFunny 3mo agoWhat concrete predictions does your model make? What developments in pricing/other would indicate that your model is wrong or incomplete? Nice website regardless, but I'm a bit skeptical that the dynamics of the global oil/energy market can be accurately predicted.
- eliotho 3mo ago>What concrete predictions does your model make? Well, the model is less of a prediction and more of a stress testing tool. But under the hypothetical closure scenarios it shows the timing the oil reserves of distant countries exhaust, as well as the systemic effects on pricing (the France paradox). >What developments in pricing/other would indicate that your model is wrong or incomplete? The model has a stylized way of incorporating pricing as a function of the total supply. In practice, when countries ration their oil that's beyond the scope of the model. That being said, the implied pricing trajectory is estimated and could be tested (the staircase graph showing prices constant while countries absorb the shock with their reserves and rebalanced whenever there is a reserve depletion). >Nice website regardless, but I'm a bit skeptical that the dynamics of the global oil/energy market can be accurately predicted. Thank you! Indeed, but I think having at least a stylized testing tool might be useful for policymakers :$ (assuming decisions are ever data-driven lol)
- bragr 2mo ago>In practice, when countries ration their oil that's beyond the scope of the model. Does your model assume that demand is constant regardless of price? We're already seeing a reduction in demand over the last several months. https://finance.yahoo.com/energy/articles/global-oil-demand-dropping-us-211342726.html?guccounter=1 https://finance.yahoo.com/energy/articles/global-oil-demand-...
- toomuchtodo 2mo ago> China's decrease of 1.5 million barrels per day, representing a 9% decline, was by far the largest globally, the report said. Some global demand destruction is occurring, but that of China is them switching to large internal strategic reserves. https://youtu.be/BkA0bkb6ZO0 https://youtu.be/BkA0bkb6ZO0 (whole video is worth the watch)
- eliotho 2mo agoAnd this is what the model price formation assumes, and in fact, the silent mechanism that makes the crisis worse. Reserves silently deplete for each country, and each epoch where they exhaust is when the price rebalancing occurs IN A SUDDEN SPIKE, affecting other nodes that are not even connected to Hormuz, which is one of the conclusions of the paper. Either directly or indirectly all countries feel the pain: the question is who can stand the game of chicken the longer before intervening
- toomuchtodo 2mo agoThe suspense is terrible, I hope it lasts. Great work on the project!
- eliotho 2mo agoThank you! Much appreciated. On the suspense, we are all riding the same train :$
- 2mo ago
- maxerickson 2mo agoIt's making crude predictions.
- largbae 2mo agoBa dum bum... Tssss
- deleted 2mo ago[deleted]
- refulgentis 2mo agoI really do appreciate the effort but the data doesn’t reflect current conditions, and it’s falsified given it’s been virtually closed for months, certainly the same as 30% throughout that is the models default parameter, and we didn’t see ex. prices at $150/barrel 3 weeks in, or a host of other things it predicts. EDIT: I’m not saying it doesn’t matter the strait is closed - it does! - it’s just, what are we to do with a model that generically tells us oil barrel prices is at $150 3 weeks in, when we are months in?
- eliotho 2mo agoThat's kind of the point because it hasn't been totally 100% closed. There's both sanctioned and unsanctioned oil flowing, which is the point of the scenarios in the simulation. Also it's more of a simulation/stress tool at a sustained closure than a prediction one
- rtpg 2mo agoThe thing I've heard now in several places is that China is drawing down its massive secret stockpile (its _greatly_ reduced imports) which counterbalances a huge amount of this I do generally agree that the theoretical model being _this_ misaligned with the reality in front of us feels a bit hard to use
- eliotho 2mo agoThat's actually the intended behavior: while reserves are silently being spend is when the crisis is brewing. Although the main point is that nobody knows China's reserves, but this allows to calibrates scenarios based on what you believe is plausible
- firasd 2mo agoVery interesting. Here in India people were very concerned about potential cooking gas shortages (LPG) when the disruptions began which is also a good example of usually-overlooked dependencies on the the Strait
- eliotho 2mo agoand the interesting thing is that the common factor is that all these crises (oil, financial, gas) spread silently until a node collapses and there is a domino effect over the whole network
- tolciho 2mo agoOne might wonder whether the Late Bronze Age collapse had similar (copper, finance, tin) reasons for going the way it did.
- doctorwho42 2mo agoMan those sea people closing the straight of Ur!
- kingjimmy 2mo agoAre emergency stockpiles calculated correctly? China should not be the first to be exposed.
- eliotho 2mo agoFor the importer nodes those are IEA mandates. In the specific China case, the UN Comtrade data doesn't report sanctioned oil (Iran)
- repeekad 2mo agoChina hides its stockpile numbers, and estimates are only what we can see. After buying loads of sanctioned oil for stockpiles, they are perfectly positioned to take advantage of trumps blunders in the straight and likely will get to set the price of oil if they aren’t already..
- eliotho 2mo agoWhich is the interesting game-theoretic aspect of the whole conflict. China really hasn't revealed their hand
- sebzuddas 2mo agoWhat modelling approach are you using, and where can I learn more about it? Really cool, btw.
- eliotho 2mo agoThanks, the modeling is similar math to the financial banking networks paper by Eisenberg and Noe Systemic Risk in Financial Systems (used as a stress tool by regulators after the 2008 financial crisis). My adaptation is combining this with the inventory management part in my article: https://arxiv.org/abs/2607.17491 https://arxiv.org/abs/2607.17491
- tamimio 2mo agoBut in reality this won’t happen, because China won’t be happy and will force Iran to a deal like last time or they will lose all the parts and intelligence tech they are providing to them.
- eliotho 2mo agoExactly, which is what makes the simulation interesting because nobody really knows China's reserves clock. But with the tool, you can put your guess number and see that the game of chicken also has an expiration date for them
- upcoming-sesame 2mo agoCan't Iran be selective and only allow Chinese ships through?
- eliotho 2mo agoThis is a nice idea. I will build this a feature on the scenarios menu. And it would give an estimate of how much time doing this buys China under different configurations
- chairmansteve 2mo agoThe USA could block Chinese ships. Or maybe disable the loading jetties.
- eliotho 2mo agoThis works as the same feature reversed. Will think of a way of adding something like this
- DANmode 2mo agoAh yes, open war with a superpower. Why haven’t the USA done that already? It’s so obvious!
- elzbardico 2mo ago
- runlaszlorun 2mo agoVery cool. I'll def check this out more later on.
- eliotho 2mo agoMuch appreciated, server seems to be (fingers crossed) going strong so far
- Normal_gaussian 2mo agoI don't know if I'm doing something wrong, but if I set Capacity Retained to 100% then no matter what I set the other values to a bunch of countries deplete their reserves. This feels wrong; but I'm inclined to think I'm missing something.
- eliotho 2mo agoFair point. Actually this is both a semantics oversight on my part and also expected behaviour. at 100% retained there's no shock, but the model's countries target consumption plus a large safety buffer, and some can't fill that target even in peacetime, so they draw reserves at baseline, the shock scenarios show the additional damage relative to that baseline
- entropie 2mo agoGood stuff. Maybe you can make a playback speed option for the simulation/play button? I fail to follow up.
- eliotho 2mo agoThank you. Yes, in desktop there is one (that might still be going a little bit too fast), but in mobile it might not be that easy to find. Perhaps I will slow down the speed in mobile by default and change the location (should be in the bottom right corner, the 2 wk/s can be changed to 1 wk/s)
- anigbrowl 2mo agoAn interesting fact to consider is that the US stockpile (the Strategic Petroleum Reserve) is reported as the total of sour (high sulfur) and sweet (low sulfur) crude oil. The sweet stock makes up about 1/3 of the reserve and hardly varies at all. This is because US refineries are virtually all configured for sour crude: due to a mistaken belief in the 1990s that sweet crude was running out, the industry bet the farm on sour crude refining, and if sour crude runs low, it's extremely economical to switch. As a result, almost all the draw from the SPR is of sour crude (currently ~5 million barrels/week). However, you can't just use up all the reserve because as levels get lower brine must be pumped into the storage chambers to retain pumping pressure, and the more brine that is pumped, the more the output quality declines. The weekly reports indicate a total in the SPR of about 300mbb, of which ~100 are sweet and 200 sour. But for the reasons above, output becomes unusable one the sour levels fall to ~140-150mbb, at which point there is almost certainly a severe diesel supply shock. At current drawdown rates, that would be sometime around October/November, right in the middle of harvest season when demand for diesel is highest. There's more complexity to this than I want to type out in a HN comment, but not that much more. Draw your own conclusions.
- kccqzy 2mo ago> would be sometime around October/November, right in the middle of harvest season Right in the middle of election season.
- actionfromafar 2mo agoRight in the middle of "election" season. FTFY.
- neilellis 2mo agoYou guys still having elections?
- specproc 2mo agoThis could well be the last one for a while
- deleted 2mo ago[deleted]
- Simulacra 2mo agoThis is very interesting, and it shows why the Strait is urgently in need of a back up. I don't know what that would be or what would be feasible, but I've seen a lot of people talk about an underground pipe.
- zer00eyz 2mo agoThe saudis built a pipeline across their nation, and are exporting over 5million barrels (a large increase). There is a great bit of coverage on this by "what's going on with shipping" here: https://youtu.be/r0EvQgLcjMw?t=172 https://youtu.be/r0EvQgLcjMw?t=172 It does not look like this data is part of the paper above.
- walrus01 2mo agoExporting oil from the west side of Saudi Arabia works until some armed group like the Houthis with drones/missiles places a credible enough threat at another chokepoint that the ships won't go. The choices are then to find a way to get the Houthis to chill out, or use enough military force to cut off the Iranian support for the houthis, or use military force to be confident you have destroyed the houthis' ship attacking capability. https://en.wikipedia.org/wiki/Bab-el-Mandeb https://en.wikipedia.org/wiki/Bab-el-Mandeb https://www.bbc.com/news/articles/cn0n127lpzgo https://www.bbc.com/news/articles/cn0n127lpzgo
- eliotho 2mo agoFair catch, the data predates the reroute. Although this pipeline is routed to Bab-el-Mandeb which is in the network
- kccqzy 2mo agoNice that you allowed readers to customize the parameters! I personally thought the demand demand elasticity was too low and I was able to adjust it.
- neom 2mo agoTangentially related but just watched this pretty interesting youtube mini-doc-thing about the recent moves China has been making regarding oil (and its bigger picture): https://www.youtube.com/watch?v=BkA0bkb6ZO0 https://www.youtube.com/watch?v=BkA0bkb6ZO0
- sebmellen 2mo agoThat video was masterfully done, and it’s shocking how quiet the mainstream and financial media has been about this topic. Everything is an AI chip story, and the looming oil crisis is completely under discussed because we have goldfish memories and can’t appreciate what a massive move China made.
- conductr 2mo agoIt won’t be a proper crisis if we knew it was coming, media will go full tilt when they actually see and feel it and They’ll act like it came out of nowhere. Until then, did you hear Taylor Swift got married!?
- rootsudo 2mo agoNot quiet, it's on the front page of reuters and other reputable news for the past two weeks essentially. People are not noticing/caring to notice. And yes the youtube video is masterfully done IMO. I'm happy I caught it when It was first uploaded.
- tclancy 2mo agoClicked it and was greeted by a YouTube ad opening “How the fuck am I going to get a big dick from eating gelatin?” And then the woman in scrubs on the cowboy’s front porch explained it all to him. It’s nice because it ensures I’m never going to get over-smart from watching YouTube. Plus I gotta go get some Jell-O.
- slilo 2mo ago> Plus I gotta go get some Jell-O. Don't forget to post a Show HN success story.
- Haven880 2mo agoThe biggest missing piece is China. Assuming actual delivered price is not subsidized by Western countries, you need to put in what if China demands that reflect the current price. Chinese in reality don't consume that much oil as what we thot they do from the oil purchases in the past. I assume Chinese just ramp down the purchase even though their consumption is well below that. Plus the hidden supplies from Iran and Russia to China via land route.
- baxtr 2mo agoSomeone shared a video on this above: https://news.ycombinator.com/item?id=49043797 https://news.ycombinator.com/item?id=49043797 Another crucial element is land transport. The Gulf countries have developed a fleet of trucks to help offset some of the crude oil passing through the Strait.
- wtmt 2mo agoOP, please add India as a shock target option if possible. It imports close to 80+% of its crude oil and gas requirements and is highly vulnerable to oil flow shocks.
- eliotho 2mo agoThanks, added to list of possible UX improvements
- bagels 2mo agoWhy do reserves deplete with 100% of the strait open?
- defrost 2mo agoIf the strait were to suddenly fully open <now> then reserves in (say) Singapore would continue to deplete until an oil ship or three reaches Singapore, which may take a while.
- amluto 2mo agoAlso, reserves do not magically refill until their operators decide to pay to refill them, which competes with ordinary non-reserve demand.
- a3w 2mo agoSomething seems to be wrong with the simulation: some countries run on reserves, and out of them, even with 100 % delivery. OP blames "Market elasticity parameters" for that, but they should offer a reasonable reset, or shouldn't they even oversteer towards filling up tanks, not clearing them out of no supply shock is seen?
- eliotho 2mo ago[dead]
- tonyx1998 2mo ago[flagged]
- molticrystal 2mo agoMaybe I missed it looking over the paper, or maybe they are implicit, but are you taking into account Saudi Arabia’s East-West Crude Oil Pipeline (Petroline) , I believe it does about ~7m bpd and Habshan-Fujairah (Abu Dhabi Crude Oil Pipeline / ADCOP) about ~1.5m bpd? If not you might be underestimating things, though they do take a bit of a warmup to get into capacity, and can't match completely Hormuz's flow.
- eliotho 2mo agoThis pipeline predates the data but its oil is routed to Bab-el-Mandeb which is in the network. That being said, the numbers are more of a sensible baseline as the actual flows for many countries are unknown/sanctioned.
- larsien 2mo agoThis is really interesting. Investment firms could incorporate this kind of simulation into their products.
- eliotho 2mo agoYes, and the network setting is flexible enough to allow smaller supply chains where nodes don't have price setting power
- latentframe 2mo ago[dead]
- ck2 2mo agobtw this website tracks actual ships passing though (vs not) click on YTD for the shock of what's coming by the end of this year 100+ per day vs 5-10 per day, you can see the tiny cease-fire and when it ended * https://en.macromicro.me/charts/94482/imf-strait-of-hormuz-number-of-ships-and-transit-volume https://en.macromicro.me/charts/94482/imf-strait-of-hormuz-n... * https://i.imgur.com/fDmbaPa.png https://i.imgur.com/fDmbaPa.png oh and Strategic Oil Reserve is about to bottom out to the point where any lower brings permanent damage, imagine this going on through 2029 because you cannot "bomb your way to peace"
- mhh__ 2mo agoHow much of the paper was written with AI?
- eliotho 2mo agothe models, proofs and writing are mine (with some AI assistance for proofreading/formatting). AI was mostly used in the visualization and the rerunning of multiple scenarios of the numerical examples
- NooneAtAll3 2mo agodid you model rapid decrease of oil import by China?
- eliotho 2mo agoit came from the data (UN Comtrade) that notably doesn't include sanctioned oil flows (Iran, etc). On top of that, China's reserve levels are a state secret, yet, the model's framework is BYOD (Bring Your Own Data) which gives the depletion timeline for free. Also, the model is more of a sensible baseline than a prediction
- CzaxTanmay 2mo agoIt's good
- tdu01 2mo agoNice. How does this stand up against backtesting with recent data? Also, i thought China's emergency stockpile is about 1.4b barrels or close 5 months of domestic consumption, and they are building it up atm. In the sim, it shows China's stockpile depleted after 1.2 wks?
- eliotho 2mo agoThanks! Two answers (repeated in other comments): UN Comtrade data doesn't include sanctioned oil (Iran), and nobody (except their government) knows China's actual stockpile. The model is more of a sensible baseline/stress testing tool than a prediction, the cool part is that anyone can BTON (bring their own numbers) and rerun their scenarios