trends | R Documentation |
Google Trends for Crude Oil Data.
data(trends)
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"
The data are in monthly frequency. They cover the period between Jan, 2004 and Dec, 2016.
The data are provided by Google.
https://trends.google.com/trends
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-/']
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.