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

Representation, simulation, and visualization of financial networks


Networks can be represented by a list of pairs, by an adjacency matrix, or by graphs. Graphs consist of vertices and edges (nodes). In R, vertices are numbered and may have several attributes. Between two vertices there can exist an edge (directed or undirected, weighted or non-weighted), and the edge may have other attributes as well. In most financial networks, vertices stand for market players, while edges describe different sorts of financial linkages between them.

Using the built-in R tools and some function from the igraph package, it is easy to create/simulate artificial networks. The following table (Table 1) summarizes some important network types and their basic properties:

Network

Clustering

Average path length

Degree distribution

Regular (for example, ring, full)

High

High

Equal or fixed in-out degrees in each node

Pure random (for example, Erdős-Rényi)

Low

Low

Exponential, Gaussian

Scale free

Variable...