Giter VIP home page Giter VIP logo

hpfilter.jl's Introduction

HPFilter.jl

HPFilter.jl is a Julia module that implements the Hodrick-Prescott (HP) Filter as well as the boosted HP Filter based on Peter Phillips and Zhentao Shi (2019): "Boosting the Hodrick-Prescott Filter".

The original implementation in R by one of the coauthors can be found here.

Get Started

This module can either be employed by cloning this repository or by using the Julia package manager. With the package manager simply use the add command:

(v1.3) pkg> add https://github.com/sdBrinkmann/HPFilter.jl

Usage

The basic usage is demonstrated with the US industrial production index (IPI) provided by FRED data service.

using HPFilter
using CSV

# Set path to directory where time series is located
path = "/.../data"

IPI = CSV.read("$(path)/IPB50001SQ.csv", copycols=true)

# HP filter with λ = 1600
hp = HP(IPI[!, 2], 1600)

# Boosted HP filter with baysian-type information criterion (BIC)
bHP_bic = bHP(IPI[!, 2], 1600, Criterion="BIC")

# Boosted HP filter with augmented Dickey-Fuller (ADF) test 
bHP_adf = bHP(IPI[!, 2], 1600, Criterion="ADF", p=0.01)

HP Results

hpfilter.jl's People

Contributors

sdbrinkmann avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.