Introduction to R for Finance

In this finance-oriented introduction to R, you will learn essential data structures such as lists and data frames and have the chance to apply that knowledge to real-world financial examples. By the end of the course, you will be comfortable with the basics of manipulating your data to perform financial analysis in R.

  1. The Basics

Get comfortable with the very basics of R and learn how to use it as a calculator. Also, create your first variables in R and explore some of the base data types such as numerics and characters.

  1. Vectors and Matrices

In this topic, you will learn all about vectors and matrices using historical stock prices for companies like Apple and IBM. You will then be able to feel confident creating, naming, manipulating, and selecting from vectors and matrices.

  1. Data Frames

Arguably the most important data structure in R, the data frame is what most of your data will take the form of. It combines the structure of a matrix with the flexibility of having different types of data in each column.

  1. Factors

Questions with answers that fall into a limited number of categories can be classified as factors. In this topic, you will use bond credit ratings to learn all about creating, ordering, and subsetting factors.

  1. Lists

Wouldn’t it be nice if there was a way to hold related vectors, matrices, or data frames together in R? In this final topic, you will explore lists and many of their interesting features by building a small portfolio of stocks.

Introduction to Python for Finance

R is broad and powerful, with many analytic and graphic functions available (more than 50,000). With guidelines and instructions, you can navigate the tremendous resources available in R thereby accomplishing your work with style, elegance, and efficiency.

Many people and researchers despise statistics, mainly due to their non-mathematical background. This makes understanding complex statistical equations very difficult. The advent of computer programs such as R and the like provides a unique opportunity to teach statistics at a conceptual level without getting too bogged down in equations. However, the downside of the computer is that it makes it really easy to make complete fools of ourselves if we do not really understand what we are doing. Running an analysis using a computer without any statistical knowledge can be totally misleading. Hence this course could be called Unearthing the Statistician in You Using R.

  • The R environment
  • Getting data into and of R
  • Data management in R
  • Plotting in R

Assumptions

  • Exploring
  • Remedial measures

Correlations

  • Bivariate correlations
  • Partial correlations

This course introduces Python for financial analysis.

  1. Welcome to Python

This topic is an introduction to basics in Python, including how to name variables and various data types in Python.

  1. Lists

This topic introduces lists in Python and how they can be used to work with data.

  1. Arrays in Python

This topic introduces packages in Python, specifically the NumPy package and how it can be efficiently used to manipulate arrays.

  1. Visualization in Python

In this topic, you will be introduced to the Matplotlib package for creating line plots, scatter plots, and histograms.

  1. Case Study

In this topic, you will get a chance to apply all the techniques you learned in the course on an example dataset.

Introduction to Portfolio Risk Management in R

This course will teach you how to evaluate basic portfolio risk and returns like a quantitative analyst on Wall Street. This is the most critical step towards being able to fully automate your portfolio construction and management processes. Discover what factors are driving your portfolio returns, construct market-cap weighted equity portfolios, and learn how to forecast and hedge market risk via scenario generation.

  1. Univariate Investment Risk and Returns

Learn about the fundamentals of investment risk and financial return distributions

  1. Portfolio Investing

Level up your understanding of investing by constructing portfolios of assets to enhance your risk-adjusted returns.

  1. Factor Investing

Learn about the main factors that influence the returns of your portfolios and how to quantify your portfolio’s exposure to these factors.

  1. Value at Risk

In this topic, you will learn two different methods to estimate the probability of sustaining losses and the expected values of those losses for a given asset or portfolio of assets.

Financial Trading in R

This course will cover the basics on financial trading and will give you an overview of how to use quantstrat to build signal-based trading strategies in R. It will teach you how to set up a quantstrat strategy, apply transformations of market data called indicators, create signals based on the interactions of those indicators, and even simulate orders. Lastly, it will explain how to analyze your results both from statistical and visual perspectives.

  1. Trading basics

In this topic, you will learn the definition of trading, the philosophies of trading, and the pitfalls that exist in trading. This topic covers both momentum and oscillation trading, along with some phrases to identify these types of philosophies. You will learn about overfitting and how to avoid it, obtaining and plotting financial data, and using a well-known indicator in trading.

 

  1. A boilerplate for quantstrat strategies

Before building a strategy, the quantstrat package requires you to initialize some settings. In this topic you will learn how this is done. You will cover a series of functions that deal with initializing a time zone, currency, the instruments you’ll be working with, along with quantstrat’s various frameworks that will allow it to perform analytics. Once this is done, you will have the knowledge to set up a quantstrat initialization file, and know how to change it.

  1. Indicators

Indicators are crucial for your trading strategy. They are transformations of market data that allow a clearer understanding of its overall behavior, usually in exchange for lagging the market behavior. Here, you will be working with both trend types of indicators as well as oscillation indicators. You will also learn how to use pre-programmed indicators available in other libraries as well as implement one of your own.

  1. Signals

