Baltic Dry Index – with R

Baltic Dry Index. Source: Lloyd’s List. The Baltic Dry Index (BDI) is a measure of the price of shipping major raw materials such as metals, grains, and fossil fuels by sea. It is created by the London Baltic Exchange based on daily assessments from a panel of shipbrokers. The BDI is a composite of 3 sub-indices, each covering a different carrier size: Capesize, Panamax, and Supramax. Capesize carriers are the largest ships with a capacity greater than 150,000 DWT. Panamax refers to the maximum size allowed for ships traveling through the Panama Canal, typically 65,000 – 80,000 DWT. The Supramax Index covers carriers with a capacity of 50,000 – 60,000 DWT.

Source: http://www.lloydslist.com/ll/sector/markets/market-data.htm

The following R codes would generate the following charts:
library(Quandl)
library(ggplot2)
library(forecast)
library(‘quantmod’)
Baltic_Index=Quandl(“LLOYDS/BDI”, type=”xts”)

plot(Baltic_Index)

Rplot01

 

 

 

chartSeries(Baltic_Index, subset=’last 12 months’)
addMACD()
addBBands()

Baltic Index in last 12 months – Baltic Index is rising.

Rplot

 

Diff365<-Delt(Baltic_Index, k=365)*100

plot(Diff365)

The following chart shows the changes from previous year (365 days ago)

Rplot03

 

fit <- arima(Baltic_Index, order=c(2, 0, 1))

 

# predictive accuracy
library(forecast)
accuracy(fit)

# predict next 5 observations
library(forecast)
forecast(fit, 365)
plot(forecast(fit, 360))

The following chart shows the projection for next 365 days with ARIMA (2,0,1) model

Rplot02

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s