Reproducible Finance with Code Flows and Shiny Apps for Portfolio Analysis is a unique introduction to data science for investment management that explores the three major R/finance coding paradigms, emphasizes data visualization, and explains how to build a cohesive suite of functioning Shiny applications. The full source code, asset price data and live Shiny applications are available at reproduciblefinance.com. The ideal reader works in finance or wants to work in finance and has a desire to learn R code and Shiny through simple, yet practical real-world examples. The book begins with the first step in data importing and wrangling data, which in the investment context means importing asset prices, converting to returns, and constructing a portfolio. The next section covers risk and tackles descriptive statistics such as standard deviation, skewness, kurtosis, and their rolling histories. The third section focuses on portfolio theory, analyzing the Sharpe Ratio, CAPM, and Fama French models. The book concludes with applications for finding individual asset contribution to risk and for running Monte Carlo simulations. For each of these tasks, the three major coding paradigms are explored and the work is wrapped into interactive Shiny dashboards.
During my undergraduate wealth management class, I recall a significant time was spent covering core concepts like diversification, portfolio rebalancing and modern portfolio theory. Despite learning all the theory, one question that I could never answer was how much diversification is enough? Thus, I set an objective find the optimal way to allocate my portfolio. This book has been one of the most beneficial books to get me started with basic yet scalable code flows that can be applied to any portfolio.
Beautifully typeset book with R-code examples of using finance data and its visualisations in graphical software libraries. The examples are ever repeated for the xts, tidyquant and tidyverse libraries, which rapidly gives the impression of unwanted handholding. A truly strange statement: "A normal distribution has a kurtosis of 3, which follows from the fact that a normal distribution does have some of its mass in its tails." I qualify it as strange, even though it is strictly speaking a falsehood, only because the writing style is otherwise very tight.