*Reading time: 11 minutes*

Inspired by recent ongoings in the literature of reinforcement learning, we constructed a highly modular framework for hedging a portfolio of derivatives in the presence of unpleasant market frictions and imperfections. The idea behind the framework is to encourage future research projects by reducing the setup costs. It reduces the cost to the extent that even undergraduate students are now able to set up small research projects using our framework. All without the need to implement any OpenAI environments or extensive Tensorflow models – basic Python and statistics knowledge are sufficient.

The most vanilla derivative is a European option – its payoff can be defined as following:

We can then perfectly hedge the derivative with a self-financing portfolio we if:

where is the stock price and the bond price. The portfolio is a sequence of random vectors denoting the units of shares and bonds. The portfolio needs to satisfy the adaptness condition, where for some measurable function . The performance of the hedging strategy can be measured via the resulting hedging error for the specific portfolio :

where is defined as the initial cash injection to hedge the liability . Due to the required time-discretization we observe a non-zero hedging error. As the the discrete time steps increase, the hedging error converges to .

The Black-Scholes (BS) model delivers a (theoretical) perfect hedge by holding a delta proportion of the underlying. The BS model is the industry’s standard when it comes to derivative-pricing, even though it is built on very strong assumptions such as:

- constant riskless return
- the stock follows a BM with a constant drift and volatility
- no dividends are paid
- no arbitrage opportunity
- unlimited borrowing and lending of any amount, even fractional, of cash at the riskless rate
- unlimited buy and sell of any amount, even fractional, of the stock
- no transaction costs

Starting from the Black-Scholes price for a European call option at time with time to maturity :

where

and is the standard normal CDF.

The derivative of with respect to the underlying asset, returns the respective rate of change of the theoretical option value:

In continuous time, this allows one to perfectly hedge the derivative by holding delta proportion of the underlying. In practice, the continuous time hedging is not feasible and the BS delta needs to be approximated at each point in time. This is where our our deep learning model comes into play.

We first construct a generic market environment based on Black-Scholes simulated data:

where is following a geometric Brownian motion. The stock paths are simulated 100.000 times where each path consists of 90 time-steps. The maturity of the European Option is +90 days. The initial setup is modified by slight variations in the options’ moneyness, implied volatility and drift.

Then, we construct a neural net that is capable of capturing the sequential structure of the data. For the simulated data, this might be overkill, but it will be handy when applying the model to empirical data. The output of the model is the hedging strategy itself, while the cost function is the conditional Value-at-Risk based on the PnL from the portfolio.

The first results from the training, imply that the model is able to replicate the performance of the ground-truth model.

In the future we would like to see how such a model-free and data-driven approach performs on empirical data. It can be easily extended to multiple risk-factors and risk objectives. We are also eager to test its capabilities within a scenario-based testing routine reflecting different market environments.