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 ...