Energy Equity Research Platform

A Flask research platform for TSX energy equities and beyond that runs its heavy models overnight, logs and alerts on every stage, and tracks a daily research shortlist against a benchmark.

188,392lines of code
518files
693commits
12data models

What the measurements mean

Only what is unusual for this project. Every sentence names the field it came from; nothing here is asserted that cannot be checked against the data.

How it works

Analytical tools decay quietly: a calculation changes, the documentation does not, and nobody notices until a number is wrong. So a status registry of implemented features and open integrity issues is kept beside the code, fed by a diagnostics tool inside the app. The analysis combines a stacking ensemble of six models (a final model that learns how to weigh the others) with a nine-gate signal system, and both feed ranking, macro and news layers. The results of agent debates are stored as data, so a recommendation can be traced back to its inputs. Heavy work runs only in an off-hours compute window, and during the day the site serves a static snapshot. Each stage writes to a run ledger, and a failure raises an alert on the first occurrence, on the third and on recovery, rather than on every repeat. Each night a research shortlist is built from overnight events, passed through a quality gate and capped per sector, and its forward returns are tracked point in time against a benchmark. Snapshots can be created, verified and restored, so a past state can be reproduced.

What it is built from

Each bar is one of this project's own modules, sized by how many times the rest of the project imports it. The counts are measured, not estimated, and the module at the top is the one the rest of the project leans on most.

Module mapInternal modules by how often they are imported: core 914 times, web_app 14 times, tests 8 timescore914web_app14tests8imports of each internal module, counted across the project

What kind of engineering this is

Six signals counted from the source: files that run models locally, that act without being asked each time, that check their own output, that survive failure, that touch parsers and protocols, and that were measured then improved. Every axis carries its file count.

Depth profileDepth signals: Local inference 16 files, Autonomy 20 files, Verification 40 files, Resilience 140 files, Low level 21 files, Iteration 0 filesLocal inference16 filesAutonomy20 filesVerification40 filesResilience140 filesLow level21 filesIteration0 files

What it is written in

Share of code bytes. Vendored bundles and generated output are set aside before this is computed, which is why it differs from a simple file count.

Language mixPython 79.9%, JavaScript 14.2%, HTML 3.4%, CSS 2.1%, PowerShell 0.2%, Batchfile 0.1%Python 79.9%JavaScript 14.2%

What stands out

Capabilities

Grade

Every check names the field it measured. Checks that cannot apply are excluded, never counted as failures.

A
91.2% over 18 of 18 checks100% coverage

Not met

Architecture

Directories carrying real modules, largest first.

Data model

Typed structures and tables found in the source.

Vulnerable dependencies

7 declared dependencies match a published advisory. Checked offline against the OSV database; only pinned versions can be checked, so anything unpinned here is unknown rather than clean.

Vocabulary

Parsed 422 of 423 Python file(s); the rest were over the size budget. Counts are exact; the names below are a sample.

3,973functions
2,294methods
628classes
401documented modules

Classes

Functions

Command line

Depth

Signals counted from the code, not asserted.

693 commits across 44 separate working days over 7.6 months, 193 of them revising existing behaviour

Built from scratch

Closes its own loop

Proves itself

Survives failure

Local inference

Systems

Environment engineering

Working within limits

Operating-system internals

Distributed systems

Languages

Built with

Recurring themes in the commit history

Evidence

Taken from the code itself: a module docstring or the opening of the README.

Flask web dashboard - personal stock portfolio tracker on port 5050. Status registry: see ``docs/STATUS.md`` for the authoritative list of implemented features, open integrity issues, calculation audit log, and in-progress / planned work. Update that file (not this docstring) when you add a feature, find a bug, or verify a formula.

At a glance

Status
active
Primary language
Python
First commit
2026-03-03
Last activity
2026-10-20
Domain
AI & machine learning
Agent docs
CLAUDE.md, AGENTS.md, PROJECT_KNOWLEDGE.md, .claude, .superpowers