This project models and predicts funding rates for perpetual contracts using Monte Carlo simulations. It employs Merton’s jump diffusion for index prices and the Ornstein-Uhlenbeck process for funding rates to derive metrics like expected liquidation time and probability. These figures enhance risk management in perpetual contracts trading.
Modeling Funding Rates Using Stochastic Models and Quantifying Risk for BTC Prepetuals
1. Introduction
This project models and predicts funding rates for perpetual contracts using Monte Carlo simulations. It employs Merton’s jump diffusion process for index prices and the Ornstein-Uhlenbeck process for funding rates to derive metrics like expected liquidation time and probability. These figures enhance risk management in perpetual contracts trading.
2. Dependencies
The project requires the following Python libraries:
numpypandasplotlydatetimestatsmodelsglob
3. How to Run
- Clone the repository.
- Install the required libraries.
- Run the main script in a Jupyter Notebook or directly using a Python interpreter.
4. Project Structure
In this directory you will find:
- The project report
Project Report.pdfdetailing the modeling process, the pipeline architecture and the findings. - The
Datadirectory containing the dataset on which this project was conducted. - The
Pipeline.ipynbfile containing the python pipeline of the project. - The
Contracts.csvcontaning the featued contracts in the study.
5. Contributing
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
6. Contact
For any questions or suggestions, please reach out via Email on [yosri.benhalima@ept.ucar.tn].