This page was intentionally left blank
With the recent advances in technical resources and the vast availability of financial information, finance practitioners are required to generate reproducible and scalable analysis in a timely fashion to guide decision-making:
\(\rightarrow\) To that point, departing from the general tools, such as Excel, to more advanced tools, such as and , is an imperative change!
This is a hands-on, practical course on Quantitative Finance with applications using and , two of the most widely used open-source software for data analysis. It will be structured in topics that are of interest to Finance practitioners, aiming to include, but not limited to:
Students are also expected to interact with leading industry practitioners focused on financial applications using open-source languages, aiming to discover more about the possibilities of applying the skills learned in this course in the financial industry
Important
Most of the references listed in this bibliography have an open-source version that is hosted online, where you can copy-paste code chunks directly into your session. All contents with restricted access will be provided upfront.
Grading will be composed of the following activities:
Office-hours
I also host office-hours (by appointment) on Thursdays, 5PM-6PM. In these sessions, I’ll be more than happy to help you with anything you need from this course. Use the Office-hour Appointments link at the bottom of this slide to schedule an appointment (or click here).
Tech setup: in the official page of your course, you will find instructions on how to properly set up your computer in terms of downloading all necessary softwares, packages, and customizing your session1
Code Replication: right after we are done with a given topic, try to replicate the in-class handouts on your end and check if you are able to yield the same outputs
Showcase: programming, data science, analytics, machine learning, and so on…these terms are on the hype of today’s job market - although few people really know how to make meaningful impact with it. Use this course as an opportunity to differentiate and showcase the skills you’ve learned and stand out to potential employers2
On the usage of ChatGPT and other gen-AI tools
Generative Artificial Intelligent (gen-AI) adoption is quickly spreading through corporate life and universities. At this point, it is worth the question…am I allowed to use gen-AI tools in this course?
\(\rightarrow\) See AI-powered coding pulls in almost $1bn of funding to claim ‘killer app’ status (Financial Times)
These slides leverage Quarto, an open-source scientific and technical publishing system from Posit (formerly RStudio):
For our course, we’ll use the following notation:
gray
R
)Note
In the R
panel, hit Show the Code to display the code inside the tabset. Hit the button at the top-right to copy it to your session.
Listings
, you will be prompted with an interactive R
console that you can use to run existing and new code to a “virtual” session. Try changing the ticker to NVDA
and check if anything has changed.
Hints
and Solution
buttons to interact with the prompt. Even if you submit the wrong answer, a live-tutoring feature will provide you with a handful of tips to adjust your code and resubmit your solution. For example, complete the code to read Microsoft price (MSFT.csv
) data and select the latest 10 OHLC (Open, High, Low, Close) information. The dataset is arranged in descendant format (latest price information is at the bottom of the table).
First, use the names()
function to retrieve the names of the columns available in the dataset.
After that, use the tail()
function to retrieve only the latest 10 observations.
As we get started, there are a couple of things you should remember:
works with libraries, which consists of a bundle of functions, methods, data and other components that can be loaded in your session (i.e, as you open RStudio or any other IDE of your preference)
To load a library, you call library(x)
, where x
refers to the package name
x
is already installed in your computer, you are good to gox
is not installed, you need to call install.packages('x')
before you attempt to load itinstall.packages()
needs to be called once; library()
needs to be called at the beginning of each session!# Package names
packages <- c("tidyverse","tidyquant","tidymodels","xts","glue","scales","ggthemes")
# Install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages])
}
# Load all packages
lapply(packages, library, character.only = TRUE)
#Note that you could simply do it iteratively:
#Install if not already available
#install.packages('tidyverse')
#install.packages('tidyquant')
#install.packages('tidymodels')
#install.packages('xts')
#install.packages('glue')
#install.packages('scales')
#install.packages('ggthemes')
#Load
#library(tidyverse)
#library(tidyquant)
#library(tidymodels)
#library(xts)
#library(glue)
#library(scales)
Key Highlights:
Tech-setup
In the official webpage of this course, I have outlined all necessary steps to get started using R, as well as some useful tips for those that want to get up to speed on the course’s requirements - please follow this link and carefully read the instructions.