- The paper demonstrates a Differential Machine Learning approach that integrates both price and gradient data to efficiently calibrate the Heston model.
- It leverages a twin network architecture with differentiable activations to enhance calibration accuracy and reduce computation time from hours to seconds.
- Experiments on synthetic and S&P 500 options data validate its real-time applicability and superior performance compared to traditional methods.
Applying Deep Learning to Calibrate Stochastic Volatility Models
Overview
The paper addresses the challenge of efficiently calibrating stochastic volatility models for financial markets, particularly focusing on the Heston model. These models provide a more realistic depiction of market dynamics compared to deterministic models but suffer from extensive computational demands. The authors propose a Differential Machine Learning (DML) approach to improve calibration speed and accuracy, utilizing deep neural networks (DNNs) to approximate pricing functions and their sensitivities.
Differential Machine Learning Approach
The DML approach involves the training of deep neural networks not only on option price data but also on the differentials of these prices with respect to input parameters, enhancing the network's ability to generalize and provide accurate pricing predictions with fewer data. This technique leverages backpropagation to calculate gradients efficiently and integrate them into the learning process.
- Architecture: The paper employs a twin network architecture that predicts both option prices and their gradients, sharing weights between the forward and backward propagation phases. Activations in this network are chosen to be differentiable, ruling out functions like ReLU.
- Training: The cost function combines the mean squared error (MSE) of prices and their differentials, weighted to prevent overfitting noisy labels. This serves as a regularization technique, akin to data augmentation, by incorporating more training data without bias introduction.
Numerical Experiments and Results
The experiments demonstrate the effectiveness of the DML technique using synthetic data generated by a range of model parameters. Regularization techniques such as dropout and gradient clipping are explored, with DML showing superior performance in terms of calibration accuracy and computational efficiency.
- Comparison with Traditional Methods: Differential evolution, a method traditionally used for global optimization, is compared with the DML approach. While both methods achieve similar calibration accuracy, the DML method drastically reduces computation time from hours to seconds.
- Application on Real Data: The trained DNN is tested against S&P 500 index options data, showing that DML-calibrated models match market prices closely and are computationally efficient, making real-time calibration feasible.
Implementation Details
For reproducibility, the paper provides pseudocode and implementation strategies:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import torch
import torch.nn as nn
import torch.optim as optim
class DifferentialNN(nn.Module):
def __init__(self):
super(DifferentialNN, self).__init__()
self.fc1 = nn.Linear(input_size, 50)
self.fc2 = nn.Linear(50, 50)
self.fc3 = nn.Linear(50, output_size)
self.activation = nn.Softplus()
def forward(self, x):
z1 = self.activation(self.fc1(x))
z2 = self.activation(self.fc2(z1))
y = self.fc3(z2)
return y
model = DifferentialNN()
optimizer = optim.Adam(model.parameters(), lr=0.001)
criterion = nn.MSELoss()
for epoch in range(num_epochs):
for inputs, labels in data_loader:
optimizer.zero_grad()
outputs = model(inputs)
loss = criterion(outputs, labels)
loss.backward()
optimizer.step() |
Conclusion
The DML framework offers a scalable and efficient solution for calibrating complex financial models like the Heston model, providing both theoretical rigor and practical applicability. Future work may focus on extending DML to other financial instruments and models, potentially integrating more sophisticated deep learning architectures to further enhance performance and utility in a production environment.