Skip to main content

Importing and Managing Financial Data in R

Learn how to access financial data from local files as well as from internet sources.

Start Course for Free
5 Hours15 Videos57 Exercises15,995 Learners
4850 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

If you've ever done anything with financial or economic time series, you know the data come in various shapes, sizes, and periodicities. Getting the data into R can be stressful and time-consuming, especially when you need to merge data from several different sources into one data set. This course will cover importing data from local files as well as from internet sources.

  1. 1

    Introduction and downloading data


    A wealth of financial and economic data are available online. Learn how getSymbols() and Quandl() make it easy to access data from a variety of sources.

    Play Chapter Now
    Welcome to the course!
    50 xp
    Introducing getSymbols()
    100 xp
    Data sources
    100 xp
    Make getSymbols() return the data it retrieves
    100 xp
    Introduction to Quandl
    50 xp
    Introducing Quandl()
    100 xp
    Return data type
    100 xp
    Finding data from internet sources
    50 xp
    Find stock ticker from Yahoo Finance
    100 xp
    Download exchange rate data from Oanda
    100 xp
    Find and import Unemployment Rate data from FRED
    100 xp
  2. 2

    Extracting and transforming data

    You've learned how to import data from online sources, now it's time to see how to extract columns from the imported data. After you've learned how to extract columns from a single object, you will explore how to import, transform, and extract data from multiple instruments.

    Play Chapter Now
  3. 3

    Managing data from multiple sources

    Learn how to simplify and streamline your workflow by taking advantage of the ability to customize default arguments to `getSymbols()`. You will see how to customize defaults by data source, and then how to customize defaults by symbol. You will also learn how to handle problematic instrument symbols.

    Play Chapter Now
  4. 4

    Aligning data with different periodicities

    You've learned how to import, extract, and transform data from multiple data sources. You often have to manipulate data from different sources in order to combine them into a single data set. First, you will learn how to convert sparse, irregular data into a regular series. Then you will review how to aggregate dense data to a lower frequency. Finally, you will learn how to handle issues with intra-day data.

    Play Chapter Now
  5. 5

    Importing text data, and adjusting for corporate actions

    You've learned the core workflow of importing and manipulating financial data. Now you will see how to import data from text files of various formats. Then you will learn how to check data for weirdness and handle missing values. Finally, you will learn how to adjust stock prices for splits and dividends.

    Play Chapter Now

In the following tracks

Finance FundamentalsQuantitative Analyst


Davis VaughanLore Dirick
Joshua Ulrich Headshot

Joshua Ulrich

Quantitative Analyst & member of R/Finance Conference committee

Joshua Ulrich is a Quantitative Analyst & Programmer for an algorithmic market maker, a member of the R/Finance Conference organizing committee, and founder of the Saint Louis R User Group. He is the creator of TTR, and co-author of several other packages for R and finance. He is passionate about computational finance, algorithmic trading, risk management, and helping people solve problems.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA