You are on page 1of 25

[Monte Carlo simulation of value at risk calculation (var) of stock prices]

At

Delhi

Submitted in partial
fulfillment Of the requirement
For

MASTER OF BUSINESS ADMINISTRATION

Submitted to
Prof. Deepti

Submitted By
Shubham Tyagi & Vaibhav Mishra
M.B.A (Gen)
2K19/UMBA/21 & 2K19/UMBA/24

University School of Management and Entrepreneurship,


Delhi Technological University,
Bawana, New Delhi
2020

1
ACKNOWLEDGEMENT

We, Shubham Tyagi and vaibhav Mishra, sincerely acknowledge the support
given and the knowledge imparted by our mentors, without whom the project
wouldnothavetakenshapeinthedesireddirection.Everysinglebitputinbyour mentor
is precious in its own manner.
We wish to thank Prof. Deepti, her constant support and being the master mind
and our ‘mentor’ for the project. We owe her priceless gratitude for making us
work under her profound knowledge.

2
TABLE OF CONTENTS

Acknowledgement.................................................................................................................................. 2
Introduction............................................................................................................................................4
Objective................................................................................................................................................. 5
Limitations of the Research.................................................................................................................. 6
Literature Review.................................................................................................................................. 7
VALUE AT RISK......................................................................................................................................7
Types OF VAR....................................................................................................................................... 9
HISTORICAL VAR.................................................................................................................................10
MONTE- CARLO SIMULATION............................................................................................................12
CALCULATING MONTE CARLO SIMULATION..................................................................................... 14
Historical Simulation vs Monte Carlo Simulation........................................................................... 17
EXPERIMENT ..................................................................................................................................... 18
Analysis................................................................................................................................................. 20
Conclusion............................................................................................................................................ 23
References.............................................................................................................................................24
Data....................................................................................................................................................... 28

3
INTRODUCTION

Risk measurement provides fundamental support to decision making within the


industry. The market risk of a portfolio refers to the chance of financial loss due
to the joint movement of systematic economic variables such as interest and
exchange rates. Measuring market risk is essential to regulators in evaluating
solvency and to risk managers in apportioning limited capital.

Value at Risk (VaR) is standard risk measures and reporting tool in current risk
management practice. It measures the possible loss on a portfolio for a stated level
of confidence if adverse movements in market prices were to occur. The VaR
methodologies

Historical Simulation and Monte Carlo Simulation are discussed. After analyzing
ten stocks on the National Stock Exchange (N.S.E), the Monte Carlo Simulation
provides a better VaR estimate than the Historical Simulation.

4
5
OBJECTIVE

1. Calculating “VALUE AT RISK (VAR)” for investment of different investors


like foreign institutional investors, mutual funds houses and retail investors in
stocks market (shares) .
2. Using Monte Carlo Simulation to calculate the VaR values to estimate risk

3. Forecasting prices at a particular ‘N’ in future

4. Potential profit and losses of portfolio of different assets over a period of time.

6
Limitations of the Research

Although a proper care has been taken to keep the study unaffected of any
inconsistencies, a few have always been unavoidable listed below are a few of
the limitations that this study suffers from: -
1) This study is based on secondary data; its accuracy depends on the veracity &
accuracy of the data.
2) Data limitation and processing power of hardware for processing and
simulating that data is limited.
3) The study is done from a neutral, no biased attitude, but due to limited
knowledge, due to which some aspects of the study might have been out of my
understanding purview, could not have been done justice with. Moreover
secondary data analyzed & studied, may be biased, depending on the source
4) Due to time constraints, it is very much probable that some aspects may have
not been properly dealt with & sample size had to be limited.

7
Literature Review

Risk, in the financial world is the cost of doing business, the uncertainty of any
transaction or activity usually measured in a monetary value
or is a measure of the volatility of a portfolio’s future value . Banks and other
institutions face financial risks during their period of operation. In risk
management, risk is categorized into three namely operational risk, credit risk and
market risk. Risk management has become a crucial topic for financial institutions,
non - financial corporations, regulators and asset managers. It deals with how risk
is controlled and balances the chance of gains. Banks and financial institutions
utilize a number of highly sophisticated mathematical and statistical techniques to
manage market risk. Value at Risk (VaR) developed in 1993 is now a standard
and widely accepted measure in managing market risk. The rules of using
VaR are well recognized and acknowledged in the short-term risk management
practice. VaR is a measure for estimating market risks of a given portfolio. From
a financial perspective, VaR is an estimate of how much can be lost from a
portfolio over a set time horizon with a specified degree of confidence. The
portfolio can be either a single trader’s portfolio or the portfolio of the whole bank.
VaR is used most often by commercial and investment banks even though it can
be used by any entity to measure its risk exposure, to capture the potential loss in
value of their traded portfolios from adverse market movements over a specified
period. This is then compared to their available capital and cash reserves to ensure
that the losses can be covered without putting the firms at risk

