Financial returns

Introduction to R for Finance

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

Stock returns

  • $50 worth of Apple stock
  • 10% return in January
  • How much money do you have at the end of the month?

5 = 10% of 50

55 = 50 + 5

Introduction to R for Finance

Stock returns

ch1_vid2_slides.010.png

Introduction to R for Finance

Stock returns

ch1_vid2_slides.011.png

Introduction to R for Finance

Stock returns

ch1_vid2_slides.012.png

Introduction to R for Finance

Stock returns

ch1_vid2_slides.013.png

# Return Multiplier
mult <- 1 + interest_rate / 100

# New Amount new_cash <- starting_cash * mult
Introduction to R for Finance

Stock returns - multiple periods

  • $50 worth of Apple stock
  • 10% return in January
  • 5% return in February

57.75 = 55 * 1.05

57.75 = 50 * 1.10 * 1.05

new_cash <- starting_cash * jan_mult * feb_mult
Introduction to R for Finance

Let's practice!

Introduction to R for Finance

Preparing Video For Download...