README.md

March 1, 2026 · View on GitHub

CTBench: Cryptocurrency Time Series Generation Benchmark

This repository presents CTBench, the first comprehensive Time Series Generation benchmark tailored for the cryptocurrency domain. Thank you for your interest!

drawing

Table of Contents

Overview of CTBench

drawing

Crypto-Centric Datasets

CTBench presents a meticulously curated, publicly available cryptocurrency dataset collected from major global exchanges. The data undergoes a standardized preprocessing pipeline with configurable options and feature selections tailored to the unique dynamics of crypto markets.

drawing

Dual-Task Evaluation

To bridge synthetic TSG with practical financial use, CTBench introduces dual-task benchmarks assessing both statistical similarity and the functional realism and trading utility of synthetic data. These tasks probe complementary aspects of TSG models: generation quality through predictive utility and reconstruction fidelity via tradable residual signals.

drawing

Trading Strategy

CTBench is explicitly designed to be strategy-agnostic, evaluating TSG models across a spectrum of trading paradigms to ensure broad applicability. We summarize three canonical strategies widely used in crypto trading:

  • S1: Cross-Sectional Momentum (CSM)
  • S2: Long-Only Top-Quantile (LOTQ)
  • S3: Proportional-Weighting (PW)

Financial Metric Suite

CTBench organizes eleven well-established evaluation metrics into five categories, each answering a distinct question practitioners face when considering synthetic data for production.

Error-based Evaluation

  • E1: Mean Squared Error (MSE)
  • E2: Mean Absolute Error (MAE)

Rank-based Evaluation

  • E3: Information Coefficient (IC)
  • E4: Information Ratio (IR)

Trading Performance

  • E5: Compound Annual Growth Rate (CAGR)
  • E6: Sharpe Ratio (SR)

Risk Assessment Metrics

  • E7: Maximum Drawdown (MDD)
  • E8: Value at Risk (VaR)
  • E9: Expected Shortfall (ES)

Efficiency

  • E10: Training Time
  • E11: Inference Time

TSG Model Zoo

CTBench summarizes popular TSG methods with their backbone models and financial datasets used.

YearMethodBackboneFinancial Datasets Used
2016C-RNN-GANGAN/
2017RCGANGAN/
2018T-CGANGAN/
2019TimeGANGANStocks
2019WaveGANGAN/
2020COT-GANGAN/
2020DoppelGANgerGAN/
2020Quant-GANGANSPX
2020SigCWGANGANSPX & DJI
2020TSGANGAN/
2021RTSGANGANStocks
2021Sig-WGANGANSPX & DJI
2021TimeGCIGAN/
2022CEGENGANStocks & Electric Price
2022COSCI-GANGAN/
2022PSA-GANGAN/
2022TsT-GANGANStocks
2022TTS-GANGAN/
2023AEC-GANGAN/
2023TT-AAEGANStocks
2021TimeVAEVAEStocks
2023CRVAEVAE/
2023TimeVQVAEVAE/
2024KoVAEVAEStocks
2023DiffTimeDiffusionStocks
2023TSGMDiffusionStocks
2024Diffusion-TSDiffusionStocks
2024FIDEDiffusionStocks
2024ImagenTimeDiffusionStocks
2024SDformerDiffusionStocks
2025PaD-TSDiffusionStocks
2020CTFPFlow/
2021Fourier-FlowFlowStocks
2024FlowTSFlowStocks
2018Neural ODEODE + RNN/
2019ODE-RNNODE + RNN/
2021Neural SDEODE + GANStocks
2022GT-GANODE + GANStocks
2023LS4ODE + VAE/
2024TimeLDMDiffusion + VAEStocks

Benchmarking Results

Predictive Utility Task

drawing

drawing

Statistical Arbitrage Task

drawing

drawing

Recommendations

CTBench reveal a four-way trade-off among TSG model families:

  1. VAE-based models ensure stable reconstruction but might under-react to fast-changing regimes.
  2. GAN-based approaches extract trend alpha but suffer from volatility-induced instability.
  3. Diffusion models handle regime clustering and fat tails well, but degrade under low signal regimes.
  4. Flow-based models prioritize likelihood but offer limited utility, while mixed-type ones are efficient but inconsistent in risk–return.

Based on these findings, CTBench distills them into scenario-based actionable recommendations for the end-users.

