This book is intended to cover … [TBD]

Who should read this book

My students probably … [TBD]

Structure of the book

Not yet fixed. But the book will start with an introduction to the most important tools for the portfolio analysis: timeseries (mainly xts) and the tidyverse. Afterwards, the possibilities of managing and exploring financial data will be developed. Then we do portfolio optimization for mean-Variance and Mean-CVaR portfolios. This will be followed by a chapter on backtesting, before I show further applications in finance, such as predictions, portfolio sorting, Fama-MacBeth-regressions etc.

Current Structure:

  1. Introduction
  1. Introduction to Timeseries (xts and friends)
  2. Introduction to the tidyverse plus simple plotting and simple functions illustreate dusing regression/rolling estimates etc

Includes Data manipulation and visualization

  1. Managing Data
  1. Downloading data, saving and loading
  2. Manipulating data
  1. Exploring Data
  1. Statistical Analysis
  2. Plotting
  1. Managing Portfolios
  1. Backtesting

  2. Further Applications


The R session information when compiling this book is shown below:

#> R version 4.1.1 (2021-08-10)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 19043)
#> Matrix products: default
#> locale:
#> [1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
#> [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
#> [5] LC_TIME=German_Germany.1252    
#> attached base packages:
#> [1] stats     graphics  grDevices datasets  utils     methods   base     
#> other attached packages:
#>  [1] kableExtra_1.3.4           tikzDevice_0.12.3.1       
#>  [3] knitr_1.34                 tidyquant_1.0.3           
#>  [5] quantmod_0.4.18            TTR_0.24.2                
#>  [7] PerformanceAnalytics_2.0.4 forcats_0.5.1             
#>  [9] stringr_1.4.0              dplyr_1.0.7               
#> [11] purrr_0.3.4                readr_2.0.1               
#> [13] tidyr_1.1.3                tibble_3.1.4              
#> [15] ggplot2_3.3.5              tidyverse_1.3.1           
#> [17] lubridate_1.7.10           timeDate_3043.102         
#> [19] xts_0.12.1                 zoo_1.8-9                 
#> [21] viridis_0.6.1              viridisLite_0.4.0         
#> loaded via a namespace (and not attached):
#> [1] tools_4.1.1     bookdown_0.24   rmarkdown_2.11  htmltools_0.5.2
#> [5] shiny_1.6.0     miniUI_0.1.1.1

To start, install/load all necessary packages using the pacman-package (the list will be expanded with the growth of the book).



I thank my family…

I especially thank the developers of:

  • the excellent fPortfolio-Book
  • the developers of the tidyverse and tidyverts packages and its vignettes
  • the tidyquant package and its vignettes
  • the PerformanceAnalytics developers and the package vignettes
  • the PortfolioAnalytics developers (currently working very hard on the package) and its package vignettes

Additionally I would like to thank Dominik Brändle, Lukas Salcher and Merlin Bartel for their excellentsupport with some of the chapters as well as numerous students from my Portfoliomanagement classes for valuable feedback on a book that i have written especially for them.

Dr. Sebastian Stöckl Assistant Professor in Finance University of Liechtenstein Vaduz, Liechtenstein