Spread the love


| Format: Ms Word | 1-5 Chapters | Table of Content|


Study Level: BTech, BSc, BEng, BA, HND, ND or NCE

Amount: ₦4,000.00

Account Details



Creating an ARIMA Model for Time Series Forecasting | by Javier Fernandez |  Towards Data Science


This project work “Modeling and forecasting crude oil price in Nigeria using arima model” is an attempt to examine the best ARIMA models for forecasting. The data employed in this study comprise of 492 monthly observations of crude oil price in Nigeria spanning from January, 1982 to December, 2022. At first the stationary condition of the data series are observed by autocorrelation function (ACF) and partial autocorrelation function (PACF) plots, then checked using Augmented Dickey Fuller (ADF) test statistic. It has been found that crude oil price is non-stationary after taking first difference of thedata series, the same types of plots and the same types of statistics show that the data is stationary. The best ARIMA models have been selected by using the criteria such as AIC, HQC, and SIC. The model for which the value of AIC criteria is smallest is considered as the best model. Hence ARIMA (6, 1, 6) is found as the best model for forecasting the crude oil price data series.







1.1 Background of the Study. 1

1.2 Summary of Some Events in History of Nigeria Crude Oil Production. 3

1.3 Statement of the Problem.. 6

1.4 Aim and Objectives of the Study. 7

1.5 Scope and limitation of the Study. 7

1.6 Definitions of terms. 7


2.1 Introductions. 8

2.2 Mathematical Tools Used. 9

2.3 Factors Affecting Crude Oil Prices. 10

2.3.2 Supply. 11

2.3.3 Government Policy. 12

2.3.4 Pandemic and Crisis. 12

3.1 Introduction. 14

3.2 Data Description. 14

3.3 Methods Adopted. 14

3.4 Time Series Analysis. 14

3.4.1 Components of Time Series Analysis. 15

3.4.2 Approaches to Time Series Analysis. 16

3.4.3 Time Plot 16

3.4.4 Correlogram.. 16

3.4.6 Unit Root Tests (Test for Stationary Series) 17

3.4.7 Autoregressive Integrated Moving Average (ARIMA) 18

3.4.8 Choosing ARIMA Order. 20

3.5 Model building Strategy. 20

3.6 Diagnostic Checking. 21

3.6.1 White Noise. 21

3.6.2 Forecast Evaluations. 21

3.6.3 Mean Squared Error (MSE) 21

3.6.5 Mean Absolute Error. 22

3.6.6 Mean Absolute Percentage Error (MAPE) 22

3.7 Mathematical Software Used. 23



4.1 Summary Statistics. 24

4.2 Model identification. 25

4.3 Time Series Plots of monthly crude oil price before Differencing. 25

4.3.1 Correlogram of monthly crude oil price before Differencing. 26

4.3.5 Correlogram of Monthly Crude Oil Price after First Differencing. 29

4.4 Model estimation. 30

4.5 Diagnostics and Forecasting. 31

5.6 Discussion of Findings. 38



5.1 Summary. 40

5.2 Conclusion. 40

5.3 Recommendations. 41





1.1 Background of the Study

The history of crude oil exploration in Nigeria dates back to 1908 when Nigerian Bitumen Corporation conducted exploratory work in the country, at the onset of World War I the firm‘s operation were stopped (Ikejiaku, 2009). Thereafter, licenses were given to D‘Arcy Exploration Company and Whitehall Petroleum but neither company found oil of commercial value and they returned their licenses in 1923. A new license covering 920,000 square kilometers (357,000 square miles) was given to Shell D‘arcy Petroleum Development Company of Nigeria, a consortium of Shell and British Petroleum (then known as Anglo-Iranian) (Essaghah, 2008). The company began exploratory work in 1937. The consortium was granted license to explore oil all over the territory of Nigeria but the acreage allotted to the company in the original license was reduced in 1951. Drilling activities started in 1951 with the first test well drilled in Owerri area. Oil was discovered in non-commercial quantities at Akata, near Eket in 1953. Prior to the Akata find, the company had spent around 6 million pounds on exploratory activities in the country. Shell-BP in the pursuit of commercially available petroleum found crude oil in Oloibiri, Nigeria in 1956. Other important oil wells discovered during the period were Afam and Bomu in Ogoni territory (Essaghah, 2008). Production of crude oil began in 1957 and in 1960 a total of 847,000 tons of crude oil was exported. Towards the end of the 1950s, non-British firms were granted license to explore for oil: Mobil in 1955, Tenneco in 1960, Gulf Oil and later Chevron in 1961, Agip in 1962, and Elf in 1962 (Kareem, et al, 2012). Prior to the discovery of oil, Nigeria (like many other African countries) strongly relied on agricultural exports to other countries to supply their economy. Many Nigerians thought the developers were looking for palm oil. But after nearly 50 years searching for oil in the country, Shell-BP discovered the oil at Oloibiri in the Niger Delta. The first oil field began production in 1958. Nearly all of the country’s primary reserves are concentrated in and around the Niger delta of the Niger River, but off-shore rigs are also prominent in the well-endowed coastal region.

