Juan Mediavilla

Machine-learning engineer. MSc Machine Learning, UCL — available September 2026.

London, UK · jmediavillasaez@gmail.com · github.com/juanmediavillaa · linkedin.com/in/juanmediavilla
Spanish and English (bilingual) · French B2

This page is the CV. To get a PDF, print it — the print stylesheet is set up for it.

Education

MSc Machine Learning — University College London

Sep 2025 – Sep 2026
  • Thesis: Latent Dynamics of Prediction-Market Price Paths. A point-process account of when prediction-market prices move, across 14 pre-registered components — specifications committed before results, so the order is provable. Write-up.
  • Coursework: Supervised Learning; Probabilistic & Unsupervised Learning; Bayesian Deep Learning; Approximate Inference; Statistical Learning Theory; Reinforcement Learning; Information Retrieval.

BSc Data Science & Artificial Intelligence — Leiden University (LIACS)

to 2025
  • Minor in Technology-Based Entrepreneurship, TU Delft.
  • Thesis: benchmarked six architectures — SimCLR, DeepConvLSTM, SelfHARModel, SelfPAB, XGBoost, MOMENT — for human activity recognition on wearable-sensor data under leave-one-subject-out cross-validation — each model tested on people it never saw in training, and applied a Friedman test showing the 0.880–0.843 macro-F1 spread was not statistically significant: a 7-hour self-supervised transformer was statistically tied with a 23-minute gradient-boosting baseline. Thesis PDF.

Selected work

Prediction-market research and trading system — self-built

May 2026 – present
  • Built an end-to-end research system: six live collectors on a 15-to-60-minute cadence feeding a licence-clean, hash-verified panel of 400 resolved markets and 188,856 trades.
  • Ran four candidate strategies through clustered-bootstrap evaluation, resampling whole markets rather than individual trades and reported all four as no-edge (p = 498, 0.601, 0.613, data) rather than shipping a false positive. The fourth abstained universally rather than substituting a proxy for a signal the historical data did not carry.
  • Established a behavioural trader typology that predicted held-out P&L (Kruskal–Wallis p = 7.7e-07, 6/45 pairs surviving Bonferroni), reported with its mixed cluster-stability caveat attached.
  • Stack: real-time WebSocket pipelines, XGBoost with isotonic calibration, live inference and order execution, walk-forward backtesting with realistic fill simulation, Linux, systemd.

Wallet-intelligence and manipulation-detection engine

2026
  • Built a three-tier scoring engine tracing on-chain funding up to 3 hops and flagging coordinated trading clusters, requiring corroboration across all three tiers before an insider call. 51 tests under pytest; clustering across 3,413 wallets.
  • Documented the false-positive mode that forced one heuristic to be retired outright, and the endpoint limitations that cap what the tool can reconstruct.

Fund-accounting terminal

Jul 2025 – present
  • Built a NAV-based (net asset value) fund-accounting system with unit issuance and redemption, live position pricing and benchmark-relative reporting, across five screens and four preceding generations of CLI.
  • Used end-to-end Decimal arithmetic serialised as strings, an enforced fund-value invariant, and a shared state contract so the pre-existing CLI and the web terminal operate on the same ledger without divergence.

Market-data portal

Jul 2026
  • Built a zero-JavaScript static portal documenting a seven-stream order-book archive of ~1.05 TB (self-reported, August 2026) growing 12.8 GiB/day, with a curated tier of 206 markets and 408,414 repricing events.
  • Enforced provenance at build time: a gate that fails the build on unverified or internal claims, and an extraction tool that raises on every unimplemented path so it cannot emit a fabricated sample.
  • Retired the product's original differentiator when competitor research contradicted it, replacing it with a structurally verifiable claim.

Front-end delivery

2024 – 2026
  • Shipped four front ends across three idioms: a React single-page app (solo-developed within a five-person TU Delft course project), a Next.js 15 / React 19 application with third-party auth deployed on its own domain, and zero-dependency static sites with no framework, CDN or third-party requests.

AI4MDE Studio — open-source contribution

May – Jun 2026
  • Contributed to an open-source model-driven-engineering platform generating working Django prototypes from UML (unified modelling language) diagrams — 10 of 354 commits in a ~7-contributor Django/Docker codebase with ruff, pyright and SonarQube gates.

Experience

Teaching Assistant — Leiden University

Autumn 2024
  • Two computer-science courses in one semester: Human–Agent Interaction, and Concepts of Programming Languages (OCaml and Prolog). Recruited to the former personally by its instructor as a top-scoring student.
  • Ran labs and tutorials for a cohort of roughly 120–150; graded 20 OCaml group submissions, 14 Prolog group submissions and 6 retake students; co-designed assignments including difficulty calibration.
  • Both course professors wrote my Cambridge and UCL recommendation letters.

Skills

  • Experimental design and statistical validation — pre-registered specifications, clustered bootstrap, leave-one-out cross-validation, Friedman tests, Benjamini–Hochberg correction, walk-forward validation, simulation-based recovery gates.
  • Languages — Python (primary); Java, OCaml, Prolog (the latter two to teaching standard); JavaScript.
  • ML — XGBoost with isotonic calibration; point processes at thesis depth, both self-exciting (Hawkes) and hidden-mode (MMPP); self-supervised and representation learning (SimCLR, SelfPAB, MOMENT).
  • Systems — real-time WebSocket pipelines, Linux and VPS operations, systemd, Git, rclone, SQLite.
  • Web — React, HTML, CSS, Tailwind, Astro, Flask.
  • Markets — microstructure, Kelly sizing, options basics, net-asset-value unitization and decimal-exact ledgers.
  • AI tooling and agentic systems — designing agentic pipelines, written operating contracts, provenance requirements, and guardrails enforced in code rather than in prompts.
  • Also — LaTeX.

Coursework not claimed as current capability: Bayesian and variational inference, reinforcement learning, sequence models, statistical learning theory, information retrieval. Measure-theoretic probability and stochastic calculus are an acknowledged gap.