Skip to content

Notebooks in financial mathematics. Ranging from risk management to portfolio management and stochastic processes for financial markets.

License

Notifications You must be signed in to change notification settings

Sinbad-The-Sailor/Financial-Mathematics-Notebooks

Repository files navigation

Financial Mathematics Notebooks

Notebooks containing examples and labs of matematical finance.

Volatility Modelling

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.

image

The models were also tested visually using QQ-plots and ECDFS. Other stylized facts were also examined for the return distributions.

Dependency Modelling

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.

image

Above are the copula densities and their contours.

Risk Measurements and Backtesting

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.

image

Notes on hypothesis testing of VaR models are here.

Extreme Value Theory

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.

image

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.

Risk Factor Mapping

TODO: Complete.

Fund Performace

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.

image

Options Pricing: Binomial Model

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.

image

Smooth OIS Yield Curve Construction

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.

image

Fund FX-Hedging

TODO: Complete.

Options Portfolio Strategy

TODO: Complete.

Mean Variance Model

TODO: Complete.

Markov Chain Credit Ratings Process

TODO: Add.

Interest Rate Curve Building and Interpolation

TODO: Add.

About

Notebooks in financial mathematics. Ranging from risk management to portfolio management and stochastic processes for financial markets.

Topics

Resources

License

Stars

Watchers

Forks