Introduction To Monte Carlo Analysis Part 3

By Bonolo Molopyane

Financial Applications

Within the Monte Carlo realm a vast number of applications exist. In this final part I bring together all the previous work as well as put into practice the theory we have gathered so far.

Applying the Metropolis-Hastings Algorithm

From the previous section we deduced a way in which we can generate a sample using arbitrary factors which combined produce a fairly accurate representation of reality

For absolute simplicity we will consider only one variable in which we wish to model, but this process is applicable to combinations of assets or derivatives of those assets with minimal adjustments. Here we make use of Dynamic asset pricing to estimate equilibrium as well as exploit arbitrage opportunities with the theory of mean reversion being the basis of our strategy. I will neglect the actual computation to give an intuitive understanding of the usage of the theory developed here:

  • Suppose an asset A has a considerable volatility and we desire to capitalize on this observation. The algorithm we have enables us to simulate our own stock movement and match it against A’s movements.
  • Assuming a Brownian motion as our q(x) (proposal distribution) we apply the Metropolis-Hastings Algorithm recording all observations.

At this point we have two alternatives of methods we can use for comparison:

  1. Since we have a defined process we can directly plot this pseudo-trend against the observed trend then make trade decisions based on the price differences. We then structure a program to make buy and sell decisions based on the relation between the two.
  • When the generated process is above the assets price this would reflect a buy as we assume the prices will retract to our model (Remember that our model gives a stationary distribution implying that as time goes on prices will converge to this steady state (Johannes & Polson, 2002))
  • For the generated process below the assets price, a sell trigger will be executed.
  1. To further strengthen our decision we may use a regression model based on the generated sample path. By so doing we are capable of even hypothesizing a future trend of asset A’s movement while having and understanding and control of current price fluctuations. Also the trade decisions applied in the first model may also be applied using the regression model as a benchmark.

This is an overly Simplified model which only gives an idea a possible use. The use of Brownian motion is included as our q based on its properties to model financial movements and the inclusion of noise within its computation (Morters & Peres, 2008). Also although theoretically we do not place restrictions on q, it is important to note that the choice of the proposal density will generally affect the performance of the algorithm. (Johannes & Polson, 2002, p. 26)

Barrier Options and Importance Sampling

We almost always consider vanilla options when describing and working with options and assume the same applies to exotic types. I will take a slightly different path and consider an exotic option; a barrier option to be exact. The following Example is extracted from the Handbook of Monte Carlo Methods by Kroese D,P Taime T and Botev Z,I:

Consider a Down-and-in call option with a monitored barrier and a payoff at maturity given by

H(Z)= (S_{tn}-K)^{+}I\left\{\dfrac{min}{1{\leq}i{\leq}n}St_{i }{\ll}\beta\right\}

Where St_{k}=S_{0}\exp\left(\left\{r-\dfrac{{\sigma }^{2}}{2}\right\}k\delta+\sigma\sqrt{\delta}\displaystyle\sum_{i=1}^{k}{{Z}_{i}}\right)

With Z={(Z_{1}, Z_{2}, Z_{3}, ..., Z_{n})}^{T}\sim N\left(0,I\right), \delta=\dfrac{T}{n}, and t_{k}=k\delta for k= 1, 2, 3, ... , n. The event of a positive payoff in this option can be rare and hence computation of the option price is greatly dependent on rare occurrences. As such estimating a robust probability is imperative and importance sampling may play an enormous role.

Furthermore: to obtain a good impotence sampling density we use what is known as the Cross-Entropy method. This among other things involve obtaining a pdf of the form

f(z) =\dfrac{\varrho (z)H(z)}{{e}^{rT}C* H(Z)}

where \varrho(z) the pdf of a standard normal random vector Z. Further enhancements of the proposed pdf may be acquired by using a variation of the Metropolis-Hasting algorithm called the hit-and-run algorithm.

Concluding Note and Summary

Metropolis-Hastings methodology has immense application which we may not discuss in single blog series, despite its general acceptance only in the 1990s (Hitchocock, 2012). Various adaptations of the Metropolis-Hastings algorithm including the Independence samplers and Random walk sampler further work to provide more relevant predictions. Hastings who saw transition matrices of the Markov chains central to the Metropolis presented his target distributions as an invariant distribution of \pi(x) of Markov Chains (Hitchocock, 2012, p. 155), a feature that as mentioned before has reshaped many disciplines.

The whole purpose of all these exercises at the end of the day is to come up with a sample that closely emulates reality but within our control. With this in mind numerous variance reduction techniques which aim to utilize known information about the model to obtain more accurate estimators exists (Kroese & Rubinstein, 2008). We briefly touched on one such technique in part two being the Non-Overlapping Batch means. Other well-known techniques that may provide moderate variance reduction include the use of control and/or arithmetic random variables, stratified sampling (Kroese & Rubinstein, 2008) and the all favorite Importance sampling.  (Kroese , Tamimre, & Botev, 20111)

Kroese et al considers Importance sampling one of the most important variance reduction technique (2011, p.362) more so in its ability in finding estimations for rare-event probabilities. As with most topics discussed in this series, only introductory material is given here with vast derivations of the sampling methods are found within academic literature.

For robust results, inclusion of the Cross-Entropy is beneficial. The intention of the Cross-Entropy method is to obtain density such that the distance between this density and the optimal density (reality) is as small as possible. Weighted Importance sampling is a variation which is most relevant for financial markets as it allocates more weight to factors that have a significant input on the process.

Applying all these methods in unison will greatly increase returns and drastically mitigate risk as well assist forming resistant investment strategy.


Hitchocock, D. B. (2012). A History of the Metropolis-Hasting Algorithm. The American Statistician, 254-257.

Johannes, M., & Polson, N. (2002). MCMC Methods for Financial E.

Kroese , D. P., Tamimre, T., & Botev, Z. I. (20111). Handbook of Monte Carlo Methods. Hoboken New Jersey: John Wiley & Sons Inc.

Kroese, D. P., & Rubinstein, R. Y. (2008). Simulation and the Monte Carlo Method. New Jersey: John Wiley & Sons, INC.

Morters, P., & Peres, Y. (2008). Brownian Motion.


0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *