Synthetic Data in Inferential Backtesting
A Framework for Learning and Evaluation of Trading Models
with OHLC Time Series Simulated via
ARMA–GARCH–Copula and AI Foundation Forecasting Model

Core Skills You’ll Master
By the end of this Bundle, you will be able to:
Explain why single-path historical backtesting is structurally limited and articulate the case for synthetic market environments
Detect local extrema in OHLC price series using the Directional Change (DC) framework, and use these extrema to partition the in-sample interval into structurally coherent subblocks
Model marginal distributions flexibly using spliced KDE–GPD functions that accurately capture both bulk behaviour and extreme tails
Simulate synthetic OHLC paths via an ARMA–GARCH–Copula architecture that enforces open–high–low–close ordering constraints by construction
Apply marginal and dependence stress mechanisms to generate controlled adverse market scenarios
Forecast synthetic out-of-sample OHLC paths probabilistically using the TOTO AI foundation model as a Monte Carlo generative engine
Calibrate trading models across synthetic environments using standard, robust, and stress-aware objective functions
Construct the synthetic performance matrix — the core output of the framework — enabling distributional inference on trading models: e.g., estimating the probability of achieving a performance target and testing it nonparametrically
Use the synthetic performance matrix for Model Confidence Set comparisons across competing strategies within trading models
Use the synthetic performance matrix to measure predictive consistency between real-data and synthetic-data trading model rankings
Implement all core procedures in both R and Python using the ready-to-run project folders included in the bundle
Who Is This Bundle For?
This Bundle is ideal for:
Quantitative researchers and practitioners who want to move beyond single-path historical evaluation and build rigorously controlled, distribution-aware backtesting pipelines
Trading model developers and strategy analysts seeking a systematic framework for calibrating, stress-testing, and comparing models across multiple simulated market regimes
Risk and portfolio managers interested in generating controlled stressed market environments and examining tail-performance properties of strategies under adverse scenarios
Financial analysts and data scientists who want to combine AI foundation model forecasting with classical simulation methods for OHLC data
Graduate students and academics in quantitative finance and econometrics looking to deepen their understanding of synthetic data, OHLC modelling, and statistical inference in backtesting
R and Python practitioners who want ready-to-run, well-structured implementations they can study, adapt, and build on in their own projects
Bundle Description
Every realised market history is a single trajectory of an irreducibly stochastic process. No amount of historical data can reveal the distribution of outcomes that could plausibly have unfolded — a structural constraint that classical backtesting inherits in full. Even the most disciplined Walk-Forward framework ultimately calibrates a model on one observed past and evaluates it against one observed future.
This Bundle builds a three-pillar framework that replaces the single-path evaluation paradigm with a principled synthetic alternative. Step by step, you will:
Understand the structural limitation of single-path backtesting and how synthetic data environments address it, providing a distribution of plausible market trajectories rather than a single historical outcome
Detect and use Directional Change (DC) extrema to segment the in-sample price series into structurally coherent subblocks, which serve as the foundation for block-wise simulation
Model marginal distributions of OHLC components using spliced KDE–GPD cumulative distribution functions that combine kernel density estimation for the bulk with Generalised Pareto tails — capturing both typical variation and extreme moves
Simulate synthetic OHLC paths through an ARMA–GARCH–Copula latent-variable architecture, where the OHLC bar is encoded into midpoint, half-range, and relative width and location variables, which are then decoded back into OHLC bars, preserving their geometric ordering
Apply stress mechanisms — including tail-stress via the t-copula and correlation-matrix replacement — to generate controlled adverse scenarios for resilience testing
Forecast out-of-sample OHLC paths probabilistically using the TOTO decoder-only transformer, a zero-shot, mixture-based AI foundation model for time series, deployed as a Monte Carlo generative engine
Calibrate trading models using a standard objective function (maximising expected performance), a robust objective (targeting lower quantiles of the performance distribution), and a stress-aware objective (blending baseline and stressed performance), depending on the desired balance between performance and resilience
Construct the synthetic performance matrix — whose rows are synthetic performance trajectories across Walk-Forward out-of-sample blocks — and use it for distributional inference: Monte Carlo estimates of probability of achieving a performance target, and nonparametric binomial proportion tests for achieving an assumed performance target
Choose a subset of strategies, with Model Confidence Set comparisons, that are indistinguishable from the best trading strategies
Measure predictive consistency between synthetic and real-data model rankings, providing an empirical check on whether the synthetic environment preserves the relative ordering of competing strategies
The Bundle accompanies the PDF Textbook with three fully functional project folders — two for ARMA–GARCH–Copula OHLC simulation (R and Python) and one for TOTO-based probabilistic OHLC forecasting (Python) — providing ready-to-run implementations of all core procedures introduced in the Textbook.
The PDF Textbook is deliberately written as a methodological platform — not a fully verified econometric theory — occupying a space between a technical manual, a preliminary research proposal, and a conceptual provocation. Its value lies in what it makes thinkable and computable that was not so before.
Requirements / Prerequisites
Intermediate familiarity with financial time series concepts, including returns, volatility, and OHLC data structures
Working knowledge of backtesting principles and Walk-Forward evaluation methodology
Proper understanding of mathematical and statistical modelling: local extrema, calibration and optimization, distributions, likelihood, Monte Carlo simulations
Accurate knowledge of time series modelling, specifically including ARMA–GARCH models
Basic understanding of copula modelling and its functionalities—readers are directed to open educational resources provided by the author
No prior knowledge of AI foundation models or the TOTO model is required—both are introduced and contextualised within the PDF Textbook
Practical experience with R or Python for data analysis and statistical computing (for the accompanying project folders)
Bundle Contents
View full detailed table of contents—PDF Textbook (63 pages)
- 1. Introduction
- 2. Conceptual Foundations: Synthetic Data and Backtesting
- 2.1 Synthetic Data
- 2.1.1 Concept and Origins of Synthetic Data
- 2.1.2 Motivations for Synthetic Data in Finance
- 2.1.3 Methodological Role and Generation Techniques
- 2.1.4 Limitations, Risks, and Institutional Implications
- 2.2 Backtesting
- 2.2.1 The Role of IS and OOS Blocks
- 2.2.2 Walk-Forward with Rolling Window
- 2.2.3 Walk-Forward with Expanding Window
- 2.2.4 Twofold Interpretations of OOS Performance
- 2.1 Synthetic Data
- 3. Directional Changes (DC) Framework in Local Extrema Identification
- 3.1 Setting the First Extremum
- 3.2 Setting Local Maxima
- 3.3 Setting Local Minima
- 3.4 Computational Implementation of DC-Based Extrema Detection
- 3.4.1 Functional Interface and Interpretation
- 3.4.2 Illustration of detected extrema and confirmation ordering
- 4. A Framework for Simulating Synthetic OHLC Time Series
- 4.1 Modeling Marginal Distributions with Spliced CDFs
- 4.1.1 Conceptual Overview and Implementation Interface
- 4.1.2 Mathematical Construction of the Spliced CDF
- 4.2 ARMA–GARCH–Copula Simulation of OHLC Paths
- 4.2.1 Latent Representation of OHLC Data
- 4.2.2 Marginal Dynamics: ARMA–GARCH Models
- 4.2.3 From Standardized Innovations to PIT Uniforms via Spliced CDFs
- 4.2.4 Enforcement of the Midpoint Drift via Projection
- 4.2.5 Stressing Mechanisms
- 4.2.6 Reconstruction of OHLC Paths
- 4.2.7 Simulation Interface
- 4.1 Modeling Marginal Distributions with Spliced CDFs
- 5. A Framework for Synthetic Forecasting of OHLC Time Series
- 5.1 The TOTO Foundation Model — Key Properties
- 5.2 Forecasting OHLC Paths with TOTO Foundational Model
- 5.2.1 Forecasting Mechanism
- 5.2.2 Forecasting Interface
- 6. Synthetic Backtesting Framework
- 6.1 Architecture of the Synthetic Backtesting Framework
- 6.2 Synthetic In-Sample Environments
- 6.2.1 Quantile Path Extraction
- 6.2.2 DC-Based Blockwise Bridge Simulation
- 6.3 Model Calibration in Synthetic In-Sample Environments
- 6.3.1 Standard Model Parameters Learning (Calibration)
- 6.3.2 Robust Parameter Learning (Calibration)
- 6.3.3 Stress-Aware Learning (Calibration)
- 6.4 Synthetic Out-of-Sample Environments
- 6.4.1 Synthetic Performance Trajectories
- 6.4.2 Classical vs Synthetic Walk-Forward Evaluation
- 6.4.3 Trading Model Comparison Based on Performance Metric 𝑷
- References
View list of figures in PDF Testbook
- Figure 2.1 — WF backtesting process with rolling window
- Figure 2.2 — WF backtesting process with expanding window
- Figure 3.1 — Directional–Change–Based Detection of Local Maxima and Minima
- Figure 3.2 — Local minima and maxima identified under the directional change framework for \(\theta = 0.05\) and \(\alpha = 0.9\)
- Figure 3.3 — Resolution of equal-valued candidate extrema under the directional change framework \((\theta = 0.1,\ \alpha = 0.9)\)
- Figure 4.1 — Comparison of alternative ARMA–GARCH order combinations based on goodness-of-fit criteria (AIC and BIC)
- Figure 6.1 — Synthetic Backtesting Framework within the Walk-Forward (WF) paradigm—Conceptual Overview
View contents—R & Python Scripts & Projects Folders
- Python Project: ARMA–GARCH–Copula OHLC Simulation
dc_extrema.py— core DC extrema detection functionspliced_kde_gpd.py— core spliced KDE–GPD marginal model functionsimulate_ohlc_paths.py— core OHLC simulation engine functionsimulate_ohlc_paths_exercise.py— exercise scriptsimulate_ohlc_paths_exercise_guide.pdf— exercise guideohlc.csv— sample OHLC data file- Pre-configured virtual environment (
.venv)
- R Project: ARMA–GARCH–Copula OHLC Simulation
dc_extrema.R— core DC extrema detection functionspliced_kde_gpd.R— core spliced KDE–GPD marginal model functionsimulate_ohlc_paths.R— core OHLC simulation engine functionsimulate_ohlc_paths_exercise.R— exercise scriptsimulate_ohlc_paths_exercise_guide.pdf— exercise guideohlc.csv— sample OHLC data filesynthetic_agc_ohlc_simulation_R.Rproj— R project file
- Python Project: TOTO-Based Probabilistic OHLC Forecasting
toto_forecast.py— core TOTO forecasting engine functiontoto_forecast_ohlc.py— core OHLC-adapted forecasting functiontoto_forecast_ohlc_exercise.py— exercise scripttoto_forecast_ohlc_exercise_guide.pdf— exercise guideohlc.csv— sample OHLC data file- Pre-configured virtual environment (
.venv) - Note: TOTO scripts are Python-only (relies on PyTorch and Hugging Face Transformers)
About the Author
Dr Krzysztof Ozimek, PRM
Quantitative finance practitioner and researcher with over 30 years of experience in financial modelling, risk management, and algorithmic strategy development. Holder of a doctorate and the Professional Risk Manager (PRM) designation, with an institutional background spanning trading, risk, and quantitative research.
His educational publications are designed to make rigorous quantitative methods concrete, executable, and accessible—combining mathematical precision with working implementations in R and Python. This bundle is part of a broader series of self-published educational resources for quantitative practitioners.
FAQ
Q: What does this Bundle contain?
A: The Bundle contains a PDF Textbook and three ready-to-run project folders: a Python project and an R project for ARMA–GARCH–Copula OHLC simulation, and a Python project for TOTO-based probabilistic OHLC forecasting. Each project folder includes core function files, an exercise script, an exercise guide PDF, and a sample OHLC data file. The Python projects include pre-configured virtual environments.
Q: Is this a research monograph or a textbook?
A: It is written as a methodological and educational platform — between a technical manual, a preliminary research proposal, and a conceptual provocation. Many formal statistical justifications that would appear in a journal article are intentionally absent. The goal is to construct a coherent, computationally grounded framework that makes synthetic backtesting thinkable and practicable.
Q: Do I need to know copula theory in advance?
A: No. Copula theory is not derived from scratch in the Textbook. Readers are directed to open educational courses by the author, which provide all the background needed to engage fully with the copula components of the simulation framework. However, copula applications are introduced in the Textbook most seamlessly.
Q: Why is the TOTO forecasting project available in Python only?
A: The TOTO foundation model is distributed via Hugging Face and relies on PyTorch and the Hugging Face Transformers ecosystem, for which no stable R equivalent currently exists. This is a deliberate design decision, clearly communicated in the Textbook.
Q: Can I use the scripts in my own projects?
A: Yes. The core function files (e.g. simulate_ohlc_paths.py/.R, toto_forecast_ohlc.py) can be extracted and used independently. They are provided as open educational examples: you are free to use, modify, and adapt them for your own learning, research, or personal projects, provided that clear attribution to Dr Krzysztof Ozimek is included.
Q: Is this a production-ready trading system?
A: No. All materials are provided strictly for educational purposes. The scripts are enhancement-ready, functionally complete tools whose primary role is educational. They do not constitute investment, trading, financial, legal, or professional advice.
Cite This Work
Ozimek, K. (2026). Synthetic data in inferential backtesting: A framework for learning and evaluation of trading models with OHLC time series simulated via ARMA–GARCH–Copula and AI foundation forecasting model (1st ed.). Eduinn Krzysztof Ozimek.
BibTeX citation
@book{ozimek2026syndata,
author = {Ozimek, Krzysztof},
title = {Synthetic Data in Inferential Backtesting},
subtitle = {A Framework for Learning and Evaluation of Trading Models with OHLC Time Series Simulated via
ARMA--GARCH--Copula and AI Foundation Forecasting Model},
edition = {1},
publisher = {Eduinn Krzysztof Ozimek},
address = {Warsaw, Poland},
year = {2026},
isbn = {978-83-980747-0-4},
url = {https://www.drkrzysztofozimek.com/synthetic-data-inferential-backtesting-textbook/},
orcid = {0009-0005-5210-9205}
}
Accessibility
PDF documents included in this bundle are text-selectable and compatible with screen readers. Code files are provided as plain text scripts compatible with standard IDEs.
