TRADING SYSTEMS / RESEARCH / EXECUTION

Algorithm
Engineer.

I’m Ricardo Agar. My work covers systematic trading research, execution software and infrastructure across gold and cryptocurrency markets. At XAU Capital Group, I was the sole Algorithm Engineer, responsible for research, testing, deployment and monitoring.

Download CV PDF
GOLD / CRYPTOCURRENCYSelected work
Live systems

Testing, deployment
and production monitoring

XAUUSD + Crypto

Systematic research
and live-market systems

Python / Rust / C#
MQL4 / MQL5

Programming languages

~£800k

Fund scale associated with
algorithm-engineering work

01 / SELECTED WORK

Selected work

Trading research, execution software and operational investigations.

SYSTEMATIC TRADING01

Research · Validation · Execution

XAUUSD research
and deployment

At XAU Capital Group, I developed, tested and deployed proprietary XAUUSD trading systems. My responsibilities included forward testing, monitoring and investigating differences between simulated and live behaviour.

DATA ENGINEERING / RESEARCH VALIDATION

COMEX GC and XAUUSD data alignment

I worked on aligning COMEX GC futures L2/L3 data with broker XAUUSD ticks for walk-forward research. The work focused on when information from each feed became available and whether it could be used at a given decision time.

The research included receive-time and feature-availability checks, duplicate and coverage checks, and tests of transaction costs, execution delay and stability across time. Candidates that failed cost or stability checks were rejected or held back from further validation.

Technical details

Research and testing

My work covered mathematical and statistical modelling, backtesting, forward testing and drawdown analysis for XAUUSD strategies. Specific research projects used market microstructure, L2/L3 and alternative data; these were not inputs to every strategy. Evaluation included transaction costs, slippage and changing regimes.

Data and evaluation scope

The order-book data came from COMEX gold futures; XAUUSD prices came from broker tick feeds. Research records distinguish discovery runs from independent validation and identify reused evaluation data. The findings described here include research-stage results.

The trading operation was associated with approximately £800k in fund scale.

Python / C# / MQL4 / MQL5

TRADING INFRASTRUCTURE02

Deployment · Monitoring · Platform support

Trading infrastructure
and monitoring

I set up and maintained MT4, MT5 and cTrader environments across Ubuntu and Windows Server, including distributed deployment and real-time performance dashboards.

OPERATIONAL EXPERIENCE / ACROSS SYSTEMS

Operational support across trading systems

I dealt with infrastructure interruptions, execution issues and EA state problems across several trading systems. These included server restarts, provider issues, Windows Server 2022 updates and latency or slippage spikes.

Application issues included stale cached data, duplicate actions, incorrect regime classification and unintended trading lockouts. Unexpected broker orders also occurred during concurrent submissions.

Technical details

Deployment and operation

The work covered distributed VPS/VDS infrastructure, trading-platform configuration, deployment and monitoring.

State and execution boundaries

Relevant checks include cached-input freshness, the EA’s internal state, broker-reported positions and the status of concurrent order requests.

MT4 / MT5 / cTrader / Ubuntu / Windows Server

CRYPTOCURRENCY SYSTEMS03

Observation · Sequencing · Execution

Cryptocurrency
execution software

At AZC, I developed Rust-based software for wallet monitoring and transaction nonce management, supported by distributed VPS/VDS servers.

RESEARCH FINDING / BTCUSDC

BTCUSDC transaction-cost review

Correcting the fee assumptions removed the apparent edge in BTCUSDC perpetual scalping research on Hyperliquid.

Technical details

Execution infrastructure

Work on newly issued tokens included creator-wallet monitoring, transaction sequencing and deployment across internationally distributed servers.

Markets and research

The venture covered newly launched tokens on Pump.fun and separate BTCUSDC perpetual strategy research on Hyperliquid.

Rust / VPS / VDS

SOFTWARE & AI04

Product · Integration · Automation

Zelara: patient software
and API integrations

As Zelara’s founder and software engineer, I built a Python, React and AWS platform covering patient management, scheduling, records and communication.

Technical details

Application development

The platform included calendars, patient records, analytics and financial workflows, with API integrations to third-party platforms.

