GithubHelp home page GithubHelp logo

allisterh / dffm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ottosven/dffm

0.0 0.0 1.0 338 KB

R-package accompanying the paper "Approximate Factor Models for Functional Time Series"

License: GNU General Public License v3.0

R 100.00%

dffm's Introduction

dffm

The goal of dffm is to provide functionality to apply the methods developed in the paper โ€œApproximate Factor Models for Functional Time Seriesโ€ by Sven Otto and Nazarii Salish.

Preprint:

https://arxiv.org/abs/2201.02532

Installation

You can install the package using the following command:

library(remotes)
install_github("ottosven/dffm")

Example

library(dffm)
# ---- data ---- #
data = load.fed()
# ---- preliminary --- #
fpca.obj = fpca.preprocess(data = data, method = "splines")
dffm.3Dplot(fpca.obj, domainlab = "maturities", outputlab = "yields (in percent)", 
            main = "3D plot of FED yields from 2001 to 2021")
plot(fpca.obj$eigenvalues, type = "b", main = "Screeplot", ylab = "eigenvalues")
dffm.criterion(fpcaobj = fpca.obj)
# ---- fitting yieldcurve ---- #
dffm.obj = dffm(fpcaobj = fpca.obj, K = 4, p = 1)
plot(dffm.obj$fittedcurve.workgrid[246,], type = "l", xlab = "maturities", ylab = "yields (in percent)", 
     main = "Yieldcurve of december 2021")
# ---- predicting the yieldcurve ---- #
predicted.dffm = dffm.forecast(dffmobj = dffm.obj, h = 10)
plot(predicted.dffm$predcurves.workgrid[10,], type = "l", xlab = "maturities", ylab = "yields (in percent)", main = "Predicted yieldcurve of october 2022")

dffm's People

Contributors

justinfranken avatar ottosven avatar

Forkers

liulinxmu

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.