Financial Risk Modelling and Portfolio Optimization with R (eBook)
John Wiley & Sons (Verlag)
978-1-119-11968-5 (ISBN)
Financial Risk Modelling and Portfolio Optimization with R, 2nd Edition
Bernhard Pfaff, Invesco Global Asset Allocation, Germany
A must have text for risk modelling and portfolio optimization using R.
This book introduces the latest techniques advocated for measuring financial market risk and portfolio optimization, and provides a plethora of R code examples that enable the reader to replicate the results featured throughout the book. This edition has been extensively revised to include new topics on risk surfaces and probabilistic utility optimization as well as an extended introduction to R language.
Financial Risk Modelling and Portfolio Optimization with R:
- Demonstrates techniques in modelling financial risks and applying portfolio optimization techniques as well as recent advances in the field.
- Introduces stylized facts, loss function and risk measures, conditional and unconditional modelling of risk; extreme value theory, generalized hyperbolic distribution, volatility modelling and concepts for capturing dependencies.
- Explores portfolio risk concepts and optimization with risk constraints.
- Is accompanied by a supporting website featuring examples and case studies in R.
- Includes updated list of R packages for enabling the reader to replicate the results in the book.
Graduate and postgraduate students in finance, economics, risk management as well as practitioners in finance and portfolio optimization will find this book beneficial. It also serves well as an accompanying text in computer-lab classes and is therefore suitable for self-study.
Bernhard Eugen Heinrich Pfaff, Director, Invesco Asset Management Deutschland GmbH, Germany.
A must have text for risk modelling and portfolio optimization using R. This book introduces the latest techniques advocated for measuring financial market risk and portfolio optimization, and provides a plethora of R code examples that enable the reader to replicate the results featured throughout the book. This edition has been extensively revised to include new topics on risk surfaces and probabilistic utility optimization as well as an extended introduction to R language. Financial Risk Modelling and Portfolio Optimization with R: Demonstrates techniques in modelling financial risks and applying portfolio optimization techniques as well as recent advances in the field. Introduces stylized facts, loss function and risk measures, conditional and unconditional modelling of risk; extreme value theory, generalized hyperbolic distribution, volatility modelling and concepts for capturing dependencies. Explores portfolio risk concepts and optimization with risk constraints. Is accompanied by a supporting website featuring examples and case studies in R. Includes updated list of R packages for enabling the reader to replicate the results in the book. Graduate and postgraduate students in finance, economics, risk management as well as practitioners in finance and portfolio optimization will find this book beneficial. It also serves well as an accompanying text in computer-lab classes and is therefore suitable for self-study.
Bernhard Eugen Heinrich Pfaff, Director, Invesco Asset Management Deutschland GmbH, Germany.
Chapter 2
A brief course in R
2.1 Origin and development
R is mainly a programming environment for conducting statistical computations and producing high-level graphics (see R Core Team 2016). These two areas of application should be interpreted widely, and indeed many tasks that one would not normally directly subsume under these topics can be accomplished with the R language. The website of the R project is http://www.r-project.org. The source code of the software is published as free software under the terms of the GNU General Public License (GPL; see http://www.gnu.org/licenses/gpl.html).
The language R is a dialect of the S language, which was developed by John Chambers and colleagues at Bell Labs in the mid-1970s.1 At that time the software was implemented as FORTRAN libraries. A major advancement of the S language took place in 1988, following which the system was rewritten in C and functions for conducting statistical analysis were added. This was version 3 of the S language, referred to as S3 (see Becker et al. 1988; Chambers and Hastie 1992). At that stage in the development of S, the R story commences (see Gentleman and Ihaka 1997). In August 1993 Ross Ihaka and Robert Gentleman, both affiliated with the University of Auckland, New Zealand, released a binary copy of R on Statlib, announcing it on the s-news mailing list. This first R binary was based on a Scheme interpreter with an S-like syntax (see Ihaka and Gentleman 1996). The name of R traces back to the initials of the first names of Ihaka and Gentleman, and is by coincidence a one-letter abbreviation to the language in the same manner as S. The announcement by Ihaka and Gentleman did not go unnoticed and credit is due to Martin Mächler from ETH Zürich, who persistently advocated the release of R under GNU's GPL. This happened in June 1995. Interest in the language grew by word of mouth, and as a first means of communication and coordination a mailing list was established in March 1996 which was then replaced a year later by the electronic mail facilities that still exist today. The growing interest in the project led to the need for a powerful distribution channel for the software. This was accomplished by Kurt Hornik, at that time affiliated to TU Vienna. The master repository for the software (known as the “Comprehensive R Archive Network”) is still located in Vienna, albeit now at the Wirtschaftsuniversität and with mirror servers spread all over the globe. In order to keep pace with changes requested by users and the fixing of bugs in a timely manner, a core group of R developers was set up in mid-1997. This established framework and infrastructure is probably the reason why R has since made such tremendous further progress. Users can contribute packages to solve specific problems or tasks and hence advances in statistical methods and/or computations can be swiftly disseminated. A detailed analysis and synopsis of the social organization and development of R is provided by Fox 2009. The next milestone in the history of the language was in 1998, when John Chambers introduced a more formal class and method framework for the S language (version 4), which was then adopted in R (see Chambers 1998, 2008). This evolution explains the coexistence of S3- and S4-like structures in the R language, and the user will meet them both in Section 2.4. More recent advancements are the inclusion of support for high-performance computations and a byte code compiler for R. From these humble beginnings, R has become the lingua franca for statistical computing.
2.2 Getting help
It is beyond the scope of this book to provide the reader with an introduction to the R language itself. Those who are completely new to R are referred to the manual An Introduction to R, available on the project's website under “Manuals.” The purpose of this section is rather to provide the reader with some pointers on obtaining help and retrieving the relevant information for solving a particular problem.
As already indicated in the previous paragraph, the first resort for obtaining help is to read the R manuals. These manuals cover different aspects of R and the one mentioned above provides a useful introduction to R. The following R manuals are available, and their titles are self-explanatory:
- An Introduction to R
- The R Language Definition
- Writing R Extensions
- R Data Import/Export
- R Installation and Administration
- R Internals
- The R Reference Index
These manuals can either be accessed from the project's website or invoked from an R session by typing
> help.start() This function will load an HTML index file into the user's web browser and local links to these manuals appear at the top. Note that a link to the “Frequently Asked Questions” is included, as well as a “Windows FAQ” if R has been installed under Microsoft Windows.
Incidentally, in addition to these R manuals, many complementary tutorials and related material can be accessed from http://www.r-project.org/other-docs.html and an annotated listing of more than 100 books on R is available at http://www.r-project.org/doc/bib/R-books.html. The reader is also pointed to the The R Journal (formerly R News), which is a biannual publication of user-contributed articles covering the latest developments in R.
Let us return to the subject of invoking help within R itself. As shown above, the function help.start() as invoked from the R prompt is one of the in-built help facilities that R offers. Other means of accessing help are:
> ## invoking the manual page of help() itself > help() > ## help on how to search in the help system > help(“help.search”) > ## help on search by partial matching > help(“apropos”) > ## Displaying available demo files > demo() > demo(scoping) > ## Displaying available package vignettes > ?vignette > vignette() > vignette(“parallel”) The first command will invoke the help page for help() itself; its usage is described therein and pointers given to other help facilities. Among these other facilities are help.search(), apropos(), and demo(). If the latter is executed without arguments, the available demonstration files are displayed and demo(scoping) then runs the R code for familiarizing the user with the concept of lexical scoping in R, for instance. More advanced help is provided in vignettes associated with packages. The purpose of these documents is to show the user how the functions and facilities of a package can be employed. These documents can be opened in either a PDF reader or a web browser. In the last code line, the vignette contained in the parallel package is opened and the user is given a detailed description of how parallel computations can be carried out with R.
A limitation of these help facilities is that with these functions only local searches are conducted, so that the results returned depend on the R installation itself and the contributed packages installed. To conduct an online search the function RSiteSearch() is available which includes searches in the R mailing lists (mailing lists will be covered as another means of getting help in due course).
> ## Online search facilities > ?RSiteSearch > RSiteSearch(“Portfolio”) > ## The CRAN package sos > ## 1. Installation > install.package(“sos”) > ## 2. Loading > library(sos) > ## 3. Getting an overview of the content > help(package = sos) > ## 4. Opening the package's vignette > vignette(“sos”) > ## 5. Getting help on findFn > ?findFn > ## 6. Searching online for “Portfolio” > findFn(“Portfolio”) A very powerful tool for conducting online searches is the sos package (see Graves et al. 2013). If the reader has not installed this contributed package by now, s/he is recommended to do so. The cornerstone function is findFn(), which conducts online searches. In the example above, all relevant entries with respect to the keyword “Portfolio” are returned in a browser window and the rightmost column contains a description of the entries with a direct web link.
As shown above, findFn() can be used for answering questions of the form “Can this be achieved with R?” or “Has this already been implemented in R?” In this respect, given that at the time of writing more than 6300 packages are available on CRAN (not to speak of R-Forge), the “Task View” concept is beneficial.2 CRAN packages that fit into a certain category, say “Finance,” are grouped together and each is briefly described by the maintainer(s) of the task view in question. Hence, the burden of searching the archive for a certain package with which a problem or task can be solved has been greatly reduced. Not only do the task views provide a good overview of what is available, but with the CRAN package ctv (see Zeileis 2005) the user can choose to install either the complete set of packages in a task view along with their dependencies or just those considered to be core packages. A...
| Erscheint lt. Verlag | 16.8.2016 |
|---|---|
| Sprache | englisch |
| Themenwelt | Mathematik / Informatik ► Mathematik ► Computerprogramme / Computeralgebra |
| Mathematik / Informatik ► Mathematik ► Statistik | |
| Mathematik / Informatik ► Mathematik ► Wahrscheinlichkeit / Kombinatorik | |
| Recht / Steuern ► Wirtschaftsrecht | |
| Technik | |
| Wirtschaft ► Betriebswirtschaft / Management ► Finanzierung | |
| Schlagworte | conditional and unconditional modelling of risk • Economics • extreme value theory • Finance • Finance & Investments • Financial Engineering • Finanztechnik • Finanz- u. Anlagewesen • Finanz- u. Wirtschaftsstatistik • generalized hyperbolic distribution • Investments & Securities • Kapitalanlagen u. Wertpapiere • loss function and risk measures • modelling financial risks • portfolio optimization • Risikomodellierung • Risk Management • R (Programm) • Software R • Statistics • Statistics for Finance, Business & Economics • Statistik • volatility modelling and concepts for capturing dependencies |
| ISBN-10 | 1-119-11968-5 / 1119119685 |
| ISBN-13 | 978-1-119-11968-5 / 9781119119685 |
| Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
| Haben Sie eine Frage zum Produkt? |
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich