Notebooks containing examples and labs of matematical finance.
Three different volatility models are examined for the return processes of financial assets. The models examined are given below with a corresponding volatility plot over time.
- EqWMA
- EWMA
- GARCH(1,1)
An example of a GARCH(1,1) volatility estimation for the S&P 500 index.
The models were also tested visually using QQ-plots and ECDFS. Other stylized facts were also examined for the return distributions.
While modelling multiple financial assets the dependency between the assets must be considered. In order to do this a multivariate distribution is required. This is done by using copulas in conjunction with the univariate distributions. In this notebook multiple copulas are used to fit NOK/USD and EUR/USD returns.
Above are the copula densities and their contours.
Measuring rolling Value-at-Risk estimates for a rebalancing portfolio of stocks. Different methodologies based on historical simulation or parameteric approaches with rolling volatility estimates.
Notes on hypothesis testing of VaR models are here.
To obtain a better estimate of Value at Risk and Expected Shortfall for high confidence levels EVT can be employed. EVT estimates a parametric distribution for losses above some threshold (POT approach to EVT). This threshold is set to the 95th percentile of the loss distribution, i.e., losses above VaR 95. EVT have better estimates since it matches the tail events of the sample better than a single normal distribution, or even fat tailed distributions.
Using EVT a emprical loss distribution of S&P500 from 2007 to 2017 a parametric loss distribution is ascertained, after which VaR and ES are calculated. The VaR and ES becomes 11.5% and 13.6% respectivley. Contrasted with vanilla empirical VaR and ES which were 17.1% and 20.1% respectively. Clearly overestimating the risk.
TODO: Complete.
The 'Washington Mutual Investors Fund' (CWMAX) fund was be examined by its performance. Different performance metrics was be used to judge the fund returns. Multifactor methods was also employed to obtain a greater understanding of its performance.
Pricing european call options on the Swedish stock index OMXS30 as well as pricing american call options on Swedish stocks with discrete dividends. The convergence of the two options to their true value with respect to the number of periods in the binomial model is displayed below.
Creating smooth OIS (single) yield curves using a optimzation framework with and without regularization. The yield curves made are daily discretized continuous forward curves over a period of 20 days. The optimization was performed using IPOPT through AMPL. After the yield curves were asceratined principal component analysis was made, showcasing that the smooth curves have three major components driving the variance of the changes (of the yield curves). Showcased below is the smooth curves versus the non-regularized ones over time.
TODO: Complete.
TODO: Complete.
TODO: Complete.
TODO: Add.
TODO: Add.