You are on page 1of 24

GOLD PRICE PREDICTION USING PYTHON

A PROJECT REPORT

Submitted by

Jhelam Rout (220720100335)

in partial fulfillment for the award of the


degree of

MASTER IN COMPUTER APPLICATION


in
COMPUTER SCIENCE AND ENGINEERING

DEPARTMENT OF MCA

SCHOOL OF ENGINEERING AND TECHNOLOGY


BHUBANESWAR CAMPUS
CENTURION UNIVERSITY OF TECHNOLOGY AND MANAGEMENT
ODISHA

NOVEMBER 2023

SPECIMEN CERTIFICATE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


SCHOOL OF ENGINEERING AND TECHNOLOGY
BHUBANESWAR CAMPUS
BONAFIDE CERTIFICATE

Certified that this project report “Gold price prediction using python” is the bonafide
work of “ Jhelam Rout ” who carried out the project work under my supervision.
This is to further certify to the best of my knowledge that this project has not been
carried out earlier in this institute and the University.

SIGNATURE

Dr. Saneev Kumar Das


ASST. PROFESSOR, DEPT. OF MCA

Certified that the above-mentioned project has been duly carried out as per the norm
of the college statutes of the university

SIGNATURE

Prof. Rakesh Kumar Ray

HEAD OF THE DEPARTMENT MCA, CUTM

DEPARMENTAL SEAL
DECLARATION

I hereby declare that the project entitled “GOLD PRICE PREDICTION Using

Python” submitted for the “Minor Project” of 3rd semester M.C.A in Computer

Science and Engineering is my original work and the project has not formed the

basis for the award of any Degree / Diploma or any other similar titles in any other

University / Institute.

Name of the Student: Jhelam Rout

Registration No: 220720100335

Place:

Date:
ACKNOWLEDGEMENT

I wish to express my profound and sincere gratitude to Prof. Saneev Kumar


Das, Department of Computer Science and Engineering, SoET, Bhubaneswar
Campus, who guided me into the intricacies of this project nonchalantly with
matchless magnanimity.

I thank Prof. Rakesh Kumar Ray, Head of the Dept. of Department of


Computer Science and Engineering, SoET, Bhubaneswar Campus and Prof. Sujata
Chakravarty, Dean, School of Engineering and Technology, Bhubaneswar Campus
for extending their support during Course of this investigation.

I would be failing in my duty if I don’t acknowledge the cooperation


rendered during various stages of Gold price prediction using Python.

I am highly grateful to Dr. Saneev Kumar Das, who evinced keen interest
and invaluable support in the progress and successful completion of my project
work.

I am indebted to Gold price prediction using Python for their constant


encouragement, co-operation and help. Words of gratitude are not enough to
describe the accommodation and fortitude which they have shown throughout my
endeavour.

Jhelam Rout(220720100335)
TABLE OF CONTENTS

CHAPTER NO TITLE
1 CERTIFICATE 2
2 DECLARATION 3

3 ACKNOWLEDGEMENT 4

4 PROBLEM STATEMENT 6

5 ABSTRACT 7

6 INTRODUCTION 8

7 REQUIRMENTS 9

8 USES 11

9 SOURCE CODE 12

10 OUTPUT 13

11 CONCLUSION 22

12 REFERENCES 23
PROBLEM STATEMENT

Problem Formulation is one of the most important steps We do before starting any
project. there has to be a clear idea about the goal of our data science project. In
our case, the goal of this project is to analyse the price of gold. The price of gold
is volatile, they change rapidly with time. Our main Aim of this project will be to
predict the price of gold per unit.
Gold prices are affected by a variety of factors, including global economic
conditions, interest rates, currency fluctuations, geopolitical events, and demand
and supply dynamics. Traditional models for predicting gold prices often rely on
statistical methods, such as regression analysis, time-series analysis, and
econometric models. However, these models have limitations in capturing the
complexity of the market dynamics and may not be able to account for sudden
changes in market conditions.
ABSTRACT

We predict future gold rates supported twenty two market variables victimization
machine learning technique. One machine learning algorithm, random forest
regression were used in analysing these knowledge. Historically, gold was used for
supporting trade transactions around the world besides alternative modes of payment.
Various states maintained and increased their gold reserves and were recognized as
rich and progressive states. In present times, precious metals like gold area unit
control with central banks of all countries to make sure repayment of foreign debts,
and conjointly to control inflation. Moreover, it conjointly reflects the Imoney
strength of the country. Besides government agencies, varied transnational firms and
people have conjointly invested with in gold reserves. In ancient events of Asian
countries, gold is in addition presented as gifts/souvenirs and in marriages, gold
ornaments are conferred as gift in Republic of India.
INTRODUCTION

Gold has always been a popular investment choice for people around the world.
It is a haven asset that provides protection against economic and political
uncertainty. As a result, predicting gold prices accurately can be extremely
beneficial for investors. Machine learning has become a potent technique for
predicting financial prices, especially gold prices, in recent years. We will look at
how machine learning can be used to forecast gold prices in this article.
Python is a popular programming language for developing machine learning and
deep learning models. It offers several libraries and frameworks that simplify the
process of developing and implementing these models. This has led to the
development of several gold price prediction systems using Python
SOFTWARE REQUIREMENTS OF GOLD PRICE PREDICTION
 Operating System: Windows 2000 Professional

 Environment: Jupyter Notebook

 Framework: Version 1.0

 Language: Python