AI integration

AI voice/chat agents and machine-learning systems supported call handling, triage, appointment booking and outreach within the practice workflows.

Python / React / AWS / APIs

EXECUTION RESEARCH / XAUUSD

Execution monitoring and broker comparison

An XAUUSD strategy behaved differently after a broker change. I developed passive MT5 monitoring tools to inspect connection health, feed freshness and spread conditions alongside execution records, and used them to compare broker environments.

Observation

The same strategy and settings produced more losing trades on one broker over the same comparison period.

Comparison

I investigated tick-feed differences, spreads and observed order-execution timing to assess broker suitability for the strategies we were running.

Measurement scope

I treated the MT5 connection-latency reading separately from observed order-execution timing. Feed and execution differences were investigated as possible contributors to the change in results.

Passive MT5 monitor displaying connectivity, feed freshness, spreads and execution diagnostics. Account and trade details are redacted; the Live account suffix remains visible.View full-size screenshot

MT5 / PASSIVE DIAGNOSTICS

Execution and feed diagnostics

The monitor separates connection and feed status from observed executions. It displays ping, spread, tick age, slippage and recorded fill times, with CSV output for further analysis.

This capture reports stale ticks while the terminal connection is online. Connection status alone does not establish that market data is current. MT5 ping and recorded fill time are separate readings; their difference does not isolate broker-side processing time.

Account identifiers, the broker name and private trade details are redacted. The Live suffix and diagnostic readings are preserved.

Commercial source code and strategy rules are private. Diagrams show general system structure.

02 / RESEARCH METHODOLOGY

Research
process

My research draws on applied statistics and the mathematical and numerical methods developed through engineering. It has included random forest models, Monte Carlo simulation, out-of-sample and walk-forward testing, with Sharpe ratio and trade expectancy used to assess results.

Data quality, alignment and leakage checks have been a substantial part of that work. The methods and inputs vary by project: L2/L3 data was used in the COMEX/XAUUSD research, not in every strategy.

Current research COMEX/XAUUSD research

Record assumptions
alongside results.

  1. 01

    Research question and hypothesis

    Define the instrument, trading horizon and relationship being investigated. State what would support or contradict the hypothesis, choose a comparison baseline and keep exploratory findings separate from subsequent evaluation.

  2. 02

    Data quality and alignment

    Check timestamps, missing observations, duplicates, coverage and feed conventions before testing a relationship. My COMEX/XAUUSD research involved aligning futures L2/L3 data with broker ticks and establishing when each observation became usable. The data requirements depend on the strategy.

  3. 03

    Feature construction and leakage checks

    Check that each input could have been available at the decision time. This was a substantial part of my order-book data work, particularly when joining separate feeds. Build features only from information available at each decision, keep evaluation-period observations out of model fitting, and fit preprocessing or feature selection within the training period.

  4. 04

    Applied statistics

    I use applied statistics to investigate relationships and assess research results. My engineering training covered probability, hypothesis testing, confidence intervals and least-squares methods. The focus is on the size and uncertainty of an effect, the assumptions behind an estimate and whether the evidence supports further testing.

  5. 05

    Linear algebra and numerical methods

    My engineering background includes matrix methods, calculus, differential equations and numerical modelling in MATLAB and Python. These provide a basis for expressing models mathematically and evaluating them computationally. Consider numerical approximations, sensitivity and the precision of the available data when interpreting model output.

  6. 06

    Random forest

    I have used random forest models to investigate predictive relationships. Compare model results with simpler baselines and assess whether useful behaviour persists outside the training sample. Model complexity alone does not establish a trading edge.

  7. 07

    Backtesting and transaction costs

    Test historical behaviour with explicit assumptions about decision timing, order execution and position accounting. Include fees, spreads, slippage and funding where relevant, calculated from the activity the strategy produces. Check whether the available data and simulator can represent the sequence of events the strategy depends on.

  8. 08

    Out-of-sample and walk-forward testing

    I have used out-of-sample and walk-forward tests to evaluate behaviour beyond the development period. Keep training and evaluation chronological, check for information crossing their boundaries and record any reuse of test data. A period used to revise a strategy is no longer an independent test of that revision.

  9. 09

    Sharpe ratio and trade expectancy

    My performance assessment has included Sharpe ratio and trade expectancy. Read these alongside costs, sample size, exposure, drawdowns and the distribution of outcomes. Examine how average profit or loss per trade changes after costs, and whether aggregate results depend on a small number of trades or periods.

  10. 10

    Monte Carlo simulation and sensitivity

    I regularly use Monte Carlo simulation in my research. Interpret simulated outcomes in light of the model assumptions. Review results across periods and market conditions, and examine sensitivity to costs, execution delays and nearby parameter choices. Investigate concentration and reliance on favourable assumptions; record uncertainty and withhold candidates that fail the relevant checks.

  11. 11

    Exposure and execution constraints

    Review trade frequency, position exposure and broker or venue constraints. Consider how spread changes, slippage and simultaneous order requests affect the strategy in operation. Where several strategies run together, examine overlapping exposure and demands on shared infrastructure.

  12. 12

    Forward testing and deployment

    Observe a candidate on new data and compare its decisions with the backtest assumptions. Check feed behaviour, execution and position state in the intended environment before extending live use. Simulated fills remain an assumption until they can be compared with actual execution.

  13. 13

    Production monitoring and research review

    Monitor data quality, feature behaviour, exposures, execution costs and performance against research assumptions. Investigate discrepancies using decision and order records. Distinguish operational faults from model deterioration; revise, pause or reject a strategy when the evidence no longer supports it.

