paid course

Introduction to Portfolio Analysis in R

Apply your finance and R skills to backtest, analyze, and optimize financial portfolios.

  • 5 hours
  • 14 Videos
  • 57 Exercises
  • 16,945 Participants
  • 4,400 XP

Course Description

A golden rule in investing is to always test the portfolio strategy on historical data, and, once you are trading the strategy, to constantly monitor its performance. In this course, you will learn this by critically analyzing portfolio returns using the package PerformanceAnalytics. The course also shows how to estimate the portfolio weights that optimally balance risk and return. This is a data-driven course that combines portfolio theory with the practice in R, illustrated on real-life examples of equity portfolios and asset allocation problems. If you'd like to continue exploring the data after you've finished this course, the data used in the first three chapters can be obtained using the tseries-package. The code to get them can be found here. The data used in chapter 4 can be downloaded here.

Apply your finance and R skills to backtest, analyze, and optimize financial portfolios.

Course Outline

  1. 1

    The building blocks

    Free

    Asset returns and portfolio weights; those are the building blocks of a portfolio return. This chapter is about computing those portfolio weights and returns in R.

  2. Performance drivers

    In addition to studying portfolio performance based on the observed portfolio return series, it is relevant to find out how individual (expected) returns, volatilities and correlations interact to determine the total portfolio performance.

  3. Analyzing performance

    The history of portfolio returns reveals valuable information about how much the investor can expect to gain or lose. This chapter introduces the R functionality to analyze the investment performance based on a statisical analysis of the portfolio returns. It includes graphical analysis and the calculation of performance statistics expressing average return, risk and risk-adjusted return over rolling estimation samples.

  4. Optimizing the portfolio

    We have up to now considered the portfolio weights as given. In this chapter you learn how to determine in R the portfolio weights that are optimal in terms of achieving a target return with minimum variance, while satisfying constraints on the portfolio weights.

  1. 1

    The building blocks

    Free

    Asset returns and portfolio weights; those are the building blocks of a portfolio return. This chapter is about computing those portfolio weights and returns in R.

  2. Analyzing performance

    The history of portfolio returns reveals valuable information about how much the investor can expect to gain or lose. This chapter introduces the R functionality to analyze the investment performance based on a statisical analysis of the portfolio returns. It includes graphical analysis and the calculation of performance statistics expressing average return, risk and risk-adjusted return over rolling estimation samples.

  3. Performance drivers

    In addition to studying portfolio performance based on the observed portfolio return series, it is relevant to find out how individual (expected) returns, volatilities and correlations interact to determine the total portfolio performance.

  4. Optimizing the portfolio

    We have up to now considered the portfolio weights as given. In this chapter you learn how to determine in R the portfolio weights that are optimal in terms of achieving a target return with minimum variance, while satisfying constraints on the portfolio weights.

Kris Boudt
Kris Boudt

Professor of Finance and Econometrics at VUB and VUA

Kris Boudt is professor of finance and econometrics at Vrije Universiteit Brussel and Amsterdam. He teaches the courses "GARCH models in R" and "Introduction to portfolio analysis in R" at Datacamp. He is a research partner at Finvex and a founding member of the sentometrics organization. He is also affiliated with the KU Leuven and an invited lecturer at the University of Illinois in Chicago, Renmin University of China, Sichuan University and SWUFE in Chengdu and the University of Aix-Marseille. Kris Boudt obtained his PhD in 2008 for his developments in the modelling and estimation of financial risk under non-normal distribution. He has published his research in the Journal of Banking and Finance, Journal of Econometrics, Journal of Portfolio Management, Journal of Financial Econometrics, Journal of Risk and the Review of Finance, among others. Kris Boudt received several awards for outstanding research and refereeing and is an active contributor to the open source community.

See More

Course Instructor

Kris Boudt
Kris Boudt

Professor of Finance and Econometrics at VUB and VUA

Kris Boudt is professor of finance and econometrics at Vrije Universiteit Brussel and Amsterdam. He teaches the courses "GARCH models in R" and "Introduction to portfolio analysis in R" at Datacamp. He is a research partner at Finvex and a founding member of the sentometrics organization. He is also affiliated with the KU Leuven and an invited lecturer at the University of Illinois in Chicago, Renmin University of China, Sichuan University and SWUFE in Chengdu and the University of Aix-Marseille. Kris Boudt obtained his PhD in 2008 for his developments in the modelling and estimation of financial risk under non-normal distribution. He has published his research in the Journal of Banking and Finance, Journal of Econometrics, Journal of Portfolio Management, Journal of Financial Econometrics, Journal of Risk and the Review of Finance, among others. Kris Boudt received several awards for outstanding research and refereeing and is an active contributor to the open source community.

See More
Collaborator(s)
  • Lore Dirick

    Lore Dirick

  • Josiah Parry

    Josiah Parry

Join over 3,290,000 others learning to leverage the power of data with DataCamp!

Start Course For Free
Icon Icon Icon professional Icon info