Realistic Backtester for Perpetual Futures (Part 2/2) (With Code)
A guide to writing a realistic market simulator for Crypto perpetual futures.
(Part 2)
In Part 1, we wrote a basic event-driven simulator/backtester using candle data. In this Part 2, we extend it to make the simulator realistic by adding costs and funding. We also add support for simulating an arbitrary number of markets simultaneously.
Table of Contents
Part 1:
Introduction
Simulator/backtester architecture
Preparing the data
Simulating a single market
Simulating market orders
Part 2:
Simulating trading costs
Simulating funding
Simulating many markets
Finish
Subscriber materials (source code)
Simulating Trading Costs
Keep reading with a 7-day free trial
Subscribe to TaiwanQuant's Newsletter to keep reading this post and get 7 days of free access to the full post archives.