Time Series in Finance

Project Summary

Matt and Ken led two labs for the engineering section of STA 111/130, an introductory course in statistics and probability. The lab assignments were written by Matt and Ken in order to bridge the gap between introductory linear regression, which is often explained in terms of a static, complete dataset, and time series analysis, which is not a common topic in introductory courses. 

Themes and Categories
Year

Graduate students: Matt Johnson and Ken McAlinn 

Faculty instructor: David Banks

Course: STA 130 Probability and Statistics in Engineering 

Summary

Over the course of the two modules, students:

  • Learned introductory topics in finance, including returns, log returns, and the Fama/French model for explaining market returns,
  • Learned about and applied autoregressive time series models,
  • Applied linear regression to a new topic, and
  • Applied new functionality in the MATLAB programming language.

Notably, as these topics were presented in a lab setting, little if any time was spent on a lecture. Instead, the material was presented to students through the lab, with students deriving concepts and properties on their own as a part of the assignment (with some help from Matt and Ken when necessary). Students applied the above methods to a dataset containing daily returns for the Standard & Poor’s 500 Index as well as the returns for the three factors included in the Fama and French Three Factor Model (the original dataset, consisting of tick-level data for Japanese stocks, was considered somewhat overwhelming to introduce, clean, and analyze in a single class session). The main topics covered were those important to fitting a linear regression, including:

  • Identifying predictors,
  • Checking for collinearity among predictors,
  • Removing unnecessary predictors using forward selection.

These topics were related to the autocorrelation and partial autocorrelation functions relevant in time series analysis, and especially with regards to autoregressive time series.

Data Description

For Data Expeditions, we have collected two datasets.

The first consists of daily closing prices of the S&P 500 from 1/4/1995-12/31/2014 and market factors.

These are:

  • Date: Trading date, ranging from 1/4/1995 to 12/31/2014.
  • Adj Close: The adjusted closing price of the S&P 500 (adjustments account for dividends, distribu- tions, corporate actions, etc. that occur before the open of the next day). For our purposes, this is the same as the closing price (the closing price is usually the last price at which a stock trades that day).
  • Mkt-RF: Market - Risk Free, compares the performance of the (risky) market as a whole to a risk-free asset (daily returns).
  • SMB: Small Minus Big, a factor portfolio that measures the performance of small cap stocks relative to large cap stocks (daily returns). When SMB goes up, small cap outperforms large cap.
  • HML: High Minus Low, a factor portfolio that measures the performance of “value” stocks compared to “growth” stocks (daily returns).

The second data set includes high frequency trading data for two stocks from the Japanese stock market, Sony (6758) and Toyota (7203), for the month of January in 2012. Each .csv file contains the trading data for that day, where the files are named as YYYYMMDD ####.csv (#### denote the stock number).

In each file, there are five columns. The first column is the stock number, the second is the hour and minute, the third is the second, the fourth is the 1/10 and 1/100th of the second, and the fifth the price. Every time an order is made on the market (either buy or sell), the time and price is recorded. 

Related Projects

This data expeditions module used three full course sessions to introduce undergraduate hydrology students with minimal programming background to:

  • Public water data (water quantity and chemistry)

  • Spatial analysis of water data

  • 2 core, spatial datasets produced by the USGS that enable spatial analysis

  • The programming language R

  • R based tools for water data

  • Spatial analysis and maps in R

Exposure to local pathogens is a significant selective pressure on the human genome: the strongest selective forces identified in modern human populations are for mutations that confer increased resistance to malaria infection. Understanding how human genetic variation impacts susceptibility to pathogens can reveal important aspects of disease biology and reveal novel treatment targets. By using genome-wide association of infection-related cellular traits, we can connect human genetic variation to disease susceptibility in a controlled laboratory environment. Identification of the variants, genes, and cellular pathways involved in infectious disease pathogenesis can inform host-directed therapeutics, clinically effective risk stratification, and epidemiological prediction. This data expedition explores the effect of host genetic variation on chemokine response to Chlamydia infection.

How does human habitation relate to patterns in the natural environment? How do species respond to the presence of, and changes in, habitation? In this Data Expedition, students make use of public datasets from the Census and the Global Biodiversity Information Facility to examine relationships between individual species and human settlements. Students develop introductory skills in spatial data manipulation and visualization in R, exposure to powerful datasets and tools, and critical thinking skills in assessing dataset quality and bias.