8000 GitHub - NFSturm/forecasting: This repository contains code to reproduce the analysis of recession probabilities
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

NFSturm/forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forecasting

This repository contains code to conduct a recession analysis. Four models are compared in their performance as recession predictors: Boosting (gbm), Support Vector Machines (svmLinear and svmRadial), Decision Trees (rpart) as well as Logistic Regression (glm) as a benchmark.

Data from FRED:

Quandl:

Financial data is drawn from YahooFinance:

Data for US recession is from NBER: https://www.nber.org/cycles.html

Packages used

  • readxl
  • zoo
  • ggplot2
  • rsample
  • caret
  • quantmod
  • dplyr
  • doParallel
  • MLmetrics
  • data.table
  • readr
  • Plotly

Note: Since recessions rarely happen (luckily!), the classes "Bust" (for recession) and "NoBust" (no recession) are heavily imbalanced. This creates some problem during the optimization process. To mend this issue, the optimizier uses the "prSummary"-function, which focusses on precision and recall.

About

This repository contains code to reproduce the analysis of recession probabilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0