About

Juan Mediavilla

I study MSc Machine Learning at University College London, and I build research systems end to end — the data platform, the models, and the evaluation that decides whether they are worth anything.

I want to be a machine-learning engineer or applied scientist, in research or quantitative finance, at a place where results have to survive someone checking them. Spanish, based in London, available from September 2026.

Experience

What each build
actually demonstrates.

What I have built, and what it shows

No employer has paid me to build these. Every one is either academic work or something I built myself, and each has its own page with the results.

  • Prediction-market research platform Data engineering and applied ML at production cadence: six collectors on systemd timers, real-time ingest, live inference and order execution, and a walk-forward backtester whose pre-registered verdict was that none of the four strategies beat random. 2026 – ongoing
    718 commits
  • MSc thesis — latent market dynamics Bayesian modelling from first principles: a hierarchical point-process model fitted with a Metropolis-within-Gibbs sampler I wrote from scratch, because no standard tool applied. 2025 – 2026
    UCL
  • Wallet-intelligence engine Anomaly detection under a high standard of proof: three independent tiers must agree before an account is labelled, and the engine caps its own conclusion when it cannot trace funding. 2026
    51 tests
  • Fund-accounting terminal Financial systems correctness: NAV unitisation, decimal-exact money, and one ledger shared by a command-line tool and a web terminal so the two cannot disagree. 2025 – ongoing
    4 generations
  • Market-data portal Product engineering with provenance enforced by the build — including retiring the product's own original selling point once I could not support it. 2026
    7 streams
  • BSc thesis — activity recognition Deep learning and experimental design: six architectures benchmarked under leave-one-subject-out validation, with a Friedman test on the result rather than a leaderboard. 2025
    Leiden
  • Teaching Assistant, Leiden University Two computer-science courses in one semester, one of which recruited me personally. Labs, tutorials, grading and assignment design. Autumn 2024
    2 courses

Education

Two degrees

University College London MSc Machine Learning · Sep 2025 – Sep 2026 · London

Thesis: Latent Dynamics of Prediction-Market Price Paths, supervised by Prof. Philip Treleaven. A hierarchical point-process model of when prediction markets move, fitted with a Metropolis-within-Gibbs sampler I wrote from scratch, and benchmarked against self-exciting and neural alternatives. Write-up →

Coursework: Supervised Learning · Probabilistic & Unsupervised Learning · Bayesian Deep Learning · Approximate Inference · Statistical Learning Theory · Reinforcement Learning · Information Retrieval.

Leiden University seal

Leiden University BSc Data Science & Artificial Intelligence · to 2025 · LIACS

Thesis: Fine-tuning General Time Series and Accelerometer-Specific Self-Supervised Models for Human Activity Recognition. Built a full self-supervised learning pipeline and benchmarked six architectures on wearable-sensor data under leave-one-subject-out validation. Summary →

Minor in Technology-Based Entrepreneurship at TU Delft, where I solo-built the web application for a five-person final project.

Teaching

Teaching Assistant — Leiden University

Human–Agent Interaction, and Concepts of Programming Languages (OCaml and Prolog). I was recruited to Human–Agent Interaction personally by its instructor, as a top-scoring student on that course the year before.

The programming-languages cohort was roughly 120 to 150 students. I graded 20 OCaml group submissions, 14 Prolog group submissions and 6 retake students; ran labs and tutorials; and co-designed assignments, including calibrating question and coding difficulty.

Recorded feedback described me as "a fantastic TA — proactive, engaged, and helping improve the course." Both course professors wrote my Cambridge and UCL recommendation letters.

Skills

What I can demonstrate today

Tiered honestly. What follows is what I can show working code or committed results for. What I have only studied is listed separately below, and labelled as such.

