The table below provides an overview of the available examples.

Example | Description | Download |
---|---|---|

R code | Gzipped tarball of examples | tarball |

R code 2.1 | The package FRAPO | C2R1.R |

R code 3.1 | Stylised Facts of the Returns for Siemens | C3R1.R |

R code 3.2 | Stylised Facts of European Equity Market | C3R2.R |

R code 6.1 | Fitting HPW-returns to the GHD | C6R1.R |

R code 6.2 | VaR and ES derived from the GHD, HYP and NIG | C6R2.R |

R code 6.3 | Shape triangle for HYP distribution | C6R3.R |

R code 6.4 | VaR of QRM Stock: Comparison of GLD and Normal distribution | C6R4.R |

R code 6.5 | FTSE 100 Stocks: Shape triangle of standardised GLD | C6R5.R |

R code 7.1 | Block maxima for the losses of Siemens | C7R1.R |

R code 7.2 | r-Block Maxima for the losses of BMW | C7R2.R |

R code 7.3 | POT-GPD for the losses of Boeing | C7R3.R |

R code 7.4 | De-clustering of NYSE exceedances | C7R4.R |

R code 8.1 | Expected shortfall derived from GARCH(1,1) models | C8R1.R |

R code 9.1 | GARCH-Copula: Expected shortfall | C9R1.R |

R code 9.2 | Mixing of copulae: Clayton and Gumbel | C9R2.R |

R code 10.1 | Portfolio simulation: data generation | C10R1.R |

R code 10.2 | Portfolio simulation: function for estimating moments | C10R2.R |

R code 10.3 | Portfolio simulation: estimates for data processes | C10R3.R |

R code 10.4 | Portfolio simulation: minimum-variance optimisations | C10R4.R |

R code 10.5 | Portfolio back-test: descriptive statistics of returns | C10R5.R |

R code 10.6 | Portfolio back test: rolling window optimisation | C10R6.R |

R code 10.7 | Robust portfolio optimisation with elliptical uncertainty | C10R7.R |

R code 10.8 | Efficient frontiers for mean-variance and robust counterpart optimization with elliptical uncertainty of μ | C10R8.R |

R code 10.9 | Determining equivalent mean-variance allocation for a given robust counterpart risk weighting | C10R9.R |

R code 10.10 | Graphical display of efficient frontier for mean-variance and robust counterpart portfolios | C10R10.R |

R code 11.1 | Comparison of portfolio solution for Swiss equity sectors | C11R1.R |

R code 11.2 | Key measures of portfolio solutions for Swiss equity sectors | C11R2.R |

R code 11.3 | S&P 500: Tail-dependence versus low-β portfolio |
C11R3.R |

R code 11.4 | Plotting of wealth progression and relative performance | C11R4.R |

R code 11.5 | Key measures of portfolio solutions for S&P 500 | C11R5.R |

R code 11.6 | Comparison of restricted ES-portfolios with GMV and ERC | C11R6.R |

R code 12.1 | Minimum-CVaR versus minimum-variance portfolios: back-test |
C12R1.R |

R code 12.2 | Plotting of wealth trajectory | C12R2.R |

R code 12.3 | Comparison of draw-down and GMV portfolios | C12R3.R |

R code 12.4 | Analysis of portfolio solutions | C12R4.R |

R code 12.5 | Back-test: GMV versus CDaR portfolio optimisation |
C12R5.R |

R code 12.6 | Back-test: evaluation of results, part one | C12R6.R |

R code 12.7 | Back-test: Evaluation of results, part two | C12R7.R |

R code 12.8 | Risk surface plot of multi-asset portfolio, part one | C12R8.R |

R code 12.9 | Risk surface plot of multi-asset portfolio, part two | C12R9.R |

R code 12.10 | Risk surface plot of multi-asset portfolio, part three | C12R10.R |

R code 13.1 | Integration and co-integration analysis of equity indexes | C13R1.R |

R code 13.2 | Generating views derived from VAR model of assets | C13R2.R |

R code 13.3 | Maximum Sharpe ratio portfolio specifications | C13R3.R |

R code 13.4 | Maximum Sharpe ratio portfolio back-test | C13R4.R |

R code 13.5 | Comparison of portfolio strategies | C13R5.R |

R code 13.6 | Display of portfolio strategies | C13R6.R |

R code 13.7 | Copula opinion pooling | C13R7.R |

R code 13.8 | Copula opinion pooling: densities | C13R8.R |

R code 13.9 | Comparison of portfolio allocations | C13R9.R |

R code 13.10 | Data preparation | C13R10.R |

R code 13.11 | Definition of forecast and entropy pooling functions | C13R11.R |

R code 13.12 | Back-testing portfolio strategies | C13R12.R |

R code 13.13 | Analysis of results | C13R13.R |

R code 13.14 | Data preparation | C13R14.R |

R code 13.15 | Forecasting model | C13R15.R |

R code 13.16 | Risk model | C13R16.R |

R code 13.17 | Formulation of linear program | C13R17.R |

R code 13.18 | Portfolio simulation | C13R18.R |

R code 13.19 | Comparison of portfolio allocations | C13R19.R |

R code 14.1 | Monte Carlo integration methods for probabilistic utility function | C14R1.R |

R code 14.2 | Simulation of Markov chains | C14R2.R |

R code 14.3 | Metropolis-Hastings: comparison of independence and random walk sampler | C14R3.R |

R code 14.4 | Definition of the utility function | C14R4.R |

Stan code 14.1 | Definition of the utility function in the Stan language | C14S1.stan |

R code 14.5 | Probabilistic versus maximized expected utility, part one | C14R5.R |

R code 14.6 | Probabilistic versus maximized expected utility, part two | C14R6.R |

R code 14.7 | Utility simulation | C14R7.R |

R code 14.8 | Graphical analysis of utility simulation | C14R8.R |

R code 14.9 | Allocation analysis of utility simulation | C14R9.R |