### Assessing Future Stock Price Movements with Historical & Implied Volatility

# Price Movement Estimation Using Historical and Implied Volatility

## 1. Introduction

Forecasting financial markets is a sophisticated fusion of quantitative precision and global economicÂ nuance. In this quest, the Monte Carlo simulation stands out as a premier statistical instrument, guiding our understanding of future stock prices.

Named after the famous Monte Carlo Casino in Monaco, this method doesnâ€™t bank on luck but is rooted in rigorous probabilistic modelling. Imagine orchestrating thousands of experiments in a controlled environment, with each one unfolding a different story of stock price movement. Thatâ€™s the power of the Monte Carlo simulation. It allows us to visualize a spectrum of outcomes based on historical data and probabilistic assumptions.

In this article, our approach is twofold: First, we delve into the intricacies of historical and implied volatilities, elucidating their distinctions, implications, and relevance. While historical volatility gauges the fluctuations of past stock prices, implied volatility offers a forward-looking perspective based on market sentiments and option pricing. Next, we employ the Monte Carlo simulation, using both these volatility measures, to extrapolate potential future paths for our chosen stock.

Central to our analysis will be the derivation of probabilities. By observing the simulationâ€™s multitude of potential outcomes, weâ€™ll compute the likelihood of the stock price landing within specific ranges. For instance, whatâ€™s the probability of the stock price exceeding a particular threshold or falling below another? Therefore, offering a quantifiable perspective on potential future scenarios.

## 2. Volatility Analysis

**2.1 Historical Volatility**

Historical volatility, often termed statistical or realized volatility, quantifies the variability of a stockâ€™s returns over a past period. It gives us an idea of how much a stockâ€™s price deviated from its average value during that timeframe.

Once you have the daily returns, the historical volatility (HV) overÂ *N*Â days is calculated as

Equation. 1: Formula illustrating the computation of daily historical volatility. The calculation is based on returns of stock prices and provides a measure of how much the stock has fluctuated on a day-to-day basis in the past.

Where:

- Ë‰
*R*Ë‰ = Average daily return over theÂ*N*Â days

To convert daily volatility to annualized volatility you can use the formula below. This formula is key when you want to estimate volatility over a given horizon.

Equation. 2: Formula for converting daily historical volatility to annualized volatility. The transformation incorporates the square root of the number of trading days in a year (typically 252), offering a more long-term perspective on stock price fluctuations.

**2.2 Implied Volatility**

The implied volatility can be extracted from the Black-Scholes option pricing model:

Equation. 3: Black-Scholes-Merton formula for pricing European call options. The formula establishes the theoretical value of an option by accounting for factors such as stock price, exercise price, time to maturity, implied volatility, and the risk-free rate.

Where:

*C*Â is the call option price.*S*0â€‹ is the current stock price.*X*Â is the strike price of the option.*t*Â is the time to expiration.*r*Â is the risk-free rate.*q*Â is the dividend yield.*N*() is the CDF of the standard normal distribution.

Equation. 4: Formula for d1â€‹ in the Black-Scholes-Merton option pricing model. d1â€‹ captures the expected price movements of the underlying stock relative to the option strike price and is a determinant factor in option valuation.

Equation. 5: Formula for d1â€‹ in the Black-Scholes-Merton option pricing model. d1â€‹ captures the expected price movements of the underlying stock relative to the option strike price and is a determinant factor in option valuation.

Itâ€™s worth noting that although the above describes the derivation for a call option, a similar approach is taken for put options. To extract implied volatility (Ïƒ), one would reverse engineer the model using the observed market option price.

However, the process can be computationally intensive, especially for those unfamiliar with the nuances of option pricing models. As a result, many traders and investors prefer sourcing the implied volatility value directly from platforms like Yahoo Finance or their trading brokers.

**2.3 Historical vs. Implied Volatility**

Historical and implied volatilities, though related, serve different purposes:

- Perspective: While historical volatility looks backward, gauging price fluctuations from past data, implied volatility peers forward, encapsulating market expectations of future price variability.
- Application: Historical volatility aids in risk assessment based on past stock behavior. In contrast, implied volatility is pivotal for options pricing and understanding market sentiment about future volatility.
- Determination: Historical volatility is purely statistical, derived from past price data. Implied volatility, however, is extracted from the market prices of options, embodying the collective wisdom of market participants.

## 3. Monte Carlo Simulations for Price Forecasting

The Monte Carlo simulation leverages probability theory to determine possible outcomes for an uncertain event. In finance, it offers a method to model the evolution of stock prices, based on certain statistical characteristics, primarily the volatility.

**3.1 Drift and Volatility**

The main components determining stock price movements in our simulation are the drift and the volatility. The drift represents the expected or average rate of return of a stock, adjusted for the time frame of the forecast.

Equation. 6: Formula illustrating the drift component in the geometric Brownian motion model. This component represents the expected rate of return on the stock, accounting for inherent factors over the forecast period..

Where:

*Î¼*Â is the expected stock return.*Ïƒ*2 is the variance (volatility squared).- Î”
*t*Â is the time increment.

Volatility, on the other hand, accounts for the unpredictability and brings randomness into our forecast:

