Ai trading
Ai trading
Ai trading
---------------------------------------------------------------------***----------------------------------------------------------------------
Abstract- Stock markets are very important for a country's With less data and testing, the main goal is to find the best
economic growth in today's world. Since these markets are design for the machine learning model to perform better
very active, many studies have shown that traditional trading than others. This paper will focus on solving this problem
methods face several challenges. Therefore, in this paper, we and exploring different techniques to handle the specific
introduce a framework that uses various trading strategies to trading task. We aim to find an algorithm that uses fewer
predict stock market trends. Artificial intelligence is often resources but still provides the most accurate results
used to reduce risks and maximize net profit through possible.
different trading algorithms. Different methods, such as
Neural Networks, XGBoost, and SVM, are used in algorithmic Many methods have been used in the past to predict stock
trading to predict stock prices in the future. This paper prices, but we will focus on those based on artificial
explains how the data is collected, analyzed, and how these intelligence. The main contribution here is proposing the
techniques work, along with some examples. The results are XGBoost method for stock trading instead of more traditional
significant, showing which technique works best for machine learning methods.
algorithmic trading using machine learning algorithms to
achieve the highest returns. 2. LITERATURE SURVEY
Keywords: Artificial Intelligence, Stock Trading, SVM – There are several methods for predicting the future price of
support verctor machine, Machine Learning stocks over a specific time frame. We are using three
different methods: Neural Network, Support Vector Machine,
1. INTRODUCTION and XG Boost. After applying these methods, we compare
them to find the most effective one that provides the highest
Traditionally, methodologies used for forecasting the stock net profit.
price relied solely on technical indicators that generate
trading signals based on profit generation. We have used the
trading strategies to which we have applied the 2.1 Neural Network
methodologies of artificial intelligence in association with
technical analysis indicators combined with real-time price Neural Networks are often used to reduce various risks and
information. increase net profits in different types of algorithmic trading
strategies. Simple neural network models can predict future
The resulting AI-based prediction models are intended to be stock market price movements [3].
used by an automated trader to buy and sell stocks on a
stock market. Artificial Intelligence has become very Definitions related to stock trading in Neural Networks:
important in predicting stock trends. Techniques in AI, such Logreturn:
as neural networks, are used to identify correlations,
relationships, and market changes based on historical data, Let cp be the current closing price and cp−1 be the previous
and to predict future trends of a stock. closing price.
R = loge( cp/cp−1)*100 %
= (loge (cp) – loge (cp−1) )*100 % One-minute
Trend Indicator :-
This is a measurable indicator that shows how the
price is changing over time. It uses a simple line (cost =
at+b) to fit the price data for a specific moment, where t is
the time in milliseconds within that minute [4].
Disadvantages:
SVM MODEL: From Figure 4, we can see how the classifier decides
The kernel feature we're using here is the radial kernel, between buying and selling.
which is one of the most popular kernel functions
available [13]. FEATURES FOR THE MODEL:
3. PROPOSED METHOD
3.1 Preprocessing
We shall collect the stock market price data from our source.
Disadvantages:-
Above figure7, explains how decision tree works. If P.B. < Fig 8. trading performance of decision tree [5].
1.5 and vol < 0.8 then strong returns are expected.
Likewise other combinations are described Figure 8 helps us understand how decision trees work,
which gives us clues about how XGBoost might perform.
3.2.2 Tree Boosting XGBoost uses multiple decision trees in its approach.
During the tree boosting process, we focus on multiple As we can see, the initial loss was quite high, so it's not very
decision trees, each of which is refined based on the suitable for our needs due to its poor performance.
previous ones.
Now, we will apply the XGBoost algorithm to these decision
Tree boosting allows us to make complex decisions by using trees and observe its performance.
decision trees as basic building blocks.
After applying XGBoost, we can see a significant
An ensemble technique employs a tree ensemble model, improvement in the algorithm's performance. It is making
which consists of regression and classification trees (CART). profits more predictably, and even when the market goes
The predictions from multiple trees are combined using down, it continues to make profits, which is what we need.
CART.
XGBoost is more optimized and requires fewer resources to
By enhancing previous methods and merging their results, run. This makes it faster and more efficient in terms of
new models are developed to reach the final prediction. This resource usage.
method is called Gradient Boosting.
ADVANTAGES OF XGBOOST:
The objective function for the eXtreme Gradient Boost model
is: Objective = Loss_func + regular_comp · Speeding up parallel learning with Block structure:
· To handle large and fast calculations, eXtreme
Loss_func measures the accuracy of predictions, while Gradient Boosting uses all the cores in the processor.
regular_comp helps prevent overfitting and keeps the model This is possible due to a special design in XGBoost
simple. called the block structure. Data is organized and
stored in different parts of the memory called blocks.
In the beginning, we have to process through a bunch of
Unlike other algorithms, this setup allows data to
processing of data and tuning of model. The algorithm for
be reused in future iterations and processes
grid search is used for tuning various values for eXtreme
without needing to recalculate it.
gradient boosting.
Reciver operating characteristics curve is a plot of FPR vs · Self-awareness of cache: In the eXtreme Gradient
TPR that explains binary classifier model diagnostic abilityas Boosting algorithm, gradient statistics are stored by row
variation of discrimination threshold occurs. index within non-continuous
memory. Because of this, the design of XGBoost is cache-
aware.
Efficient use of available hardware is achieved by dividing 4. Machine Learning: Automatic Trading Using
memory into sections for each thread, allowing gradient Event-Driven Data by Jason W. Leung, pages
statistics to be stored in memory. 24, 25, 39-42.
Out-of-core computing: It makes the most of memory and 5. "Using a Group of Neural Networks to Trade
optimizes disk space when working with very large datasets Stocks: A Study in North American and
that can't fit into memory all at once. Brazilian Markets" (2015), published by IEEE.