In 1970, the end of the Biafran war coincided with the rise in the world oil price, and Nigeria was able to reap instant riches from its oil production. Nigeria joined the Organization of Petroleum Exporting Countries (OPEC) in 1971 and established the Nigerian National Petroleum Company (NNPC) in 1977; a state owned and controlled company which is a major player in both the upstream and downstream sectors.

Nigeria is one of the few major oil-producing nations still capable of increasing its oil output. Unlike most of the other OPEC countries, Nigeria is not projected to exceed peak production until at last 2009. The reason for Nigeria’s relative unproductivity is primarily OPEC regulations on production to regulate prices on the international market.

The Niger-Delta region is the area covered by the natural delta of the Niger River and the areas to the east and west. The broader Niger Delta Region consists of nine states (Abia, AkwaIbom, Bayelsa, Cross River, Delta, Edo, Imo, Ondo and Rivers) and 185 local governments. Crude oil was first discovered in commercial quantities in the Ijaw community of Oloibiri in 1956 in the Ogbia Local Government Area of Bayelsa State. Today, the Niger Delta is best known as a region that sustains much oil exploration and exploitation by the agents of western economic powers. The Niger Delta basin is considered the mainstay of the Nigerian economy for its significantly high level of oil reserves. The region is also naturally endowed with viable deposits of hydrocarbon and gas reserves. Petroleum and derivatives dominate the Nigerian economy making up about 98 percent of exports, over 80 percent of government‘s annual revenue and 70 percent of budgetary expenditure. Crude oil resource gives the Nigeria government about US$ 20 million a day (Oluduro and Oluduro, 2012). At the moment, Nigeria boasts of over 21 billion barrels of proven oil reserves. Nigeria is Africa‘s largest oil producer and the world‘s sixth most important exporter of crude oil with the bulk of its exports going to the United States.

Nigeria, with the largest natural gas reserve in Africa and the second largest crude oil reserve, also in Africa, is the largest producer of oil in the continent. The production rate has been on the increase over the years starting with a production capacity of 5100 barrels per day. In 2008, Nigeria‘s crude oil production averaged 1.94mb/d, and slightly over 2.2mb/d in 2009 (Country Analysis Brief, 2009). The Nigerian National Petroleum Corporation (NNPC) News and Update as at May 2016 revealed that Nigerian crude oil production has increased from 2.4 million barrels per day (mbpd) to an all-time high of 2.7mbpd. Following the discovery of crude oil by Shell D’Arcy Petroleum, pioneer production began in 1958 from the company’s oil field in Oloibiri in the Eastern Niger Delta. By the late sixties and early seventies, Nigeria had attained a production level of over 2 million barrels of crude oil a day. Although production figures dropped in the eighties due to economic slump, 2004 saw a total rejuvenation of oil production to a record level of 2.5 million barrels per day. The development strategies were aimed at increasing production to 4million barrels per day by the year 2010.

1.2 Summary of Some Events in History of Nigeria Crude Oil Production

1908, Nigerian Bitumen Co. & British Colonial Petroleum commenced operations around Okitipupa.

1938, Shell D’ Arcy granted Exploration license to prospect for oil throughout Nigeria.

1955, Mobil Oil Corporation started operations in Nigeria.

1956, First successful well drilled at Oloibiri by Shell D’Arcy

1956, Changed name to Shell-BP Petroleum Development Company of Nigeria Limited.

1958,First shipment of oil from Nigeria. – February 17.

1961,Shell’s Bonny Terminal was commissioned. Shell’s official opening of Port Harcourt office Texaco Overseas started operations in Nigeria.

1962, Elf started operations in Nigeria. (As Safrap) Nigeria Agip Oil Company started operations in Nigeria

1963, Elf discovered Obagi field and Ubata gas field Gulf’s first production

1965, Agip found its first oil at Ebocha Phillips Oil Company started operations in Bendel State Nigeria’s First Refinery in Port Harcourt ( 60,000 bpd) commissioned by Shell-BP

1966, Elf started production in Rivers State with 12,000 b/d 1967 Phillips drilled its first well (Dry) at Osari –I Phillips first oil discovery at Gilli-Gilli -I

1968, Mobil Producing Nigeria Limited) was formed. Gulf’s Terminal at Escravos was commissioned

1970, Mobil started production from 4 wells at Idoho Field Agip started production Department of Petroleum Resources Inspectorate started.

1971, Shell’s Forcados Terminal Commissioned Mobil’s terminal at Qua Iboe commissioned