Equation. 7: Equation capturing the volatility term in the geometric Brownian motion model. This element introduces randomness to the forecast, representing the inherent unpredictability and risk of stock movements.

Where:

*Ïµ*Â is a random value drawn from a standard normal distribution.â€‹

**3.2 Stock Price Path Simulation**

To simulate the path of stock prices, we apply the following recursive formula:

Equation. 8: Recursive formula showcasing the stock price path simulation. With the initial stock price S0â€‹, this equation combines the drift and volatility to project future stock prices S1â€‹,S2â€‹,â€¦.

Starting from the initial stock priceÂ *S*0â€‹, we compute successive pricesÂ *S*1â€‹,*S*2â€‹,â€¦ using the drift, the volatility term, and the previous stock price.

**3.3 Stock Price Path Simulation**

The power of the Monte Carlo method emerges when running thousands or even millions of simulations. Each trajectory will offer a unique path for the stock price based on the randomness injected by the volatility term. Collectively, they provide a spectrum of possible outcomes, shaping a probability distribution for future stock prices.

**3.4 Stock Price Path Simulation**

After obtaining a multitude of stock price paths, we can perform various statistical analyses. For instance, calculating the mean and variance provides insights into the central tendency and dispersion of our forecasts. Moreover, by examining the distribution of the final stock prices from all simulations, we can compute probabilities for the stock landing within certain ranges, as previously discussed.

In conclusion, the Monte Carlo simulation offers a dynamic and probabilistic approach to stock price forecasting. While no model can predict the future with certainty, this method provides a robust framework for understanding potential price trajectories and their associated probabilities.

**4. Implementation of Monte Carlo Simulation**

In this section, we outline the steps and methodologies used to conduct the previously analyses discussed on Volatility and Monte Carlo.

**4.1 Methodology Overview**

The simulation uses the Geometric Brownian Motion model, a widely recognized model for stock price dynamics, primarily influenced by drift (deterministic) and volatility (stochastic).

**4.2 Data Collection**

To begin our simulation, we source the stockâ€™s historical data:

` ````
```import yfinance as yf
# Download historical data for ASML.AS
symbol = "ASML.AS"
start_date = "2020-01-01"
end_date = "2023-12-30"
df = yf.download(symbol, start=start_date, end=end_date)

**4.3 Computing Daily Returns**

With the historical data in place, we compute the stockâ€™s daily returns, serving as the foundation for our simulation:

` ````
```import numpy as np
# Calculate daily returns
log_returns = np.log(df['Close'] / df['Close'].shift(1))

**4.4 Monte Carlo Simulation Setup**

Before the simulation starts, we specify key parameters, guiding the forecastâ€™s trajectory:

` ````
```# Monte Carlo simulation parameters
days_to_forecast = 20
num_simulations = 10000
dt = 1 # 1 trading day

**4.5 Volatility Inclusion**

Implied volatility is introduced, based on our earlier discussions in the volatility section:

` ````
```# Volatility for BSM
volatility_bsm = 0.29 # Assuming 29% annualized volatility
print("BMS Implied Volatility: ", volatility_bsm)

**4.6 Running the Simulations**

Leveraging the calculated logarithmic returns and assumed implied volatility, we create two sets of simulations:

` ````
```from scipy.stats import norm
# Function to run the Monte Carlo simulation
def run_simulation(volatility, dt, annualized=False):
...
# simulation logic here
...
simulated_prices_historical = run_simulation(log_returns.std(), dt)
simulated_prices_bsm = run_simulation(volatility_bsm, dt, annualized=True)
print("Historical Volatility: ", log_returns.std())

**4.7 Visualization**

The results are visualized through the Monte Carlo confidence cones, showcasing the possible stock price trajectories under both the historical and BSM volatility:

` ````
```import matplotlib.pyplot as plt
# Plotting logic
fig, axs = plt.subplots(1, 2, figsize=(30, 7))
...
# rest of the plotting logic
plt.show()

This visualization provides a detailed look at potential price paths using two different volatility measures. By overlaying these paths with specified thresholds and confidence intervals, investors can derive meaningful insights into potential future stock movements.

**4.8 Understanding Key Parameters**

**Thresholds:**

In the code, weâ€™ve identified two important thresholds for the stock prices. These thresholds might represent critical resistance or support levels from a technical analysis perspective or specific price levels of interest to the investor.

` ````
```# Define thresholds
threshold1 = 650 #Upper Threshold
threshold2 = 540 #Lower Threshold

**4.9 Derived Probabilities**

From the simulation results, we can calculate the probabilities of the stock price being aboveÂ `threshold1`

, belowÂ `threshold2`

, and between the two thresholds at the end of our forecast period:

` ````
```# Probability annotations
above_threshold1_prob = (simulated_prices[-1] > threshold1).sum() / num_simulations
below_threshold2_prob = (simulated_prices[-1] < threshold2).sum() / num_simulations
between_thresholds_prob = 1 - above_threshold1_prob - below_threshold2_prob

These probabilities provide valuable insights:

- The likelihood that the stock price exceeds a favorable price level (aboveÂ
`threshold1`

). - The risk of the stock price dropping below a concerning level (
`threshold2`

). - The probability that the stock price remains between these two thresholds.

**Putting it all together:**

Newsletter