Skip to main content

Black Swan Events

Black Swan Event Modeling

Code

To simulate black swan events, a method incorporating Merton jump diffusion and stochastic volatility is employed. A self-contained market is generated, and then the price and time horizon is scaled appropriately in order to fit the market conditions at the time that the crash occurred.

The starting price for the self-contained market crash is always 100 and the price will always drop toward 0. The prices, volatilities, and jump intensities at each time step are made accessible via the internal market crash function. When applying this to the broader price simulation, this function should serve as a template for how to adjust the price. For example, if you want to simulate a market crash of 30% on the market, then these output prices represent the scaling factor, where 100 is the current price and 0 is 70% of the current price.

The length of the market crash cannot be controlled through this process. Therefore, if you would like a shorter or longer market crash, the resample_list function can be called with the output prices as input. This will then scale the length of the crash by the input factor while keeping the relative values intact, similar to an interpolation or a resampling operation.

  • The input value for initial volatility is some significantly increase value representing the start of the market crash. This can, for example, be 10x the previous time step's volatility.
  • The initial jump intensity serves as the beginning value for the AR(1) model of jump intensities.
  • The input value for theta can either be the mean of the historical/simulated volatilities up to the current time step or the volatility of the time step before the crash (the latter being easier and faster to derive).
  • The kappa input parameter represents the rate at which the volatility reverts to the long-term mean (theta).
  • The xi input parameter represents the volatility of the volatility (i.e., the standard deviation of the changes in the square root of the variance).
  • The other input parameters of mu and delta are the standard inputs used for GBM.