Book Image

Introduction to R for Quantitative Finance

Book Image

Introduction to R for Quantitative Finance

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.
Table of Contents (17 chapters)
Introduction to R for Quantitative Finance
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Measuring market risk of fixed income securities


The general formula to obtain the present value of a fixed income security given a yield curve is: , where T is the time until maturity of the security, CFt is the cash flow of the security at time t, and yt is the discount rate of a cash flow to be received at time t. The market price of the bond will converge to its par value as time passes, even if its yield to maturity remains constant. This price change is expected, hence it is not considered a risk. Market risk arises from the changes in interest rates, which causes reinvestment risk and liquidation risk. The first affects the rate at which coupon payments can be reinvested, and the second impacts the market price of the bond.

The market price impact of interest rate change is measured by examining the price of the bond as a function of its yield to maturity (y): . Since , the percentage change of the price caused by a change in yield is expressed as: , the second order approximation...