**What is the Monte Carlo Method?**

The Monte Carlo (MC) method was developed by the team of the great Hungarian mathematician John von Neumann during World War II. John von Neumann (1903-1957) is a Hungarian mathematician, physicist, economic theorist, creator of the theory of games and professor of mathematics at Princeton.

In 1943-1955 he worked on the diffusion of neutrons in the Los Alamos laboratory and first used this method to describe the random nature of particle motion. The name Monte Carlo was intended to indicate the random (gambling) nature of phenomena.

The Monte Carlo method is used in various areas of mathematics and numerics. It contains calculations for randomized algorithms. It is used for the mathematical modeling of complex processes (integral calculus, chains of statistical processes) so that their results can be predicted with an analytical approach.

This method can be used wherever the problem under investigation can theoretically be described in a stochastic approach, although the problem itself can be strictly deterministic. It is particularly used in statistical physics and Bayesian statistics. The essence of the role in the Monte Carlo method is the random selection of the characterizing parameters of the process and this affects both the distributions of simple and complex processes.

**It consists of the following main parts:** the formulation of stochastic models of the examined real processes, modeling of random variables with a given probability distribution, solution of the statistical problem in the field of estimation theory.

From a mathematical point of view, the stages of the Monte Carlo algorithms are divided into ways of generating random variables and then reducing their errors and estimating the accuracy.

## Measurement of market risk - value-at-risk

The market risk is a consequence of price changes on the financial markets. Classically, they are calculated based on the deviation from the standard return. Value-at-risk is defined as the depreciation in the value of an asset such that the probability of obtaining it is within the accepted level of tolerance (usually a small number close to zero).

Value-at-risk is higher for longer periods of time and its value decreases with increasing confidence level (confidence and tolerance limits add up to 100%). The value at risk is calculated using the quantile of the return distribution. Typically, one of the following approaches is used to estimate:

**Variance-covariance method**- Assumption of a normal distribution of the returns.**Historical simulation method**- Consists of taking into account the past returns on a given financial instrument. For example, the returns from each subsequent day are taken into account and their empirical distribution is determined based on them. The effectiveness of this method depends on changes in the value of the courses. If this hasn't changed in the past, this method will be less effective.**Monte Carlo method**- It is characterized by the highest level of advancement. Experience and results from previous empirical experience are taken into account. Based on this, a hypothetical model for the formation of these "feet>" is created with the help of the geometric Brownian movement. Next, a large number of simulations of the value of the return rates are made and, based on them, a quantile of the distribution of the returns is obtained, which in turn enables a value-at-risk to be obtained.

## The Monte Carlo method in 12 steps

The Monte Carlo method is divided into classes of simulation methods. The Monte Carlo simulation consists of twelve steps:

- Indication of the parameter that forms the basis for measuring a particular financial problem, e.g. B. Profit, debt level or yield,
- Build a financial model of the problem under study using mathematical relationships between key variables, e.g. B. deterministic variables that only accept one value or random variables that accept many values,
- Determining the appropriate probability distribution for each random variable,
- the probability distribution of each random variable must be transformed into a cumulative probability distribution,
- A corresponding random value must be assigned to each value of a random variable.
- For every random number it must be possible to generate a random number,
- each random number must be assigned the corresponding value of a random variable,
- the appropriate value of the random variable determined in the previous step must be used to determine the basic measure of a given problem,
- the value determined in step 8 must be observed,
- repeat steps 6-9 many times,
- the value of the base measure saved from step 9 becomes the basis for determining its probability distribution and the cumulative probability distribution,
- The cumulative probability distribution created in step 11 must be analyzed, whereby the parameters of the descriptive statistics are determined.

The main problem in solving these methods is determining the probabilities of events and expected values of random variables.