Sei sulla pagina 1di 8

PREDICTIVE ANALYTICS PROJECT

Forecasting of FOREIGN TRADE BALANCE (INR) OF INDIA

Ashish Kr. Singh – M.B.A(B.A)


A006110818008
1|Page

Introduction
Foreign trade in India includes all imports and exports to and from India. At the level of Central
Government, it is administered by the Ministry of Commerce and Industry. Foreign trade accounted for
48.8% of India's GDP in 2017. The balance of trade, commercial balance, or net exports (sometimes
symbolized as NX), is the difference between the monetary value of a nation's exports and imports over
a certain time period. Sometimes a distinction is made between a balance of trade for goods versus one
for services. The balance of trade measures a flow of exports and imports over a given period of time.
The notion of the balance of trade does not mean that exports and imports are "in balance" with each
other.

If a country exports a greater value than it imports, it has a trade surplus or positive trade balance, and
conversely, if a country imports a greater value than it exports, it has a trade deficit or negative trade
balance. As of 2016, about 60 out of 200 countries have a trade surplus. The notion that bilateral trade
deficits are bad in and of themselves is overwhelmingly rejected by trade experts and economists.

Foreign balance trade data of India is collected from the website “data.gov.in”. Data is collected for the
duration from January 2010 to July 2019.

We apply decomposition method to separate a time series into five components mean, long range
trend, seasonality, cycle and randomness. The decomposition model is

Value = (Mean) x (Trend) x (Seasonality) x (Cycle) x (Random).

Note that this model is multiplicative rather than additive.

Methodology

The dataset of foreign trade balance of India shows trend, seasonality, cyclicity with irregularities.
Therefore, Decomposition method is used to separate the various components. Below is the data,

The methodology used to forecast the data is first, by using the decomposition method the separate the
various components by using decomp() function in R. Once the components are separated , dataset is
seasonally adjusted by removing the seasonality from the data. After adjusting the dataset for
seasonality, Exponential smoothening method is used to forecast the future values and finally model is
checked for the accuracy.
2|Page

Below is the plot of the data,

Data Analysis and Interpretation


Various packages are installed in R, such as ggplot2, Forecast, stats, dplyr etc. As observed from the
dataset, it has additive seasonality. Therefore, decomposition method is used with additive seasonality.

First the dataset is converted into time series object. “Decompose()” function is used to decompose the
time series. Below is the snapshot of the R screen.

The function “decompose()” returns a list object as its result, where the estimates of the seasonal
component, trend component and irregular component are stored in named elements of that list
objects, called “seasonal”, “trend”, and “random” respectively.

The estimated values of the seasonal, trend and irregular components are now stored in variables
model$seasonal, model$trend and model$random.
3|Page

we can print out the estimated values of the seasonal component, Trend Component and randomness
component.

The estimated seasonal factors are given for the months January to December, and are the same for
each year. The largest seasonal factor is observed for the month February(about 142.5) and lowest for
October (about -112.99) indicating that there seems to be peak in foreign trade balance in February and
trough in October each year.

We can plot the estimated trend, seasonal, and irregular components of the time series by using the
“plot()” function.
4|Page

The plot below shows the original time series (top), the estimated trend component (second from top),
the estimated seasonal component (third from top), and the estimated irregular component (bottom).

Seasonally Adjusting
After decomposing the series, data is seasonally adjusted by subtracting the estimated seasonal
component from the original time series.
5|Page

Forecasting using exponential smoothening


After adjusting the data for seasonality, Exponential smoothening method can be used to forecast the
future values.

As it can be seen from the plot that there is roughly constant level.The random fluctuations in the time
series seem to be roughly constant in size over time, so it is probably appropriate to describe the data
using an additive model. Thus, we can make forecasts using simple exponential smoothening.

To make forecasts using simple exponential smoothing in R, we can fit a simple exponential smoothing
predictive model using the “HoltWinters()” function in R.

The HoltWinters() function returns a list variable, that contains several named elements.
6|Page

The Holtswinter() function forecast the valus for the same time period as of original time series, i.e for
2010 to 2019.

We can plot the original time series with forecasted values as shown below,

The plot shows the original time series in black, and the forecasts as a red line. The time series of
forecasts is much smoother than the time series of the original data here.

To forecast the values for further time points, we use forecast function, which uses first input as a model
to use to predict the future values.
7|Page

Further ,plot function can be used to plot the predictions made by forecast() function.

Potrebbero piacerti anche