-
-
Configure fleet volume, budget, hedge ratio, market assumptions, and simulation settings before running the model.
-
Compare deterministic costs, savings, budget impact, and key metrics across five fuel-risk strategies.
-
Run 10,000 Monte Carlo scenarios and compare expected cost, VaR, CVaR, and budget-overrun probability.
-
Review the recommended strategy, business action, key trade-offs, and an AI-generated management explanation.
-
Load U.S. diesel data from EIA and futures prices and volatility from Yahoo Finance, with source details shown.
Inspiration
I was interested in investing and trading. During this time, I learned about the fuel-hedging strategy used by Southwest Airlines. The company used financial specialists and hedging instruments to reduce the effect of fuel-price changes on its costs.
This made me think about small and medium-sized transport companies. These companies also depend strongly on fuel prices, but they usually cannot hire their own team of traders, risk managers, and derivatives specialists.
I had an idea to create a simple decision-support tool that could help a fleet operator:
- measure fuel-price risk;
- compare several hedging strategies;
- estimate their effect on fuel costs and the company budget;
- understand the main advantages and disadvantages without deep financial knowledge.
For a long time, I thought this idea was too difficult for me to build on my own. When advanced AI models such as GPT-5.6 and development tools such as Codex became available, I decided to try to turn the idea into a working software product.
What It Does
US Fleet Fuel Hedge Simulator helps transport companies model fuel-price risk and compare five approaches:
- Remaining unhedged
- Using a fixed-price supplier contract
- Hedging with futures
- Buying call options
- Using a collar strategy
The user can enter:
- expected fuel consumption;
- current fuel price;
- budget fuel price;
- planning period;
- annual volatility;
- hedge ratio;
- futures price;
- option strike prices and premiums;
- confidence level;
- number of Monte Carlo simulations.
The application calculates costs for a selected price scenario. It also simulates many possible future fuel prices and compares the expected cost and risk of each strategy.
For example, the unhedged fuel cost is calculated as:
$$ C_{\text{unhedged}} = Q \times S_T $$
where:
- Q is the required fuel volume;
- Sₜ is the future fuel price.
The simulator also calculates:
- expected cost;
- cost at the selected percentile;
- Value at Risk (VaR);
- Conditional Value at Risk (CVaR);
- probability of exceeding the fuel budget.
The application can load U.S. diesel-price data from the EIA. It can also load futures-price data and calculate historical volatility using Yahoo Finance data.
The application shows a recommended strategy, a suggested business action, and an AI-generated explanation for management.
How I Built It
First, I discussed the idea and possible ways to build it with GPT-5.6.
I used GPT-5.6 to help me:
- describe the business problem;
- identify the target users;
- understand and check the financial logic;
- write functional requirements;
- define expected results and acceptance criteria;
- choose a suitable way to build the application.
I then used Codex to develop the application step by step.
The project was built in the following order:
- Basic fuel-cost calculations
- Fixed-price supplier scenarios
- Futures hedging
- Call-option hedging
- Collar strategies
- Deterministic price-change scenarios
- Monte Carlo simulation
- VaR and CVaR metrics
- External market-data integrations
- Strategy recommendations
- AI-generated management explanations
- Streamlit user interface
- Automated testing
- Deployment to Streamlit Community Cloud
The application was built in Python. Its structure separates:
- financial calculations;
- simulation logic;
- risk metrics;
- external data integrations;
- recommendation logic;
- the Streamlit interface.
This structure makes the calculations easier to test. It also helps to keep the business logic separate from the user interface.
How I Used OpenAI Tools
I used Codex through the VS Code extension.
Codex helped me:
- implement new features;
- improve and reorganise the code;
- create automated tests;
- find and fix errors;
- work with Git branches and pull requests.
I used GPT-5.6 to define and review the product logic. It also helped me check the meaning of risk metrics, find edge cases, and improve the requirements and acceptance criteria.
Because this was my first software-development project, GPT-5.6 also explained unfamiliar technical decisions and helped me understand the next steps.
The management-explanation feature in the deployed application uses GPT-4.1-mini through GitHub Models.
All financial calculations, simulations, recommendations, and risk metrics are calculated in Python. The language model only explains results that have already been calculated. It does not calculate the financial values itself.
Challenges
The main challenge was that this was my first experience of building a complete software product.
Many parts of the development process were new to me:
- application architecture;
- Python project structure;
- choosing a Python version;
- virtual environments;
- dependency management;
- choosing libraries;
- automated testing;
- user-interface technology;
- external API integrations;
- deployment.
For example, I needed to understand why Streamlit was suitable for this analytical MVP. I also needed to learn how to separate the financial calculations from the interface and how to make the results repeatable with automated tests.
Another important challenge was checking the financial logic.
Futures, options, collars, and fixed-price contracts have different costs, payments, and risks. However, the application must compare them using the same fuel volume, market assumptions, and simulated price scenarios.
A small error in a sign, unit, hedge ratio, premium, or payoff formula could produce a result that looked reasonable but was incorrect.
For this reason, automated testing became an important part of the project. I added each strategy and risk metric separately and checked it against expected results.
External market data also created some difficulties. A data source can be temporarily unavailable or return incomplete data. Market prices may also be different from the actual price paid by a transport company.
For this reason, I kept manual inputs in the application. The simulator can still work even when an external data source is not available.
What I Learned
This project was my first serious experience in software-product development.
Before this project, my main experience was in business analysis, transport operations, process improvement, financial analysis, and data analysis. I had never taken an application from an initial idea to a working and publicly available MVP.
Almost every technical part was new to me:
- creating the structure of a Python project;
- using virtual environments;
- managing dependencies;
- writing automated tests;
- using Git branches and pull requests;
- building a Streamlit interface;
- connecting external data sources;
- deploying a web application;
- separating the application into modules.
OpenAI tools made this process easier to understand. I was able not only to create working code but also to learn why different decisions were made, how the parts of the application worked together, and how I could check the results.
I also learned that AI-assisted development still requires clear human responsibility.
A domain specialist must define:
- the business problem;
- assumptions;
- requirements;
- acceptance criteria;
- expected results;
- edge cases;
- validation rules.
Codex can do a large part of the implementation, but it still needs clear instructions and testable expected results.
My main conclusion is that a domain specialist can use GPT-5.6 and Codex not only to generate separate pieces of code. These tools can help a person move step by step from a business idea and requirements to a working software product.
Result
The result is a publicly available decision-support application.
It allows fleet operators and business managers to:
- enter operational and market assumptions;
- load external market data;
- compare five fuel-risk strategies;
- run deterministic and Monte Carlo scenarios;
- compare expected cost, VaR, CVaR, and budget-overrun probability;
- review a recommended strategy;
- generate a management-oriented explanation.
The project combines my experience in transport and business analysis with financial risk modelling, Python development, automated testing, external data, and AI-assisted development.
It shows how a business analyst with industry knowledge can use OpenAI tools to turn a specialised business idea into a working analytical product.
Disclaimer: This application is an analytical and educational prototype. It does not provide financial or investment advice.
Log in or sign up for Devpost to join the conversation.