AI tooling and agentic systems
My core strength: designing agentic pipelines, writing the contracts agents operate under, and building the guardrails that make their output trustworthy — provenance requirements, constraints enforced in code rather than in prompts, and independent verification of what an agent claims it did. The published version is default-fail, which is MIT and readable in full. How I work, with the artifacts.
Experimental design and statistical validation
Specifications committed before outcome statistics; clustered bootstrap with the correct resampling unit; leave-one-out cross-validation over subjects and over markets; Friedman tests; Benjamini–Hochberg correction; walk-forward out-of-sample validation; recovery gates that must pass on simulated ground truth before a real result is read.
Python
Primary language.
Applied ML in production
XGBoost with isotonic calibration — a method that makes a model's stated confidence match how often it is actually right — plus live inference and order execution. Backtesting discipline: realistic fill simulation, walk-forward evaluation, realized-at-resolution profit and loss, and honest abstention when a required signal is absent from the data rather than substituting a proxy.
Point processes
Point processes are the mathematics of when things happen in time rather than how large they are. I work with two: self-exciting models, where each event makes the next more likely, and hidden-mode models, where the system switches between a quiet and a busy state you cannot observe directly. Hawkes and Markov-modulated Poisson processes at thesis depth — hierarchical partial pooling with a custom Metropolis-within-Gibbs sampler and a conjugate Normal-Inverse-Wishart population block, benchmarked against Hawkes and EWMA baselines.
Self-supervised and representation learning
Self-supervised learning trains a model on a large pile of unlabelled data first, then fine-tunes it on the small labelled set you actually have. Fine-tuned SimCLR, SelfPAB and the MOMENT time-series foundation model.
Data and systems engineering
Real-time WebSocket pipelines, Linux and VPS operations, systemd, Git, rclone. A 24/7 collection pipeline on a 15-to-60-minute cadence with gap auditing and continuity accounting.
Web and front end
React, JavaScript, HTML, CSS, Tailwind, Astro — four shipped front ends across three idioms: a single-page app, a Next.js application with third-party auth, and zero-dependency static (this site).
Other languages
Java, OCaml and Prolog — the latter two to teaching standard.
Markets and microstructure
Market microstructure, Kelly sizing, options basics, resolution mechanics, prediction-market structure, NAV (net asset value) unitization and decimal-exact ledgers.
LaTeX
Thesis writing.

Models I have implemented, trained or fitted

Each of these I have built and run, not just read about.
ModelWhere
XGBoost with isotonic calibrationLive inference and order execution on the research platform
Hierarchical Markov-modulated Poisson, custom Metropolis-within-Gibbs samplerMSc thesis — written from scratch, no autodiff gradient available
Hawkes self-exciting processMSc thesis — the model that beat my own
EWMA intensity baselineMSc thesis — the baseline everything had to clear
Hierarchical Bayesian regime model, fitted by ADVIEarlier market-regime work
SimCLR contrastive pretrainingBSc thesis — highest scorer of the six
DeepConvLSTMBSc thesis — supervised conv-recurrent hybrid
SelfPAB · SelfHARBSc thesis — accelerometer-specific self-supervised models
MOMENT time-series foundation modelBSc thesis — fine-tuned for activity recognition
UMAP + HDBSCAN + Gaussian mixturesBehavioural clustering over 3,413 wallets

Studied, not claimed

Bayesian and variational inference, reinforcement learning, sequence models, statistical learning theory and information retrieval are coursework, not current capability. I have used several of them in anger, but they would need a serious refresher before I would claim them in an interview.

Measure-theoretic probability and stochastic calculus are an acknowledged gap, and I am not going to pretend otherwise. That is the main reason I am not currently positioning for pure theoretical-quant roles.

Looking for

What I want next

Machine-learning engineer, applied scientist, quant developer, or quant research at a shop where the work is empirical rather than theory-first. I am most useful where a system has to be built end to end and the results have to survive someone checking them.

Available from September 2026, based in London. My CV is here, and my email, GitHub and LinkedIn are at the top of this page.

Languages: Spanish and English (bilingual) · French B2