# Engineering, quant and mathematics: worked studies

Prepared with AI coding assistance, November 2026. Educational computational studies with synthetic inputs, separate from competition achievements and employer work.

## Reproduce the numerical checks

Download `portfolio-models.mjs` and `portfolio-checks.mjs` into the same folder. With Node.js installed, run `node portfolio-checks.mjs`. No packages, data feeds or API keys are required. The browser uses the same calculation module. The page includes precomputed plots and worked explanations if JavaScript is disabled.

## Engineering

A 90-degree heading step is controlled by a PID-like loop with derivative on measured angular velocity and conditional integration for anti-windup. The angular-velocity plant is first order with a 0.25-second time constant and a ±2 rad/s command limit. Velocity uses an exact constant-input update per 5 ms interval; heading uses trapezoidal integration. Tests check a finer interval, zero-input behaviour and actuator bounds. Differential-drive geometry is checked against straight, spin and mirrored-turn cases.

The model omits wheel slip, sensor noise, latency and battery behaviour. It is not a fitted model of a competition robot. Reported settling is confined to the eight-second displayed horizon.

## Quantitative finance

A European call with no dividends is priced using Black–Scholes and a seeded antithetic Monte Carlo simulation. The simulation uses 4,096 independent normal draws, each paired with its negative, giving 8,192 payoffs. Uncertainty is calculated from pair averages. The normal CDF uses a standard numerical approximation. Tests include a known price benchmark, put–call parity, finite-difference Greeks and repeatability. Units are arbitrary; there are no historical returns, live prices or performance claims.

## Mathematics

A two-asset minimum-variance problem is solved analytically by differentiating the quadratic variance function. Clipping the unconstrained solution to [0,1] imposes long-only weights. Positive-definiteness, interior first-order conditions, boundary cases and a dense feasible grid provide checks. Input volatilities and correlations are illustrative, not estimates.

## Website verification

Local routes, links, numerical calculations and script-level interactions are checked separately. A live visual browser was not available during this update.
