Learn R Programming

fDMA (version 2.2.7)

trends: Google Trends for Crude Oil Data.

Description

Google Trends for Crude Oil Data.

Usage

data(trends)

Arguments

Format

trends is xts object such that

  • trends$stock_markets -- Google Trends for "stock markets"

  • trends$interest_rate -- Google Trends for "interest rate"

  • trends$economic_activity -- Google Trends for "economic activity"

  • trends$exchange_rate -- Google Trends for "exchange rate"

  • trends$oil_production -- Google Trends for "oil production"

  • trends$oil_consumption -- Google Trends for "oil consumption"

  • trends$market_stress -- Google Trends for "market stress"

Details

The data are in monthly frequency. They cover the period between Jan, 2004 and Dec, 2016.

Examples

Run this code
data(trends)
gtrends <- trends/100
data(crudeoil)
wti <- crudeoil[-1,1]
drivers <- (lag(crudeoil[,-1],k=1))[-1,]
ld.wti <- (diff(log(wti)))[-1,]
ld.drivers <- (diff(log(drivers)))[-1,]
ld.wti <- ld.wti['2004-01-01-/']
ld.drivers <- ld.drivers['2004-01-01-/']
# \donttest{
xx <- ld.drivers
m <- fDMA(y=ld.wti,x=xx,alpha=0.99,lambda=0.99,initvar=1,model="dma",gprob=gtrends,omega=0.5)
# }

Run the code above in your browser using DataLab