Skip to main content
HomeR

Course

Introduction to Portfolio Analysis in R

BasicSkill Level
4.7+
139 reviews
Updated 11/2023
Apply your finance and R skills to backtest, analyze, and optimize financial portfolios.
Start Course for Free
RApplied Finance5 hr14 videos57 Exercises4,400 XP35,216Statement of Accomplishment

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

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.

Prerequisites

Intermediate R for Finance
1

The Building Blocks

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.
Start Chapter
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 statistical 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.
Start Chapter
3

Performance Drivers

4

Optimizing the Portfolio

Introduction to Portfolio Analysis in R
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.7
from 139 reviews
82%
16%
2%
0%
0%
  • Anthony
    2 weeks ago

  • Mathias
    2 weeks ago

  • Ludovic
    4 weeks ago

  • Saquib
    5 weeks ago

  • Danish
    5 weeks ago

  • WULFRANO
    6 weeks ago

Anthony

Mathias

Ludovic

FAQs

Which R package is central to this course?

The course uses the PerformanceAnalytics package to analyze portfolio returns. Data for the first three chapters can also be obtained using the tseries package.

Does this course teach portfolio optimization?

Yes. The final chapter covers determining optimal portfolio weights that achieve a target return with minimum variance, while satisfying constraints on the weights.

What prior R knowledge is needed?

You should have completed Introduction to R for Finance and Intermediate R for Finance. No advanced statistics background is required since the course starts at a beginner level.

What performance metrics will I learn to calculate?

You learn to compute average return, risk, and risk-adjusted return statistics, along with rolling estimation analysis and graphical performance reviews.

Does this course use real equity data?

Yes. It is illustrated on real-life examples of equity portfolios and asset allocation problems, using actual historical return data.

Join over 19 million learners and start Introduction to Portfolio Analysis in R today!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.