I. VALUE AT RISK
Linsmeier and Pearson described VaR as follows: “VaR is a single, summary,
statistical measure of possible portfolio losses”. VaR measures the worst
expected loss over a given horizon under normal market conditions at a given
level of confidence. In statistical terms the VaR can be thought of as a quartile
of the returns distribution.

Dowd presented a detailed guide to VaR and how is applied in risk management
in his book “Beyond Value-at-Risk: The New Science of Risk Management”
which addressed the use of VaR in many fields of risk management in a
company, while analyzing the usefulness of the measure.

8
UNDERSTANDING VAR

IF a fund manager has rs. 100000, what is the maximum loss in a single day .
That is given by VAR values .let us suppose we have :
5% value at risk =12,500 rs. It means:
a) 95% confident , that losses will not exceed 12,500 in a single day
b) There are 5 %chance that portfolio losses will be 12500 or more.

A1% ,5%, and 10% VaR would he denoted as VR{1%), VaR(5$), and VaR(10%),
respectively

The VaR (5%) of $15,000 indicates that there is a 5% chance that on any given
day, the portfolio will experience a loss of S15.000 or more

95% chance that on any given day the portfolio will experience either a loss less
than $15.000 or a gain

9
Advantages of Value at Risk (VaR)

1. Easy to understand
Value at Risk is a single number that indicates the extent of risk in a given
portfolio. Value at Risk is measured in either price units or as a percentage. This
makes the interpretation and understanding of VaR relatively simple.

2. Applicability
Value at Risk is applicable to all types of assets – bonds, shares,
derivatives, currencies, etc. Thus, VaR can be easily used by different banks and
financial institutions to assess the profitability and risk of different investments,
and allocate risk based on VaR.

3. Universal
The Value at Risk figure is widely used, so it is an accepted standard in buying,
selling, or recommending assets.

Limitations of Value at Risk

1. Large portfolios
Calculation of Value at Risk for a portfolio not only requires one to calculate the
risk and return of each asset but also the correlations between them. Thus, the
greater the number or diversity of assets in a portfolio, the more difficult it is to
calculate VaR.

2. Difference in methods
Different approaches to calculating VaR can lead to different results for the same
portfolio.

3.Amount of loss
It tell how much chance that losses occur ,but doesn’t tell upto how much limit
your losses goes

4. Assumptions
Calculation of VaR requires one to make some assumptions and use them as
inputs. If the assumptions are not valid, then neither is the VaR figure.

Key Elements of Value at Risk


1. Specified amount of loss in value or percentage
2. Time period over which the risk is assessed
3. Confidence interval

Example VaR Assessment Question


If we have a 95% confidence interval, what is the maximum loss that can occur
from this investment over a period of one month?

10
Methods Used for Calculating VAR

DELTA NORAMAL VAR


It simply assume the data to be normally distributed VAR is calculated by the
formula :
VAR= MEAN+Z*(STANDARD DEVIATION)

HISTORICAL SIMULATION
The historical method simply re-organizes actual historical returns, putting them
in order from worst to best. It then assumes that history will repeat itself, from a
risk perspective.
Historical Simulation (HS) is a non-parametric VaR method which assumes that
past returns are a good guide for forecasting future returns. HS represents the
easiest way of calculating VaR for many portfolios. The approach makes no
assumptions about the statistical distribution of these returns because it uses past
data on daily returns to arrive at a VaR number and the risk factors are deduced
from historical observations. HS has some enviable advantages due to its
simplicity. It does not require estimation of statistical entities like volatilities
and correlations and most importantly does not make any assumptions about the
probability distributions therefore fat tails of the return distributions are
accounted for. The method can also be applied practically too any type of
financial portfolio and uses full valuations. However, HS has some
disadvantages such as, enough data is not available. This problem arises when
new financial instruments which were just introduced to the market or have
shorter market data are introduced to the portfolio. Since HS mainly relies
onhistorical data, it is the most difficult when dealing with new assets for a clear
reason: there is no historic data available to calculate the Value at Risk even
11
though this could be a disadvantage to any of the approaches for estimating VaR.
The steps taken to calculate VaR using Historical Simulation are as
follows:
 First returns of assets are drawn directly from the historicalprices
 Using the desired confidence level, VaR is calculated by taking a
