Cu & Al Inventory Signal System
An automated daily signal system that scrapes LME and SHFE warehouse inventory and price data for Aluminium and Copper, generates BUY/SELL trading signals based on global stock flow, and emails them as a formatted HTML report — entirely serverless.
The Challenge
Copper and Aluminium prices are heavily influenced by global warehouse inventory levels at the London Metal Exchange (LME) and the Shanghai Futures Exchange (SHFE). A commodities trader needed a daily system that would automatically:
- Retrieve the latest inventory and price data from both exchanges
- Analyse the direction of global stock flow (draw-down vs. build-up)
- Generate a clear BUY or SELL signal for each metal
- Deliver a clean, readable daily report directly to their inbox — with zero manual effort
The solution needed to be serverless, maintenance-free, and run automatically every day without any infrastructure overhead.
The Solution
I built the entire system using Google Apps Script — a serverless JavaScript runtime that runs on Google's infrastructure with built-in scheduling, allowing the system to run daily at a set time with zero hosting cost.
- Data Scraping: Automated HTTP requests to LME and SHFE data endpoints to retrieve live inventory and settlement price data for Copper (Cu) and Aluminium (Al)
- Signal Logic: Compares week-on-week inventory changes across both exchanges; generates a BUY signal on inventory draw-down (bullish) and a SELL signal on build-up (bearish), with combined global stock flow weighting
- HTML Email Report: A professionally formatted HTML email with colour-coded signal indicators (green/red), inventory change tables, and price data — delivered automatically every morning
- Scheduling: Google Apps Script time-triggered execution — runs every weekday at a set time with no server or cron job required
The Results
The trader now receives a clear, actionable BUY/SELL signal report every morning before markets open — with full inventory data context — without touching a spreadsheet or visiting any exchange website. The entire system runs for free on Google's infrastructure.
Tech Stack
Need a Commodity Intelligence Tool?
I can build automated market signal systems for any asset class or exchange.
Get in Touch →