Current research

Recent investigations extending my research methods.

EXPLORATORY RESEARCH

Statistical evaluation

Recent research has included confidence bounds, bootstrap resampling, sign-flip tests and Holm multiple-testing correction. I have used these alongside cost and execution-delay sensitivity, comparisons across chronological periods and concentration analysis.

Confidence bounds and bootstrap resampling help assess uncertainty around estimates. Sign-flip tests examine results against a null model under appropriate randomisation or symmetry assumptions. Holm correction controls family-wise error across a defined group of tests, provided the underlying p-values are valid.

These are newer additions to my research practice, with ongoing work on their assumptions, interpretation and suitability for financial data.

EXPLORATORY RESEARCH

Stochastic modelling

I have begun exploratory research using Itô calculus and its connections to stochastic models and numerical simulation. This is a newer area of my research, focused on understanding the mathematics, modelling assumptions and potential applications.

Brownian motion and stochastic differential equations
Represent continuous random variation alongside drift in a model, for example when describing assumed price or volatility dynamics.
Itô’s lemma
Derive how a function of a stochastic process evolves, including the correction associated with quadratic variation. It is a central tool within Itô calculus.
Euler–Maruyama
Approximate stochastic differential equation paths numerically when an exact solution is unavailable or impractical.

03 / RESEARCH AND OPERATION

Backtesting
and live trading

General sources of false confidence in a backtest include information leakage, statistical selection, validation design and execution assumptions. The investigations above describe my project experience.

RESEARCH ASSUMPTIONSLIVE CONDITIONS
SOURCETIMINGEXECUTIONOBSERVATION
Conceptual illustration of sequencing and delivery differences. No trading results or measured timing.
01Point-in-time leakageFuture information hidden in apparently historical data

A historical timestamp does not establish when information became available. Revised economic releases, backfilled alternative data, incomplete bars and features joined by event time rather than availability can introduce look-ahead bias. Selecting today's surviving instruments can also exclude the failures that a historical strategy would have encountered.

Use point-in-time releases and instrument universes, retain publication and receive timestamps, and audit feature availability at each decision. Cross-market joins need particular care: COMEX futures observations and broker XAUUSD ticks have different clocks, delivery paths and market conventions.

02Selection bias and multiple testingA strong result selected from a large search

Testing many features, parameters, markets or date ranges increases the chance of selecting a favourable result by luck. Manual revisions count as research trials too. Repeatedly inspecting a holdout and adapting the strategy to it turns that sample into part of the discovery process.

Record the search history and separate discovery from final evaluation. Deflated Sharpe analysis can account for selection and non-normality under its assumptions; probability-of-backtest-overfitting methods examine selection stability across partitions. Neither rescues contaminated data or replaces independent testing.