percentile of the returns and multiplying it by the notional value
and square root of the holdingperiod

Var conversion
Var can be converted from a 1-day basis to a longer basis by
multiplying the daily VAR by the square root of the number of
days

Historical and Delta normal VAR Calculation for


TATA STEEL & HDFC

12
Monte Carlo Simulation

Monte Carlo simulations are used to model the probability of different outcomes
in a process that cannot easily be predicted due to the intervention of random
variables. It is a technique used to understand the impact of risk and uncertainty in
prediction and forecasting models. The method involves developing a model for
future stock price returns and running multiple hypothetical trials through the
model. A Monte Carlo simulation refers to any method that randomly generates
trials, but by itself does not tell us anything about the underlying methodology.

For most users, a Monte Carlo simulation amounts to a "black box" generator of
random, probabilistic outcomes.

Monte Carlo Simulation is a mathematical technique that generates random


variables for modelling risk or uncertainty of a certain system.

The random variables or inputs are modelled on the basis of probability


distributions such as normal, log normal, etc. Different iterations or simulations
are run for generating paths and the outcome is arrived at by using suitable
numerical computations.

Monte Carlo Simulation is the most tenable method used when a model has
uncertain parameters or a dynamic complex system needs to be analysed. It is a
probabilistic method for modelling risk in a system.

The method is used extensively in a wide variety of fields such as physical


science, computational biology, statistics, artificial intelligence, and quantitative
finance. It is pertinent to note that Monte Carlo Simulation provides a
probabilistic estimate of the uncertainty in a model. It is never deterministic.
However, given the uncertainty or risk ingrained in a system, it is a useful tool for
approximation of realty.

HISTORY

Monte Carlo simulations are named after the popular gambling destination in
Monaco, since chance and random outcomes are central to the modeling
technique, much as they are to games like roulette, dice, and slot machines.

The technique was first developed by Stanislaw Ulam, a mathematician who


worked on the Manhattan Project. After the war, while recovering from brain
surgery, Ulam entertained himself by playing countless games of solitaire. He
became interested in plotting the outcome of each of these games in order to
observe their distribution and determine the probability of winning. After he
shared his idea with John Von Neumann, the two collaborated to develop the
Monte Carlo simulation.
13
The Monte Carlo Simulation technique was introduced during the World War II.
Today, it is used extensively for modeling uncertain situations.

Although we have a profusion of information at our disposal, it is difficult to


predict the future with absolute precision and accuracy. This can be attributed to
the dynamic factors that can impact the outcome of a course of action. Monte
Carlo Simulation enables us to see the possible outcomes of a decision, which can
thereby help us take better decisions under uncertainty. Along with the outcomes,
it can also enable the decision maker see the probabilities of outcomes.

Monte Carlo Simulation uses probability distribution for modelling a stochastic or


a random variable. Different probability distributions are used for modelling input
variables such as normal, lognormal, uniform, and triangular. From probability
distribution of input variable, different paths of outcome are generated.

Compared to deterministic analysis, the Monte Carlo method provides a superior


simulation of risk. It gives an idea of not only what outcome to expect but also the
probability of occurrence of that outcome. It is also possible to model correlated
input variables.

For instance, Monte Carlo Simulation can be used to compute the value at risk of
a portfolio. This method tries to predict the worst return expected from a portfolio,
given a certain confidence interval for a specified time period.

Understanding a Monte Carlo Simulation


When faced with significant uncertainty in the process of making a forecast or
estimation, rather than just replacing the uncertain variable with a single average
number, the Monte Carlo Simulation might prove to be a better solution by using
multiple values.

Since business and finance are plagued by random variables, Monte Carlo
simulations have a vast array of potential applications in these fields. They are
used to estimate the probability of cost overruns in large projects and the
likelihood that an asset price will move in a certain way.

Telecoms use them to assess network performance in different scenarios, helping


them to optimize the network. Analysts use them to assess the risk that an entity
will default, and to analyze derivatives such as options

Insurers and oil well drillers also use them. Monte Carlo simulations have
countless applications outside of business and finance, such as in meteorology,
astronomy, and particle physics.

Normally, stock prices are believed to follow a Geometric Brownian motion


(GMB), which is a Markov process,
14
Monte Carlo Simulation Method
The basis of a Monte Carlo simulation is that the probability of varying outcomes
cannot be determined because of random variable interference. Therefore, a
Monte Carlo simulation focuses on constantly repeating random samples to
achieve certain results.

A Monte Carlo simulation takes the variable that has uncertainty and assigns it a
random value. The model is then run and a result is provided. This process is
repeated again and again while assigning the variable in question with many
different values. Once the simulation is complete, the results are averaged
together to provide an estimate.

