Technical portfolio · Worked studies · November 2026

Models in
engineering
and finance

This portfolio contains worked models of robot control, option pricing and portfolio optimisation. Each study includes the equations and code so you can inspect the calculations.

These are computational studies with illustrative inputs. Each includes a model, derivation, assumptions and reproducible code. They are separate from my competition results and employer work.

Engineering / Robotics

Getting a robot
to turn precisely.

Feedback control · differential equations · kinematics

A fast turn is useful only if the robot arrives at the intended heading. This model explores the trade-off between response speed, overshoot and settling, with a limited actuator and a simple angular-velocity lag.

Heading responseTarget: 90° · 8-second window
Heading in degreesTime: 0–8 seconds
Simulated headingTarget
2.6%Overshoot above target
5.56 sSettles within ±2%, in this window
1.39°Absolute error at 8 seconds

The controller

e = θtarget − θu = clip(Kpe + Ki∫e dt − Kdω, −2, 2)τ dω/dt + ω = u; dθ/dt = ω

The derivative term acts on measured angular velocity, avoiding a derivative kick when the target changes. Conditional integration stops the integral from accumulating while the command is saturated in the same direction as the error.

Numerical method and checks

The actuator time constant is 0.25 seconds; command limits are ±2 radians per second. Each 5 ms step uses the exact constant-input update for velocity and trapezoidal integration for heading. The controller is then recomputed. A smaller time-step comparison checks numerical sensitivity.

The target and initial state are fixed. There is no sensor noise, wheel slip, delay or battery model. Settling means staying within the band for the remainder of the displayed window. This simulation cannot establish how a physical robot would behave.

From wheel speeds to position

v = (vR + vL)/2ω = (vR − vL)/bdx/dt = v cos θ; dy/dt = v sin θ

For constant wheel speeds and a start at the origin, integration gives x = (v/ω) sin(ωt) and y = (v/ω)(1 − cos(ωt)). Equal wheel speeds give the straight-line limit, x = vt and y = 0.

Worked example: left wheel 0.30 m/s, right wheel 0.60 m/s, track width 0.32 m. After one second, x = 0.387 m, y = 0.196 m and heading = 53.71°. This assumes ideal rolling without slip.

Download model code
Robots and teams on a VEX competition field

Competition experience

My experience
at VEX competitions

I have represented the UK three times at the VEX Robotics World Championship. In 2026, I competed in Week 1, when my team won the Judges Award, then judged a full VEX IQ division in Week 2.

My robotics story

Quantitative finance / Valuation

Pricing a European call
with Black–Scholes and Monte Carlo

Probability · integration · Monte Carlo · sensitivities

A European call can be valued with a closed-form expression or by averaging discounted payoffs under a risk-neutral model. Comparing the two exposes both the model assumptions and the sampling error.

European call valueStrike 100 · rate 5% · no dividends
Value in arbitrary currency unitsUnderlying price: 50–150
Black–Scholes valueIntrinsic value
10.4506Black–Scholes call value
0.6368Delta: ∂C/∂S
0.0188Gamma: ∂²C/∂S²

Monte Carlo estimate 10.4707; approximate 95% sampling interval [10.2427, 10.6986].

Analytical valuation

C = S Φ(d1) − K e−rT Φ(d2)d1 = [ln(S/K) + (r + σ²/2)T] / (σ√T)d2 = d1 − σ√T

Φ is the standard normal cumulative distribution. Delta measures the local sensitivity to the underlying price; gamma measures how delta changes. The model assumes constant volatility and interest rates, continuous trading, no dividends and a lognormal underlying.

The expectation behind the formula
ST = S exp[(r − σ²/2)T + σ√T Z]C = e−rT E[max(ST − K, 0)], Z ∼ N(0,1)

The call price is an integral of the positive payoff against the normal density. Risk-neutral pricing uses r in the drift; it is not a forecast of the asset’s actual expected return.

Monte Carlo cross-check

The simulation uses 4,096 independent normal draws, each paired with its negative: 8,192 terminal prices in total. Antithetic pairing can reduce sampling variation. The standard error is calculated from the 4,096 pair averages, rather than treating all payoffs as independent.

A fixed seed makes results reproducible. The interval describes sampling uncertainty under this model. It does not cover model error or imply a range of market prices.

Validation and limitations

Checks include put–call parity, finite-difference delta and gamma, a known at-the-money benchmark and reproducible simulation results. Closed-form values use a numerical approximation to the normal CDF. There are no live prices, calibrated parameters or trading returns.

Download pricing code

Mathematics / Optimisation

Minimum-variance
portfolio allocation

Linear algebra · quadratic forms · differentiation · convexity

For two assets, minimising portfolio variance becomes a quadratic problem. Writing the covariance matrix makes the role of correlation explicit. Enforcing non-negative weights can move the solution to a boundary.

Portfolio volatilityDot: minimum with weights between 0 and 1
Annual volatility (%)Weight in asset A: 0–100%
78.6%Minimum-variance weight in A
13.89%Minimum portfolio volatility
15.81%Volatility at the current weight

The optimum is inside the permitted weight interval.

Derive the solution

V(w) = w²σA² + (1−w)²σB²+ 2w(1−w)ρσAσBw* = (σB² − ρσAσB) /(σA² + σB² − 2ρσAσB)

Differentiating V and setting its first derivative to zero gives w*. The second derivative is twice the denominator. It is positive for the permitted inputs, so the stationary point is the unique unconstrained minimum. Clipping w* to [0,1] enforces the long-only constraint.

The matrix view

Minimise wᵀΣw subject to 1ᵀw = 1∇L = 2Σw − λ1 = 0w* = Σ⁻¹1 / (1ᵀΣ⁻¹1)

This equality-constrained solution assumes an invertible covariance matrix and permits negative weights. The two-asset long-only solution above adds the boundary constraint. The determinant σA²σB²(1 − ρ²) is positive here, so Σ is positive definite.

What this example leaves out

The inputs are illustrative assumptions; no return data has been fitted. Minimising variance alone ignores expected returns, trading costs, estimation error and changing correlations. The exercise demonstrates constrained optimisation rather than an investment recommendation.

Download optimisation code

Education & further study

Degree and additional courses

BSc Applied Finance, University of Exeter — expected 2027; on track for a First.

LSE · LSEMT105b · Online coursework

Mathematics 1 Part 2: Integral calculus, algebra, and applications

Integral calculus and algebra, with applications to quantitative problems.

LSE course information

HarvardX · PH525.1x · Certificate earned

Statistics and R

Probability distributions, statistical inference, confidence intervals, Monte Carlo simulation, permutation tests and data analysis in R.

HarvardX course information

IMFx · MDSx · Certificate earned

Macroeconomic Diagnostics

Course coverage: output gaps, macrofinancial linkages, fiscal and monetary policy, debt sustainability and external vulnerabilities.

IMF course information
Professional qualifications

CISI Level 4 qualifications (three), Securities & Derivatives qualifications (two), and Risk in Financial Services.

About these worked studies

These studies were prepared with AI coding assistance in November 2026. The downloadable implementations and tests make the assumptions and calculations inspectable. They do not represent employer systems, hardware measurements or completed participant research.

Download numerical checks · Download reproduction notes