1973,First Participation Agreement; Federal Government acquires 35% shares in the Oil Companies Ashland started PSC with then NNOC (NNPC) Pan Ocean Corporation drilled its first discovery well at Ogharefe

1974, Second Participation Agreement, Federal Government increases equity to 55%. Elf formally changed its name from “Safrap” Ashland’s first oil discovery at Ossu –I

1975, First Oil lifting from Brass Terminal by Agip DPR upgraded to Ministry of Petroleum Resources

1976, MPE renamed Ministry of Petroleum Resources (MPR) Pan Ocean commenced production via Shell-BP’s pipeline at a rate of 10,800 b/d.

1977, Government established Nigerian National Petroleum Corporation (NNPC) by Decree 33, (NNOC & MPR extinguished).

1979, Third Participation Agreement (throughout NNPC) increases equity to 60% Fourth Participation Agreement; BP’s shareholding nationalized, leaving NNPC with 80% equity and Shell 20% in the joint Venture. Changed name from Shell-BP to The Shell Petroleum Development Company of Nigeria (SPDC).

1984, Agreement consolidating NNPC/Shel1 joint Venture.

1986, Signing of Memorandum of Understanding (MOU)

1989, Fifth Participation Agreement; (NNPC=60%, Shell = 30%, Elf=5%, Agip=5%). Utorogu Gas Plant Commissioned LNG Shareholders Agreement signed

1991, Signing of Memorandum of Understanding & joint Venture Operating Agreement (JOA)

1993, Production Sharing Contracts signed –SNEPCO Established Sixth Participation Agreement; (NNPC=55%, Shell=30%, Elf= 10%, Agip=5%).

1995, SNEPCO starts drilling first Exploration well. NLNG’s Final Investment Decision take

1999, NLNG’s First shipment of Gas out of Bonny Terminal.

2000, NPDC/NAOC Service Contract signed Inauguration of Special Committee on the Review of Petroleum Products Supply and Distribution (SCRPPSD)

2001, Production of Okono offshore field.Inauguration of Petroleum Products Pricing Regulatory Committee.

2002, New PSCs agreement signed. Liberalization of the Downstream Oil sector. NNPC commences retail outlet scheme Inauguration of 28-members EITI National Stakeholders’ Working Group

2003, Total liberalization of the downstream, oil sector. Shell Achievement of 1 million Barrels per day Petroleum Products Pricing Regulatory Bill passed and signed into law.

2004, Shell Restructuring Exercise that change business approach and place Nigerian on Top positions.

2005, Jan.-Basil Omiyi appointed as first Nigerian Managing Director and Headquarters of SPDC moved from Lagos to Port Harcourt. Sept.-Basil Omiyi appointed Country Chair Shell Companies in Nigeria Oando became the first African company to be listed on the Johannesburg Stock Exchange

1.3 Statement of the Problem

There is no conclusive answer as to which is the best volatility model for forecasting volatility of crude oil price. Changes in oil prices have a direct effect on prices of other commodities. As investors seek to estimate future prices enabling them to make investment decisions, it is equally important to measure the risk of loss for investments. Elder and Serletis (2010) in their study conclude that when crude oil price changes are unpredictable, there is a significant drop in real output. CerovićSmolović et al. (2017) study the performance of ARIMA models and conclude that the, ARIMA (1, 1, 2) and ARIMA (1, 2, 1) are best for forecasting volatility of crude price in his research. However, there are many contradicting conclusions regarding the choice of volatility models to use. This poses a challenge to investors as the choice of volatility model directly affects the performance of the investor. Vlaar (2000) tested the GARCH model under different portfolios and concluded that the GARCH model under the Normal distribution dominates the common practice of using historical simulation models. Miletic and Miletic (2015) showed that GARCH models with a t-distribution of residuals in most analyzed cases give a better estimation than GARCH models with normal errors in the case of a 99% confidence level, while the opposite is true in the case of a 95% confidence level. Orhan and Kksal (2012) concluded that the ARCH model and leptokurtic error distributions yielded the best results for the  estimations while Angelidis et al. (2004) found no clearly superior model but concluded that leptokurtic distributions outperformed the Normal distribution; especially for the ARCH model. Few studies have been done focusing on both VaR estimation and volatility forecasting under the same conditions. This study sheds light on the issue of volatility forecasting crude oil price using Box-jenkins model. Therefore, the problem of this study is to model and forecast the future price of crude oil in Nigeria using the best ARIMA models.

1.4 Aim and Objectives of the Study

The aim of this study is to establish models; using Box-Jenkins methodology models, to analyze crude oil price data based on Nigeria production with a view to achieve the following


  1. To develop time series models (ARIMA models) for the crude oil price data in Nigeria.
  2. To determine the accuracy, and the best of the models.
  • To determine the predicted future crude oil price monthly, in Nigeria.



Account Number: 0709546102

Access Bank: Savings
Account Name: Emmanuel Idorenyin Samuel.