Calculating a Monte Carlo Simulation

Normally, stock prices are believed to follow a Geometric Brownian motion


(GMB), which is a Markov process

The formula for GBM is found below:

​ ΔS​ /S/S= μΔt + σϵΔt​

where: S=the stock price

ΔS=the change in stock price

μ=the expected return

σ=the standard deviation of returns

ϵ=the random variable

Δt=the elapsed time period​

One way to employ a Monte Carlo simulation is to model possible movements of


asset pricesusing excelor a similar program. There are two components to an
asset's price movement: drift, which is a constant directional movement, and a
random input, which represents market volatility

By analyzing historical price data, you can determine the drift, standard
deviation, variance, and average price movement of a security. These are the
building blocks of a Monte Carlo simulation.

To project one possible price trajectory, use the historical price data of the asset to
generate a series of periodic daily returns using the natural logarithm (note that
this equation differs from the usual percentage change formula):

15
Periodic Daily Return=ln (Day’s Price/ Previous Day’s Price​ )​

Next use the AVERAGE, STDEV.P, and VAR.P functions on the entire resulting
series to obtain the average daily return, standard deviation, and variance inputs,
respectively. The drift is equal to:

​ Drift=Average Daily Return−Variance/2​

where:Average Daily Return=Produced from Excel’sAVERAGE function from

periodic daily returns seriesVariance=Produced from Excel’sVAR.P function fro


m

periodic daily returns series​

Alternatively, drift can be set to 0; this choice reflects a certain theoretical


orientation, but the difference will not be huge, at least for shorter time frames.

Next obtain a random input:

Random Value=σ×NORMSINV(RAND())

where:σ=Standard deviation, produced from Excel’s


STDEV.P function from periodic daily returns series
NORMSINV and RAND=Excel functions​

The equation for the following day's price is:

Next Day’s Price=Today’s Price×(Drift+Random Value)​

To take e to a given power x in Excel, use the EXP function: EXP(x). Repeat this
calculation the desired number of times (each repetition represents one day) to
obtain a simulation of future price movement. By generating an arbitrary number
of simulations, you can assess the probability that a security's price will follow a
given trajectory.

16
Here is an example of total value of portfolio over the 250 days, from 20/oct/2020:

The frequencies of different outcomes generated by this simulation will form


a normal distribution, that is, a bell curve. The most likely return is in the middle
of the curve, meaning there is an equal chance that the actual return will be higher
or lower than that value.

The probability that the actual return will be within one standard deviation of the
most probable ("expected") rate is 68%; that it will be within two standard
deviations is 95%, and that it will be within three standard deviations is
99.7%. Still, there is no guarantee that the most expected outcome will occur, or
that actual movements will not exceed the wildest projections.

Crucially, Monte Carlo simulations ignore everything that is not built into the
price movement (macro trends, company leadership, hype, cyclical factors); in
other words, they assume perfectly efficient markets.

17
Historical Simulation vs Monte Carlo Simulation

General Estimates prices by reliving history; we take actual Estimates prices by


historical rates and revalue a the asset each change simulating random
in the market scenarios.

Use Appropriate for all types of instruments, linear or Appropriate for all types
non-linear of instruments, linear or
nonlinear

Distribution of The historical simulation method replicates the actual Monte-Carlo simulation is
risk factors distribution of risk factors. general in nature.

Distribution No need to make distributional assumptions You can use various


Assumptions distributional
assumptions (normal, T-
distribution, and so on)

Possibility of In the case of historical simulation the possibility of Monte-Carlo method due
extreme extreme events happening is only more relevant if it to its complete random
events happened in recent history. nature accounts for these
happening events completely.

Disadvantage You need a significant amount of daily rate history Takes a lot of
(at least a year, preferably much more) You need computational power
significant computational power for revaluing the (and hence a longer time
portfolio under each scenario. to estimate results)

18
EXERCISE: MARBLE DROPPING MACHINE

So let's take a look at the first example.

In the simulation we have a sort of marble dropping device that moves around
randomly above rectangular table and drops marbles, and on the table . there are
two bowls one with a square cross section and one with a circular cross section,
and each of these bowls is placed on some sort of scale which displays how many
marbles are in each bowl at this time, and if we let the simulation evolve for a
while and then divide the number of marbles in the circular bowl by the number
of marbles in the square bowl the result happens to be roughly pi(3.14).

19
Without any advanced math knowledge, simply by randomly dropping marbles
into two bowls, we can estimate pi.

