Introduction to R for Quantitative Finance

Book description

R is a statistical computing language that’s ideal for answering quantitative finance questions. This book gives you both theory and practice, all in clear language with stacks of real-world examples. Ideal for R beginners or expert alike.

  • Use time series analysis to model and forecast house prices
  • Estimate the term structure of interest rates using prices of government bonds
  • Detect systemically important financial institutions by employing financial network analysis

In Detail

Quantitative finance is an increasingly important area for businesses, and skilled professionals are highly sought after. The statistical computing language R is becoming established in universities and in industry as the lingua franca of data analysis and statistical computing.

Introduction to R for Quantitative Finance will show you how to solve real-world quantitative finance problems using the statistical computing language R. The book covers diverse topics ranging from time series analysis to financial networks. Each chapter briefly 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 real-world 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 like credit risk management. The last chapters of this book will also provide you with an overview of exciting topics like extreme values and network analysis in quantitative finance.

Table of contents

  1. Introduction to R for Quantitative Finance
    1. Table of Contents
    2. Introduction to R for Quantitative Finance
    3. Credits
    4. About the Authors
    5. About the Reviewers
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
      7. Downloading the example code
        1. Errata
        2. Piracy
        3. Questions
    8. 1. Time Series Analysis
      1. Working with time series data
      2. Linear time series modeling and forecasting
        1. Modeling and forecasting UK house prices
          1. Model identification and estimation
          2. Model diagnostic checking
          3. Forecasting
      3. Cointegration
        1. Cross hedging jet fuel
      4. Modeling volatility
        1. Volatility forecasting for risk management
          1. Testing for ARCH effects
          2. GARCH model specification
          3. GARCH model estimation
          4. Backtesting the risk model
          5. Forecasting
      5. Summary
    9. 2. Portfolio Optimization
      1. Mean-Variance model
      2. Solution concepts
        1. Theorem (Lagrange)
      3. Working with real data
      4. Tangency portfolio and Capital Market Line
      5. Noise in the covariance matrix
      6. When variance is not enough
      7. Summary
    10. 3. Asset Pricing Models
      1. Capital Asset Pricing Model
      2. Arbitrage Pricing Theory
      3. Beta estimation
        1. Data selection
        2. Simple beta estimation
        3. Beta estimation from linear regression
      4. Model testing
        1. Data collection
        2. Modeling the SCL
        3. Testing the explanatory power of the individual variance
      5. Summary
    11. 4. Fixed Income Securities
      1. Measuring market risk of fixed income securities
        1. Example – implementation in R
      2. Immunization of fixed income portfolios
        1. Net worth immunization
        2. Target date immunization
        3. Dedication
      3. Pricing a convertible bond
      4. Summary
    12. 5. Estimating the Term Structure of Interest Rates
      1. The term structure of interest rates and related functions
      2. The estimation problem
      3. Estimation of the term structure by linear regression
      4. Cubic spline regression
      5. Applied R functions
      6. Summary
    13. 6. Derivatives Pricing
      1. The Black-Scholes model
      2. The Cox-Ross-Rubinstein model
      3. Connection between the two models
      4. Greeks
      5. Implied volatility
      6. Summary
    14. 7. Credit Risk Management
      1. Credit default models
        1. Structural models
        2. Intensity models
      2. Correlated defaults – the portfolio approach
      3. Migration matrices
      4. Getting started with credit scoring in R
      5. Summary
    15. 8. Extreme Value Theory
      1. Theoretical overview
      2. Application – modeling insurance claims
        1. Exploratory data analysis
        2. Tail behavior of claims
        3. Determining the threshold
        4. Fitting a GPD distribution to the tails
        5. Quantile estimation using the fitted GPD model
        6. Calculation of expected loss using the fitted GPD model
      3. Summary
    16. 9. Financial Networks
      1. Representation, simulation, and visualization of financial networks
      2. Analysis of networks’ structure and detection of topology changes
      3. Contribution to systemic risk – identification of SIFIs
      4. Summary
    17. A. References
      1. Time series analysis
      2. Portfolio optimization
      3. Asset pricing
      4. Fixed income securities
      5. Estimating the term structure of interest rates
      6. Derivatives Pricing
      7. Credit risk management
      8. Extreme value theory
      9. Financial networks
    18. Index

Product information

  • Title: Introduction to R for Quantitative Finance
  • Author(s): Agnes Vidovics-Dancs, Daniel Havran, Dr. Edina Berlinger, Gergely Daróczi, Márton Michaletzky, Michael Puhle, Péter Csóka, Dr. Kata Váradi, Zsolt Tulassay
  • Release date: November 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781783280933