03Validation contaminationPreprocessing, tuning and overlapping outcomes

Information can cross a train/test boundary without an explicit future-price feature. Scaling, imputation, feature selection or model tuning fitted on the full dataset can leak test information. Random splits and overlapping return labels can place closely related observations on both sides of a validation boundary.

Fit the entire modelling pipeline within each training fold and use chronological evaluation for forward decisions. Remove training labels whose information intervals overlap evaluation periods; apply an embargo where the design requires it. Purging and embargo address specific dependencies, not every source of leakage.

04Uncertain performance estimatesSharpe inflation, serial dependence and tail risk

A high estimated Sharpe ratio may come from a short sample, a small number of trades or a selected test period. Serial correlation makes naïve square-root-of-time annualisation unreliable. Skew, heavy tails and smoothed marks can further obscure the uncertainty around a risk-adjusted return estimate.

Inspect the return process, sample length and effective number of independent observations. Use suitable confidence intervals or dependence-aware resampling, and assess downside and tail behaviour alongside Sharpe, Sortino and drawdown measures. A performance statistic is evidence to interpret, not a validation procedure.

05Execution-model errorQueue position, adverse selection and intrabar ambiguity

Bar-based simulation may not resolve whether a stop or target was reached first. A touched quote does not establish a fill: queue priority, cancellations, partial fills and submission latency affect executable outcomes. Passive orders can also fill disproportionately just before adverse price moves.

Use event-driven replay where the strategy depends on sequencing, with explicit assumptions about order arrival, matching and available liquidity. Stress latency and fill probabilities. Historical book replay alone cannot fully represent the impact of orders the strategy would have added to that market.

06Non-stationarity and concentrationRelationships that depend on a narrow market state

A relationship can reflect one volatility regime, common factor or short-lived market structure rather than persistent predictive information. Aggregate results may hide dependence on a few dates, instruments or sessions. Changes in liquidity, participant behaviour or volatility can alter both signal behaviour and execution costs.

Review performance by chronological blocks and economically relevant market states, alongside exposure and concentration. Test nearby specifications and assess whether apparent relationships survive costs and new data. Regime labels also need point-in-time construction; retrospective labels can make the historical explanation look cleaner than a live decision.

07Resampling and simulation assumptionsMonte Carlo uncertainty conditional on the model

Shuffling individual returns or trades assumes away dependencies that may determine risk. An IID bootstrap can destroy autocorrelation and volatility clustering; a parametric simulator may omit jumps, changing regimes or joint liquidity shocks. More simulated paths do not compensate for an unsuitable data-generating model.

Choose block or stationary bootstrap methods where dependence and approximate stationarity make them appropriate. Test sensitivity to block length and add explicit stress scenarios. Monte Carlo does not independently validate alpha; its conclusions depend on the process and execution assumptions simulated.

08Data, costs and operational stateFeed differences, net accounting and live system behaviour

Even a sound statistical design can misrepresent the traded instrument or its net returns. Broker ticks, spread construction, maker/taker fees, funding, contract conventions and order size affect the result. Cost calculations need to follow actual turnover and the execution assumptions used by the strategy.

Live systems introduce another source of divergence: stale cached inputs, interrupted processes, duplicated actions and unreconciled orders. Compare research inputs, decisions and position accounting with broker-reported activity. The broker comparison, BTCUSDC fee correction and operational examples above address these issues across separate systems.

My main reasons for stopping a strategy were a backtest that no longer held up under review, or a material change in market conditions. That included reassessing XAUUSD strategies as daily ATR changed.

04 / SYSTEM ARCHITECTURE

Trading system
architecture

A conceptual view of how market data becomes an order, how broker responses update system state, and how operational evidence returns to research.