HARDWARE REQUIREMENTS OF GOLD PRICE PREDICTION

 Processor: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz 2.42 GHz

 Processor Speed: 250 MHz to 833 MHz

 Ram: 512 Mb Ram

 Hard Disk: 40 Gb
METHODOLOGY

The gold price prediction process using Facebook Prophet can be divided into four
main steps, each utilizing different Python modules and libraries. These steps are:

1. Data Collection:

The initial step involves gathering historical gold price data from
reliable sources such as financial databases like Yahoo Finance,
Quandl, or the World Gold Council. The collected data should
include the date and corresponding gold price.

2. Data Preprocessing:

After gathering the data, it is necessary to perform data cleaning and


preparation in order to make it suitable for analysis. This involves
handling missing values, addressing outliers, and formatting the data
into a time series structure with the date as the index and the gold
price as the value.

3. Model Fitting:

After data preprocessing and configuring the method, the model is


fitted to the historical data. The Prophet algorithm employs a
Bayesian framework to fit a generalized additive model to the time
series data.

3. Model Evaluation:

The effectiveness of the trained Facebook Prophet model is assessed


using test data. Evaluation metrics such as mean absolute error
(MAE), mean square error (MSE), and root mean square error
(RMSE) are used to measure the model's performance. The accuracy
of the Facebook Prophet model is compared to other established time
series forecasting algorithms using these metrics.

4. Forecasting:

The final step involves generating forecasts for future gold prices using the trained
model. The Prophet algorithm predicts gold prices for a specific time horizon, such as
the next day, week, or month. The forecasted values can be visualized by plotting
them against the actual values to evaluate the accuracy of the predictions.
USES

Pandas

Pandas is an open-source library authorized under the Berkeley Programming


Conveyance (BSD). This well-known library is frequently utilized in the field of data
science. They're generally utilized for examination, control, and cleaning of
information, in addition to other things. Without having to switch to another
programming language like R, Pandas enables us to carry out straightforward data
modelling and analysis.

NumPy

When it comes to scientific computing, NumPy is one of the fundamental packages


for Python, providing support for large multidimensional arrays and matrices along
with a collection of high-level mathematical functions to execute these functions
swiftly. NumPy relies on BLAS and LAPACK for efficient linear algebra
computations. NumPy can also be used as an efficient multi-dimensional container of
generic data.

Seaborn

This package makes statistical model visualization possible. The library, which is
largely based on Matplotlib, makes statistical graphics possible by:

1. Variable examination by means of a Programming interface in view of datasets.


2. Make complex representations effortlessly, including multi-plot frameworks.
3. To compare data subsets, univariate and bivariate visualizations are utilized.
4. A wide range of color schemes are available for pattern displays.
5. Direct relapse assessment and plotting are done consequently.
Matplotlib

This library is responsible for the plotting of numerical data. It is utilized in data
analysis for this reason. An open-source library plots superior quality figures, for
example, pie outlines, scatterplots, boxplots, and diagrams, in addition to other things.

SciPy

Scipy is a Python library. Scientific computing, information processing, and high-


level computing are the primary uses for this open-source library. The library contains
a large number of easy-to-use methods and functions for quick and easy computation.
Scipy can be utilized for numerical calculations close by NumPy.

Some of SciPy's subpackages include cluster, fftpack, constants, integrate, io, linalg,
interpolate, ndimage, odr, optimize, signal, spatial, special, sparse, and stats.

Scikit- learn

Additionally, Scikit-learn is a Python-based open-source machine learning library.


This library supports both supervised and unsupervised learning methods. This library
already comes pre-installed with a number of well-known algorithms as well as the
SciPy, NumPy, and Matplotlib packages. Spotify music recommendations are the
Scikit-most-learn application that is most widely used.
Conclusion

In conclusion, machine learning has emerged as a powerful tool for predicting gold
prices. By collecting and preprocessing relevant data, selecting appropriate features,
and training and evaluating machine learning models, it is possible to develop
accurate and reliable predictions of gold prices.
However, it is essential to acknowledge the limitations associated with using the
Facebook Prophet algorithm for gold price forecasting. External factors, such as
political developments and global economic conditions, can significantly influence
gold prices.

In summary, the Facebook Prophet algorithm shows promise in predicting gold prices
and providing valuable insights for traders, investors, and decision-makers. Its ability
to handle both seasonal and non-seasonal patterns, integrate external variables, and
outperform traditional forecasting techniques makes it an appealing choice. However,
it is crucial to exercise caution and consider the limitations and uncertainties
associated with the forecasts. Understanding the potential influence of external factors
on gold prices is essential when making investment decisions based on the predictions
generated by the Facebook Prophet algorithm.
References

1. https://www.kaggle.com/datasets/sid321axn/gold-price-prediction-dataset
2. https://www.javatpoint.com/gold-price-prediction-using-machine-learning
3. https://www.ijert.org/a-study-on-gold-price-prediction-using-machine-learning
4. https://www.researchgate.net/publication/
362491642_Gold_Price_Prediction_using_Machine_Learning

You might also like