When constructing a quantstrat strategy, you want to see how the market interacts with indicators and how indicators interact with each other. In this topic you’ll learn how indicators can generate signals in quantstrat. Signals are interactions of market data with indicators, or indicators with other indicators. There are four types of signals in quantstrat: sigComparison, sigCrossover, sigThreshold, and sigFormula. By the end of this topic, you’ll know all about these signals, what they do, and how to use them.

  1. Rules

In this topic, you’ll learn how to shape your trading transaction once you decide to execute on a signal. This topic will cover a basic primer on rules, and how to enter and exit positions. You’ll also learn how to send inputs to order-sizing functions. By the end of this topic, you’ll learn the gist of how rules function, and where you can continue learning about them.

  1. Rules

In this topic, you’ll learn how to shape your trading transaction once you decide to execute on a signal. This topic will cover a basic primer on rules, and how to enter and exit positions. You’ll also learn how to send inputs to order-sizing functions. By the end of this topic, you’ll learn the gist of how rules function, and where you can continue learning about them.

Quantitative Risk Management in R

Have you ever wanted to plan for retirement, understand the stock market, or create a cash flow for your business? In this course, you will learn how to build business and financial models in Sheets. Google Sheets is an excellent technology for business models! You can create a framework for your goal, like understanding the growth of investments, and then update that framework based on current data. You will learn the basics of business modeling focusing on cash flows, investments, annuities, loan amortization, and saving for retirement. By the end of the course, you will have gained referencing and function skills in Sheets that you can apply to all sorts of models.

  1. What are Models?

An introduction to modeling financial statements in Sheets focusing on balance and income statements, which help create cash flow models.

  1. Time Value Money Models

Learn Sheet’s financial model functions by creating investment models with the fv, pv, pmt, and nper functions. You will also learn how to pay off debts in a loan amortization table.

  1. Planning and Investing Models

Saving for retirement is tricky, but in this topic, you will learn how to create models that help you plan to save and use your money after retirement.

  1. Probabilistic Models

Stock prices go up and down but can we model them? Learn about volatility and simulating stock prices in this final topic.

Credit Risk Modeling in R

This hands-on-course with real-life credit data will teach you how to model credit risk by using logistic regression and decision trees in R.

Modeling credit risk for both personal and company loans is of major importance for banks. The probability that a debtor will default is a key component in getting to a measure for credit risk. While other models will be introduced in this course as well, you will learn about two model types that are often used in the credit scoring context; logistic regression and decision trees. You will learn how to use them in this particular context, and how these models are evaluated by banks.

  1. Introduction and data preprocessing

This topic begins with a general introduction to credit risk models. We’ll explore a real-life data set, then preprocess the data set such that it’s in the appropriate format before applying the credit risk models.

  1. Logistic regression

Logistic regression is still a widely used method in credit risk modeling. In this topic, you will learn how to apply logistic regression models on credit data in R.

  1. Decision trees

Classification trees are another popular method in the world of credit risk modeling. In this topic, you will learn how to build classification trees using credit data in R.

  1. Evaluating a credit risk model

In this topic, you’ll learn how you can evaluate and compare the results obtained through several credit risk models.

Financial Analytics in Spreadsheets

Monitoring the evolution of traded assets is key in finance. In this course, you will learn how to build a graphical dashboard with spreadsheets to track the performance of financial securities. You will focus on historical prices and dividends of the hypothetical stock ABC. You will learn how to visualize its prices, how to measure essential reward and risk indicators, and see if your investment in ABC outperformed a benchmark index. At the end of the course, you should be able to use spreadsheets to build great monitoring tools used by traders and financial analysts in their day-to-day business life!

  1. Monitoring historical prices

In the first topic, you’ll be introduced to the problem: you have a time series of monthly (historical) prices for the hypothetical stock ABC from which you have to extract some meaningful information. You’ll be given some definitions (what is a stock? what are dividends?), and at the end of the topic, you’ll be able to graphically represent the evolution of a stock price over a specific period.

  1. Monitoring historical returns

In this topic, the core of the analysis will switch from historical prices to historical returns. You’ll learn (and compute) the main performance indicators of past returns, both in terms of reward and risk. Finally, you’ll be introduced to risk-adjusted performance measures: indicators that take into account both reward and risk.

  1. Monitoring the distribution of returns

In this topic, you’ll look at the full distribution of historical returns. First, you’ll learn how to build a histogram to describe the distribution of historical returns. Second, you’ll be introduced to the Gaussian distribution, a commonly used model for stock returns. You’ll visually inspect if the Gaussian model is reasonable for the ABC stock returns. Finally, you’ll understand potential flaws with the Gaussian model.

  1. Benchmarking performance

In this final topic, you’ll benchmark ABC stock against a market index and verify whether ABC outperformed the benchmark or not. The comparison process will be done through several steps/metrics. First, you’ll analyze the cumulative wealth. Next, you’ll extend the comparison using different indicators such as Sharpe Ratio and Drawdown. Finally, you’ll examine the linear relation between ABC stock and the benchmark through the correlation coefficient. At the end of the topic, you’ll be introduced to more powerful and advanced spreadsheet features that introduce interactivity in your analysis.

Importing and Managing Financial Data in R

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. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.