All Projects → YuMan-Tam → Deep Hedging

YuMan-Tam / Deep Hedging

Licence: gpl-3.0
Deep Hedging Demo - An Example of Using Machine Learning for Derivative Pricing.

Projects that are alternatives of or similar to Deep Hedging

Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (+100%)
Mutual labels:  jupyter-notebook, quantitative-finance
Alpha Mind
quantitative security portfolio analysis. The analysis pipeline including data storage abstraction, alpha calculation, ML based alpha combining and portfolio calculation.
Stars: ✭ 171 (+470%)
Mutual labels:  jupyter-notebook, quantitative-finance
Blog
Source code for my personal blog
Stars: ✭ 117 (+290%)
Mutual labels:  jupyter-notebook, quantitative-finance
Gym Continuousdoubleauction
A custom MARL (multi-agent reinforcement learning) environment where multiple agents trade against one another (self-play) in a zero-sum continuous double auction. Ray [RLlib] is used for training.
Stars: ✭ 50 (+66.67%)
Mutual labels:  jupyter-notebook, quantitative-finance
Quantitative Notebooks
Educational notebooks on quantitative finance, algorithmic trading, financial modelling and investment strategy
Stars: ✭ 356 (+1086.67%)
Mutual labels:  jupyter-notebook, quantitative-finance
Pyportfolioopt
Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
Stars: ✭ 2,502 (+8240%)
Mutual labels:  jupyter-notebook, quantitative-finance
Py Quantmod
Powerful financial charting library based on R's Quantmod | http://py-quantmod.readthedocs.io/en/latest/
Stars: ✭ 155 (+416.67%)
Mutual labels:  jupyter-notebook, quantitative-finance
Quant Notes
Quantitative Interview Preparation Guide, updated version here ==>
Stars: ✭ 180 (+500%)
Mutual labels:  jupyter-notebook, quantitative-finance
Financial Models Numerical Methods
Collection of notebooks about quantitative finance, with interactive python code.
Stars: ✭ 3,534 (+11680%)
Mutual labels:  jupyter-notebook, quantitative-finance
Alphatools
Quantitative finance research tools in Python
Stars: ✭ 226 (+653.33%)
Mutual labels:  jupyter-notebook, quantitative-finance
Stock analysis for quant
Different Types of Stock Analysis in Python, R, Matlab, Excel, Power BI
Stars: ✭ 525 (+1650%)
Mutual labels:  jupyter-notebook, quantitative-finance
Fastquant
fastquant — Backtest and optimize your trading strategies with only 3 lines of code!
Stars: ✭ 457 (+1423.33%)
Mutual labels:  jupyter-notebook, quantitative-finance
Research
Notebooks based on financial machine learning.
Stars: ✭ 714 (+2280%)
Mutual labels:  jupyter-notebook, quantitative-finance
Hottbox Tutorials
📙 HOTTBOX: Higher Order Tensors ToolBOX. Tutorials
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Course
Slides and Jupyter notebooks
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Nyc uber forecasting
Forecasting Uber demand in NYC neighborhoods
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Skymap
High-throughput gene to knowledge mapping through massive integration of public sequencing data.
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Islplot
Library to plot integer sets and maps
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Doing Frequentist Statistics With Scipy
Repository for the PyData DC 2016 tutorial
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook
Dscourses19
ECON 5253: Data Science for Economists, University of Oklahoma (Spring 2019)
Stars: ✭ 29 (-3.33%)
Mutual labels:  jupyter-notebook

Deep Hedging Demo

Pricing Derivatives using Machine Learning

Image of Demo

1) Jupyter version: Run ./colab/deep_hedging_colab.ipynb on Colab.

2) Gui version: Run python ./pyqt5/main.py Check ./requirements.txt for main dependencies.

The Black-Scholes (BS) model – developed in 1973 and based on Nobel Prize winning works – has been the de-facto standard for pricing options and other financial derivatives for nearly half a century. The model can be used, under the assumption of a perfect financial market, to calculate an options price and the associated risk sensitivities. These risk sensitivities can then be theoretically used by a trader to create a perfect hedging strategy that eliminates all risks in a portfolio of options. However, the necessary conditions for a perfect financial market, such as zero transaction cost and the possibility of continuous trading, are difficult to meet in the real world. Therefore, in practice, banks have to rely on their traders’ intuition and experience to augment the BS model hedges with manual adjustments to account for these market imperfections. The derivative desks of every bank all hedge their positions, and their PnL and risk exposure depend crucially on the quality of their hedges. If their hedges does not properly account for market imperfections, banks might underestimate the true risk exposure of their portfolios. On the other hand, if their hedges overestimate the cost of market imperfections, banks might overprice their positions (relative to their competitors) and hence risk losing trades and/or customers. Over the last few decades, the financial market has become increasingly sophisticated. Intuition and experience of traders might not be sufficiently fast and accurate to compute the impact of market imperfections on their portfolios and to come up with good manual adjustments to their BS model hedges.

These limitations of the BS model are well-known, but neither academics nor practitioners have managed to develop alternatives to properly and systematically account for market frictions – at least not successful enough to be widely adopted by banks. Could machine learning (ML) be the cure? Last year, the Risk magazine reported that JP Morgan has begun to use machine learning to hedge (a.k.a. Deep Hedging) a portion of its vanilla index options flow book and plan to roll out the similar technology for single stocks, baskets and light exotics. According to Risk.net (2019), the technology can create hedging strategies that “automatically factor in market fictions, such as transaction costs, liquidity constraints and risk limits”. More amazingly, the ML algorithm “far outperformed” hedging strategies derived from the BS model, and it could reduce the cost of hedging (in certain asset class) by “as much as 80%”. The technology has been heralded by some as “a breakthrough in quantitative finance, one that could mark the end of the Black-Scholes era.” Hence, it is not surprising that firms, such as Bank of America, Societe Generale and IBM, are reportedly developing their own ML-based system for derivative hedging.

Machine learning algorithms are often referred to as “black boxes” because of the inherent opaqueness and difficulties to inspect how an algorithm is able to accomplishing what is accomplishing. Buhler et al (2019) recently published a paper outlining the mechanism of this ground-breaking technology. We follow their outlined methodology to implement and replicate the “deep hedging” algorithm under different simulated market conditions. Given a distribution of the underlying assets and trader preference, the “deep hedging” algorithm attempts to identify the optimal hedge strategy (as a function of over 10k model parameters) that minimizes the residual risk of a hedged portfolio. We implement the “deep hedging” algorithm to demonstrate its potential benefit in a simplified yet sufficiently realistic setting. We first benchmark the deep hedging strategy against the classic Black-Scholes hedging strategy in a perfect world with no transaction cost, in which case the performance of both strategies should be similar. Then, we benchmark again in a world with market friction (i.e. non-zero transaction costs), in which case the deep hedging strategy should outperform the classic Black-Scholes hedging strategy.

References:

Risk.net, (2019). “Deep hedging and the end of the Black-Scholes era.”

Hans Buhler et al, (2019). “Deep Hedging.” Quantitative Finance, 19(8).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].