Case Study · Freelance Client · Data Engineering

EGX Portfolio Valuation Warehouse

A daily-automated valuation system for a multi-owner Egyptian Exchange equity portfolio, built for a private client: scheduled scrapers → Google Sheets → BigQuery warehouse → SQL models for per-owner wallet values, dividends, and corporate actions.

Google Apps ScriptBigQuerySQL Modeling Web ScrapingFinancial DataAutomation
case scorecard — structural factsrunning daily
9
EGX tickers scraped daily
3
BigQuery tables — prices, portfolio, symbols
~12
tabs in the modeling workbook
daily
fully automated on time-based triggers

Client confidentiality: no owner names and no portfolio values appear anywhere in this case study — the pipeline is the story.

01The Business Problem

A family-held equity portfolio on the Egyptian Exchange, split across multiple owners, was being valued by hand: look up each stock price, multiply by each owner's shares, adjust for dividends and corporate actions, repeat. Slow, error-prone, and always out of date — and EGX corporate actions (bonus shares, capital increases, subscription rights) quietly change share counts if nobody models them.

The goal: every owner's wallet value, correct and current, every day, with zero manual work.

02The Pipeline

mubasher.info
daily last-prices · 9 EGX tickers
Apps Script Scraper
Cheerio · time-based trigger
Google Sheets
~12-tab model · dividends · corporate actions
BigQuery Warehouse
stocks.prices · portfolio · symbols_info
SQL Valuation Models
per-owner daily wallet = Σ(price × shares)
Per-Owner Dashboard

03What I Built

Scheduled Ingestion

A Google Apps Script scraper (Cheerio) pulls daily last-prices for 9 EGX tickers from mubasher.info into a Google Sheet on a time-based trigger — running with a clean error record.

Warehouse Load

Upload jobs stream the Prices and Portfolio sheets into BigQuery (stocks.prices, stocks.portfolio, stocks.symbols_info) via the Tabledata.insertAll API, also on triggers — spreadsheet convenience in front, warehouse rigor behind.

Valuation Modeling

SQL computes each owner's daily wallet value as the sum of price × shares across holdings; the workbook models dividends and coupons alongside.

Corporate-Action Handling

Bonus shares, capital increases, and subscription rights are modeled explicitly, so share counts and valuations stay correct through EGX events — the part manual tracking always gets wrong.

04Why It Matters

A real ETL pipeline in miniature: scrape → stage → warehouse → model → serve, each step automated and observable.
BigQuery in actual use: not a course exercise — a client system where the warehouse answers daily valuation queries.
Financial-domain modeling: dividends, coupons, and corporate actions handled as first-class data, not footnotes.
Paid client work, documented: built for a private client and running daily — the freelance engagement that pairs analytics engineering with financial modeling.

05Skills Demonstrated

ETL pipeline designGoogle Apps Script Web scraping (Cheerio)BigQuery warehousing SQL financial modelingCorporate-action logic Scheduled automation