CONCEPTUAL SYSTEMFIG. 02
01 DATA02 MODEL / RISK03 EXECUTION04 MONITOR / REVIEW
Proprietary strategy logic intentionally omitted.
  1. 01 / DATA

    Data ingestion

    Market and alternative observations with source, event time and receive time recorded separately, to establish which observations were available at each decision.

  2. 02 / DATA

    Validation and market state

    Sequence, freshness and coverage checks before updating quotes or an order book. Each feed retains its own instrument and venue context when constructing market state.

  3. 03 / MODEL / RISK

    Features and model inference

    Feature calculation and model evaluation against the validated market state, using inputs available at the decision time. The output is a proposed trading decision, before risk checks.

  4. 04 / MODEL / RISK

    Risk checks and order intent

    Exposure, position and trading constraints applied to the proposed decision. The output is an order intention, with an explicit distinction between requested exposure and confirmed positions.

  5. 05 / EXECUTION

    Order management and execution

    Order requests, amendments and cancellations tracked through their lifecycle, including partial fills, rejections and unresolved requests. Internal order state is updated from observed responses.

  6. 06 / EXECUTION

    Broker or venue responses

    External prices, order constraints and execution responses from the broker or venue. Acknowledgements, fills and rejections are distinct events for the order-management layer to interpret.

  7. 07 / MONITOR / REVIEW

    Telemetry and reconciliation

    Records of data freshness, process health, order events and positions. Reconciliation compares internal state with broker-reported activity and flags discrepancies for investigation.

  8. 08 / MONITOR / REVIEW

    Research feedback

    Execution records and operational observations feed back into data checks, cost assumptions and simulation behaviour. Findings inform further tests, strategy changes or a decision to stop.

05 / EDUCATION

Engineering
background

I studied Mechanical Engineering with Management at the University of Manchester. The degree covered the mathematical and computational methods I use in quantitative research.

UNIVERSITY OF MANCHESTER / 2020–2023, 2024–2025

BEng (Hons) Mechanical Engineering
with Management

01

Probability & inference

Statistics, hypothesis testing, confidence intervals and least-squares methods.

02

Mathematical methods

Calculus, linear algebra, eigenvalues and eigenvectors, differential equations and numerical methods.

03

Computation & measurement

MATLAB and Python modelling, data acquisition and control systems.

06 / EXPERIENCE

Experience

Research, software and engineering.

  1. 2026

    XAU Capital Group

    Algorithm Engineer

    Sole Algorithm Engineer, responsible for XAUUSD strategy research, testing and deployment. Developed research and execution software using mathematical modelling, backtesting and forward testing. Maintained distributed MT4, MT5 and cTrader environments, with dashboards and monitoring for drawdowns and differences between simulated and live behaviour.

  2. 2026

    AZC

    Founder & Algorithm Engineer

    Founded a cryptocurrency trading venture. Built Rust infrastructure for newly issued tokens, including creator-wallet monitoring, transaction nonce management and internationally distributed VPS/VDS servers. Researched BTCUSDC perpetual strategies on Hyperliquid through mathematical modelling, statistical analysis and backtesting.

  3. 2025–2026

    Zelara

    Founder & Software Engineer

    Founded and developed an AI-enabled dental practice platform using Python, React and AWS. Built patient management, scheduling, records, analytics and financial workflows, alongside voice/chat agents and API integrations for call handling, triage, booking and patient outreach.

  4. 2020–20232024–2025

    University of Manchester

    BEng (Hons) Mechanical Engineering with Management

    Studied probability, statistics, hypothesis testing and numerical methods alongside linear algebra and differential equations. Applied MATLAB and Python to computational modelling, with further study in data acquisition and control systems. Took a break from study in 2023–2024.

  5. 2019–2020

    University of Manchester

    Engineering foundation

    Foundation study preceding the BEng in Mechanical Engineering with Management.

  6. 2018

    National Nuclear Laboratory

    Engineering Work Experience

    Completed an engineering work experience placement at the National Nuclear Laboratory.

07 / SKILLS

Technical
skills

Quantitative
Mathematical modelling · Statistical analysis · Backtesting · Forward testing · Market microstructure · Execution analysis · Robustness testing
Programming
Python · Rust · C# · MQL4 · MQL5 · React
Infrastructure
Linux / Ubuntu · Windows Server · VPS / VDS · MT4 · MT5 · cTrader · PostgreSQL · Docker · AWS
Engineering computation
MATLAB · Python · Numerical methods · Computational modelling · Data acquisition · Control systems