Course Outline


Refresher on R Programming Basics

Creating Dates and Times in R

  • Overview of Data Classes for Dates and Times
  • Exploring Your First Date and Time Objects
  • Creating Dates from Character Strings
  • Using Vectors to Create Multiple Dates from Character Strings
  • Specifying Date Formats
  • Converting Between Date Formats
  • Getting Time Intervals Between Dates
  • Extracting Date Components Using Functions

Using If Statements and Operators in R

  • Overview of the Exercise: Creating a Program for Buying or Selling Stocks
  • Using Relational Operators
  • Comparing Vectors Using Relational Operators
  • Using Logical Operators
    • Implementing And/Or
    • Implementing Not
    • Using Subsets with Data Frames and Logical Operators
  • Hands On: Creating Your Stocks Program by Combining Relational and Logical Operators
  • Using If Statements
    • Exploring the Basic If Structure
    • Implementing If-Else Statements
    • Implementing Nested If Statements
    • Using the ifelse() Function

Implementing Loops in R

  • Implementing Repeat Loops Using Stock Prices Example
  • Implementing Break Points
  • Implementing While Loops Using Debt Example
    • Using While Loops with Printing Function
    • Creating Plots Using While Loops
    • Using Break and If Statements in While Loops
  • Implementing For Loops Using Stocks Example
    • Looping Over Vectors
    • Looping Over Data Frame Rows
    • Looping Over Matrix Elements
    • Using Break and Next

Implementing Functions in R

  • Overview of Functions
  • Getting Help with Functions and Reading Documentations
  • Using Arguments and Optional Arguments
  • Implementing Nested Functions
  • Creating Your First Function: Turning Percentage into a Decimal
  • Implementing Multiple Arguments in Your Custom Function
  • Creating a Function to Calculate Present Value
  • Understanding Function Scoping
  • Introduction to Packages Using tidyquant

Using Apply Functions in R

  • Using Apply Functions to Perform Complicated Calculations
  • Implementing lapply() on a List
  • Implementing lapply() on a Data Frame Using Sharpe Ratio Example
  • Using FUN Arguments in lapply() to Improve the Sharpe Ratio Function
  • Using sapply() to Simplify Apply
  • Exercise: Examining a Sample Program on the Stock Market Crash List
  • Using vapply() and FUN.VALUE
  • Using Anonymous Functions


Summary & Conclusion


  • Experience in basics of R programming
  • A basic understanding of finance concepts
  21 Hours


Related Courses

Introduction to Data Visualization with Tidyverse and R

  7 hours


  7 hours

FinOps Certified Practitioner (FOCP) Preparation

  14 hours

FinOps For Engineers

  14 hours

Open Bank Project for Developers

  14 hours

Learning Xero

  14 hours

GnuCash for Business Accounting

  7 hours

Introduction to Fixed Income

  14 hours

A Practical Guide to Successful Pricing Strategies

  7 hours

Basics of Customizing for Financial Accounting: GL, AP, AR in SAP S/4 HANA (S4F12)

  35 hours

Investment Banking: Introduction to Structured Products

  21 hours

Financial Markets

  14 hours

Financial Markets and Trading

  14 hours