Realistic Backtester for Perpetual Futures (Part 2/2) (With Code)
A guide to writing a realistic market simulator for Crypto perpetual futures.
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
Preparing the data
Simulating a single market
Simulating market orders
Simulating trading costs
Simulating many markets
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.