When we drop a marble in a uniformly random location then the probability for
this marble to end up in one of the bowls is proportional to the bowls cross-
section area, and if we repeat this process over and over again then also the
number of marbles ending up in this bowl will be proportional to the bowl's cross-
section area. The area of the square bowl in this example is its edge length a
squared and the area of the circular bowl is pi times a squared, and that's how we
get pi as the fraction of the two areas and consequently as the fraction of marbles
in each bowl.

So in this example of a monte carlo simulation, we essentially determine an area


by taking random samples. With each random sample we probe whether this
specific location is inside or outside of some area, and by taking enough samples
we get a good idea of how big an area is.

Its impossible to simulate each portfolio individually ,if a portfolio has 50 stocks
than its very time –taking to stimulate each of the stocks so we first take a
common characteristic and then simulate each of the stocks based on it in our case
it is market risk (BETA) , so that’s the basic variation

20
ANALYSIS

1. FIRST ,
Data is about the index its mean , standard deviation and return with 99%
confidence level is 3.074% it means with 99 % confidence we can say that our
index wont be fall by 3.074% from present level .
2. SECOND,
VAR , calculation by formula also known as “DELTA NORMAL METHOD”.
Where VAR= mean + Z* standard deviation
Different var coming of different companies for depending upon their market risk
and fluctuation in return i.e volatility represented by the standard deviation
a) For TATA VAR coming out to be -3.68% which is -16.263 it means for the
very next day, with 99% confidence level we can say that our loss not
exceed Rs. 16.263 but their 1% chance that loss exceed the Rs
16.263.which is a rare case it happens only when there is sudden negative
statement arises like in situation of war , disaster or pandemic situations
like corona virus.
b) For HDFC VAR coming out to be -0.16% which is -0.09329 it means for
the very next day, with 99% confidence level we can say that our loss not
exceed Rs. 0.09329 but their 1% chance that loss exceed the Rs 0.09329
c) For YES BANK VAR coming out to be -1.19% which is -0.1632 it means
for the very next day, with 99% confidence level we can say that our loss
not exceed Rs. 0.1632
d) For KOTAK BANK VAR coming out to be -3.27% which is -57.299 it
means for the very next day, with 99% confidence level we can say that our
loss not exceed Rs. 57.299

3. THIRD
VAR using monte carlo simulation it comes by making a series of output and
21
cutting a 95 or 99 percentile cut–off i.e the values of lowest 5 percent or lowest
1 percent data in the series of output coming
For TATA : -13.8135.
HDFC : -0.07294
YES BANK : -0.1362
KOTAK BANK: -48.679

PRICES AFTER ‘N’ DAYS (30 DAYS)

Graph shows the forecasted prices of TATA STEEL over the last 30 days
period based on the data of past 1 year.

Forecasted Price variation of TATA STEEL in the price range of Rs 440-


500 .
This would allow the investors to have an idea of potential price fluctuation
22
which ultimately help in writing the forward & futures.

PORTFOLIO RETURN RANGE AFTER 1 YEAR

If we have multiple stocks in our portfolio so total price variation over the
period of the time can also be calculated by the graph which help the
investors to form strategy either to hedge the losses and maximizes the gain.

Initially portfolio value Rs. 2267.25, different series shows different


probabilities and investors can get the idea about the possible fluctuation
over different point of time.

23
CONCLUSION

Var is easy to interpret the data especially by new investors and to analyze risk
and devise strategies accordingly and can quantify their losses and degree upto
which they can take risk.
The report shows how much monte carlo simulation techniques will be helpful
as compared to other techniques it can simulate and give vast ranges of output
can give extreme results which is not possible in other techniques

The report potentially answers all the questions which came in the mind of
investors ,questions like :

a. If we invest what is the possible loss that can be possible with associated
probabilities from 1 day period to 1 year time .

b. What is the possible return for a stock over a month and possible outcome
after ‘N’ days (in this project we have taken for 31 days)

c. What is the portfolio range of return possible after 1 year based on it


investors can write forward and futures contract and can find the correct
portfolio mix of different assets .

24
REFERENCES

1. An Introduction to Value at Risk (VAR)


https://www.investopedia.com/articles/04/092904.asp
2. MONTE CARLO SIMULATION WITH GMB(GEOMATRIC
BROWNIAN MOTION
https://www.investopedia.com/articles/07/montecarlo.asp
3. HISTORICAL AND MONTE CARLO SIMULATION COMPARISON
https://analystprep.com/cfa-level-1-exam/quantitative-methods/monte-carlo-simulation-vs-
historical-simulation/

25

You might also like