ScenarioRecommended TSG ModelsRationale
Trend-following / Directional MarketsCOSCI-GAN, KoVAECOSCI-GAN amplifies trend and dispersion; KoVAE offers alpha with higher drawdowns
Mean-reverting / Range-bound RegimesTimeVAE, Fourier-Flow, Diffusion-TSTimeVAE/Fourier-Flow provide balance; Diffusion-TS preserves rank order
Fee-sensitive / Low-turnover SettingsTimeVAE, Diffusion-TSSmooth residuals, stable Sharpe under transaction costs
Risk Tolerance / Portfolio DesignKoVAE, LS4, TimeVAE, Diffusion-TS, FIDEKoVAE/LS4 maximize returns with risk; TimeVAE/Diffusion-TS balance Sharpe and drawdown; FIDE is defensive
Deployment EfficiencyTimeVAE, LS4Fast retraining and low-latency inference; diffusion models better suited for offline use

Getting Started with CTBench

Environment Setup and Configuration

We recommend using conda:

conda create -n ctbench python=3.11
conda activate ctbench
pip install -r requirements.txt

Edit the file: config/config.yaml

Key configuration sections:

api:
data:
model:
cuda:
predictive_utility: 
statistical_arbitrage:
evaluation:

Benchmark Tasks

1. Predictive Utility Task (predictive_utility.py)

Evaluate how well the generated synthetic data supports predictive alpha modeling and trading.

  • Trains a time series forecasting model on features extracted from synthetic data.
  • Predicts log returns and simulates trading strategies.
  • Logs performance measures.
  • Saves predictions and equity curves.

Key config entries:

  • predictive_utility.do_predictive_utility: enable this module
  • predictive_utility.strategy: choose trading strategy (long_only_20, long_short_50, etc.)
  • predictive_utility.use_fee: whether to simulate transaction costs

2. Statistical Arbitrage Task (statistical_arbitrage.py)

Tests the ability to reconstruct residuals and generate tradeable mean-reverting signals.

  • Uses your model to reconstruct real returns.
  • Fits an OU (Ornstein-Uhlenbeck) model.
  • Calculates S-scores and makes long/short decisions.
  • Tracks portfolio equity over time.

Key config entries:

  • statistical_arbitrage.do_statistical_arbitrage: enable this module
  • statistical_arbitrage.use_fee: whether to include transaction costs

3. Evaluation (evaluate.py)

Analyze performance using standard financial metrics.

  • Automatically loads curve files from trading modules.

  • Supports yearly or full-period evaluation.

  • Outputs metrics.

    • CAGR (Compound Annual Growth Rate)
    • Sharpe Ratio
    • Max Drawdown
    • VaR (Value at Risk)
    • ES (Expected Shortfall)
    • MSE / MAE/ IC / IR (for predictive tasks)

Config entries:

  • evaluation.do_evaluation: run after strategies complete
  • evaluation.evaluate_by_year: yearly vs aggregate
  • evaluation.file_pattern: filter curve files

Running CTBench

To run strategies defined in your config:

python main.py

This will:

  • Load config/config.yaml
  • Execute predictive_utility, statistical_arbitrage, or both
  • Run evaluation if enabled

Creating a Custom Model

  1. Add a new file in model/, e.g. model/mymodel.py
  2. Define a class mymodelModel with the required interface:
class mymodelModel(nn.Module):
    def __init__(self, window_size, num_features, device, scaler, **kwargs): ...
    def fit(self, windows, num_features): ...
    def generate(self, num_samples): ...
    def reconstruct_single_window(self, window_tensor): ...
    def compute_windowed_residuals_for_training(self, data): ...
  1. Set model.name: mymodel in config/config.yaml.

Output Structure

  • xgboost_predictions/: predictive regression results
  • feature_importances/: saved XGBoost feature importances
  • performance_logs/: TensorBoard logs (optional)

Citation

@inproceedings{
  ang2025ctbench,
  title={CTBench: Cryptocurrency Time Series Generation Benchmark},
  author={Ang, Yihao and Wang, Qiang and Huang, Qiang and Bao, Yifan and Xi, Xinyu and Tung, Anthony KH and Jin, Chen and Huang, Zhiyong},
  booktitle={The Fourteenth International Conference on Learning Representations},
  year={2026},
  url={https://openreview.net/forum?id=RzT2sombPD}
}