Risk Indicators – VIX Index and TED Spread
There are some risks indicators that traders and investors need to watch to avoid days with high volatility. These indicators are referred to as leading risk indicators. A good example of a risk...
View ArticlePlotting the VIX Index and TED Spread in R
In this lesson, will will look at how to create the two graphs in R. Before you start, it is important to setup your basic environment: Setup Environment Open RStudio and ensure that you have the basic...
View ArticleIntroduction to Quantmod in R
The quantmod package for R is designed to assist the quantitative traders in the development, testing, and deployment of statistics based trading models. Using quantmod, quant traders can quickly...
View ArticleDownloading Data Using Quantmod Package in R
Once the quantmod package is installed and library is loaded, we can start using the library. We will start by showing some examples of how to download data from the web and load the data into the...
View ArticleCreating Charts with Quantmod
Apart from loading data from external and local sources, Quantmod is also suitable for making beautiful charts. There are three types of charts: lines, bars and candlestick. We will learn how to create...
View ArticleData Analysis with Quantmod in R
We will perform some data analysis with the 4 ETF symbols that we have loaded into the environment. This analysis consists of comparing the returns of the four ETFs, observing their correlations,...
View ArticleMeasuring Overall ETFs Performance
We will now plot a graph to show the accumulated returns of the ETFs over a period of time. We can do so by following the following steps: Build a dataframe with the 4 ETFs prices and a date column....
View ArticleQuantstrat Example in R – EMA Crossover Strategy
Our first quantstrat example case study is based on the Exponential Moving Average (EMA) Crossover. Let’s briefly review what moving averages and crossovers are. Moving Averages A moving average is...
View ArticleQuantstrat – EMA Crossover Strategy – Performance and Risk Metrics
Once we have the strategy results, quantstrat provides many functions to analyze the strategy and observe important metrics of performance and risk. We would combine the quantstrat package with the...
View ArticleIoT Capabilities for the Insurance Industry
The internet of things is a technological revolution that promises to sweep over life as we know. IoT offers a number of fantastic uses and capabilities that drive smart living and make our daily life...
View ArticleQuantstrat Example in R – RSI Strategy
In this Quantstrat case study, we will create a strategy with the Relative Strength Index (RSI) indicator that gives signals related to overbought and oversold regimes. RSI Strategy Entry and Exit...
View ArticleQuantstrat Case Study – Multiple Symbol Portfolio
One of the main advantages of quantstrat package is that we can backtest strategies with multiple symbols as fast as with one symbol. The package provides fast computations for multiple symbols that...
View ArticleCredit Risk Modelling – Case Studies
In this tutorial, we will learn credit risk modeling in R using case studies. Specifically, we will use two case studies starting with a simpler one using which we will learn the methodology and...
View ArticleClassification vs. Regression Models
While building any predictive model, it is important to first understand whether it is a classification or a regression problem. Let’s understand the difference between the two: 1. Classification In a...
View ArticleCase Study – German Credit – Steps to Build a Predictive Model
We will preform various steps in building our predictive model. These steps are explained below: Step 1 – Data Selection The first step is to get the dataset that we will use for building the model....
View ArticleImport Credit Data Set in R
We are using the German Credit Scoring Data Set in numeric format which contains information about 21 attributes of 1000 loans. First, setup a working directory and place this data file in that...
View ArticleGerman Credit Data : Data Preprocessing and Feature Selection in R
The purpose of preprocessing is to make your raw data suitable for the data science algorithms. For example, we may want to remove the outliers, remove or change imputations (missing values, and so...
View ArticleCredit Modelling: Training and Test Data Sets
For building the model, we will divide our data into two different data sets, namely training and testing datasets. The model will be built using the training set and then we will test it on the...
View ArticleBuild the Predictive Model
We have now gathered our data and cleansed/transformed it to suit our modeling needs. The next step is to actually build the model. The goal of predictive modeling is to build a model to predict the...
View ArticleLogistic Regression Model in R
Logistic regression aims to model the probability of an event occurring depending on the values of independent variables. The logistic regression model seeks to estimate that an event (default) will...
View Article