#### Overview of this book

Introduction to R for Quantitative Finance will show you how to solve real-world quantitative fi nance problems using the statistical computing language R. The book covers diverse topics ranging from time series analysis to fi nancial networks. Each chapter briefl y presents the theory behind specific concepts and deals with solving a diverse range of problems using R with the help of practical examples.This book will be your guide on how to use and master R in order to solve quantitative finance problems. This book covers the essentials of quantitative finance, taking you through a number of clear and practical examples in R that will not only help you to understand the theory, but how to effectively deal with your own real-life problems.Starting with time series analysis, you will also learn how to optimize portfolios and how asset pricing models work. The book then covers fixed income securities and derivatives such as credit risk management.
Introduction to R for Quantitative Finance
Credits
www.PacktPub.com
Preface
Free Chapter
Time Series Analysis
Portfolio Optimization
Asset Pricing Models
Fixed Income Securities
Estimating the Term Structure of Interest Rates
Derivatives Pricing
Credit Risk Management
Extreme Value Theory
References
Index

## Application – modeling insurance claims

In the remainder of this chapter, we work through an example of using EVT in a real-life risk management application. We apply the preceding methodology to fire insurance claims, with the aims of fitting a distribution to the tails and providing quantile estimates and conditional expectations to characterize the probability and magnitude of large fire losses. We note that the exact same steps may be applied to credit losses or operational losses as well. For market risk management problems, where the underlying data is generally the return of a security, we would remove the gains from the data set and focus on the losses only; otherwise, the modeling steps are again identical.

Multiple packages are available in R for extreme value analysis. In this chapter we present the `evir` package in the following command. A good overview of the various R packages for EVT is provided in Gilleland, Ribatet, and Stephenson (2013).

As done previously, we need to install...