VaR Backtesting

Task 3. VaR Backtesting VaR Backtesting most of the time, we assume daily return follow normal distribution and as the question say, Var is caculated at 99% confidence. Import Libraries 1 await __import__("piplite").install('numpy', 'scipy', 'matplotlib', 'pandas', 'tabulate') 1 2 # hyy:fix the import failed issue await __import__("piplite").install('tabulate') 1 2 # hyy:fix excel issue, miss the excel read library, install here. await __import__("piplite").install('openpyxl') 1 2 3 4 5 import numpy as np import pandas as pd from scipy import stats import matplotlib.pyplot as plt from tabulate import tabulate 1 2 # set precision pd.set_option('display.precision', 4) Load Data ...

May 28, 2026 · hyyfrank

Pricing Options using Monte Carlo Simulation

Pricing European and Binary Options using Monte Carlo Simulation 1. Introduction This report investigates the pricing of European and Binary call options using Monte Carlo simulation under the risk-neutral framework. According to the Fundamental Theorem of Asset Pricing, the value of an option $V(S,t)$ is the expected value of its discounted payoff under the risk-neutral measure $\mathbb{Q}$: $$V(S, t) = e^{-r(T-t)} \mathbb{E}^\mathbb{Q} [\text{Payoff}(S_T)]$$ We assume the underlying asset follows Geometric Brownian Motion (GBM) governed by the Stochastic Differential Equation (SDE): $$dS_t = r S_t dt + \sigma S_t dW_t$$ where $r$ is the risk-free rate, $\sigma$ is the volatility, and $dW_t$ is a Wiener process. ...

May 28, 2026 · hyyfrank