0% found this document useful (0 votes)
45 views11 pages

Group - Vii, Nse Project-2

Uploaded by

jaikumar21012004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views11 pages

Group - Vii, Nse Project-2

Uploaded by

jaikumar21012004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

COURSE NAME : FINTRON (BDU)

SKILL OFFERING ID : 2293


PROJECT TITLE : Compare high-frequency and low-frequency
trading strategies. Develop a predictive model
using machine learning for derivatives trading,
considering historical data.
COLLEGE NAME : SRM TRICHY ARTS AND SCIENCE
COLLEGE
COLLEGE CODE : 0461
PROJECT SUBMITTED TO : NSE ACADEMY
YEAR : 2021 - 2024
DEPARTMENT : COMMERCE
SEMESTER : VI
GROUP NUMBER : VII
SPOC NAME : N. SENTHIL KUMAR
GUIDED BY : Dr. D. SELVALAKSHMI

MEMBERS OF THE GROUP : NISHANTHI. R (CB21C 83893)


RISHIKESH. S (CB21C 83894)
SABARINATHAN. K (CB21C 83895)
SAHASAN. M (CB21C 83896)
SANTHOSH. P (CB21C 83897)
ABSTRACT
 This paper utilizes agent-based simulation to compare different market making strategies
for high frequency traders (HFTs). After proposing a model representing HFTs' activities
in financial market when they act as market makers, we carry out simulations to explore
how different quoting strategies affect their profit. The results show that combination of (i)
offering prices based on the latest trading price, and (ii) using the information about market
volatility and order imbalance, increase market makers’ daily returns.
 The financial sector has greatly impacted the monetary well-being of consumers, traders,
and financial institutions. In the current era, artificial intelligence is redefining the limits of
the financial markets based on state-of-the-art machine learning and deep learning
algorithms. There is extensive use of these techniques in financial instrument price
prediction, market trend analysis, establishing investment opportunities, portfolio
optimization, etc. Investors and traders are using machine learning and deep learning
models for forecasting financial instrument movements. With the widespread adoption of
AI in finance, it is imperative to summarize the recent machine learning and deep learning
models, which motivated us to present this comprehensive review of the practical
applications of machine learning in the financial industry.

INTRODUCTION
 Market making refers to a trading strategy that seeks to profit by providing liquidity to other
traders and gaining the ask/bid spread, while avoiding accumulating a large net position in
a stock. Market making is not a new trading strategy, but the wide spread of high frequency
trading (HFT), a form of algorithmic trading which use sophisticated technologies to
rapidly trade securities, has given it new features. It is now involved in higher trading speed,
and greater trading volume. The Securities and Exchange Commission (SEC) generalized
four types of trading strategies that often utilized by HFTs (SEC 2010). Among them,
market making is the most transparent one and constitutes more than 60% of HFT volume
(Hagstromer and Norden 2013). Menkveld (2013) carefully studies the profit and net
position of a large HFT who acts as a modern market maker. But the strategy under the
performance of this HFT, as well as the relationship between strategy and market condition,
are not described. The extensive usage and considerable profit of this strategy have
attracted many scholars (Guilbaud and Pham 2013, Guéant et al. 2013
 The performance of a country’s financial market is a crucial determinant of its overall
economic condition, enabling economists and financial experts to gauge the country’s
current economic health. Among the various financial markets, the stock market stands out
as a key driving force. A country’s economic situation directly or indirectly impacts sectors
such as finance, agriculture, metal, and investment banking, among others. The growth of
these sectors hinges on their volatility, which follows the fundamental principle of supply
and demand. The demand for a particular sector directly influences the stock market, with
increased supply prompting traders and financial institutions to invest in that sector or
stock, driving up prices. Additionally, regular dividend payments contribute to the
generation of profits and returns on invested capital. It is imperative for investors to identify
the opportune moment to sell shares and achieve their desired returns. Financial markets
encompass various types of market, including stock markets, derivatives markets, bond
markets, and commodity markets (Obthong et al. 2020). The stock market serves as a
platform for investors to invest in and own a portion or fraction of a company. As
companies grow, they often require additional funding to support their future endeavors.
Following the approval of current shareholders, who face diluted ownership due to the
issuance of new shares, companies can sell these shares to investors to raise capital.
Successful outcomes result in increased stock market value for the shares.

RELATED WORK
High Frequency Trading
 The rapid development of HFT raises many concerns among scholars on its strategy and
profit. For instance, Brogaard (2010)"analyzes a dataset of 26 HFT firms to study their
strategies"and profitability. He finds that HFTs tend to"follow a price reversal strategy
driven by order imbalances, and"provide the best bid and offer quotes for a significant
portion"in a trading day. In another study, Menkveld (2013) studies a large"HFT who has
an annualized Sharpe ratio of 9.35, acting as"a modern market-maker of a new market, chi-
X. The gross"profit of the HFT have been decomposed into spread profit"and position loss,
and the position loss has been decomposed"into profit less than five seconds and loss on
longer duration" positions.
 In this study, the single HFT firm has an aggressiveness" ratio of only 22%. Differently, in
other studies, Carrion (2013), as well as" Brogaard et al. (2013) analyze NASDAQ"
Datasets and find that more than 50% of HFT activity is"aggressive. Since these HFTs use
combination of strategies and are involved in different market conditions, the conclusions
may lack of generality. But they can be a great"help for the design of agent-based HFT
model, which is able to focus on a certain type of strategy and test its performance in
different market environments.

Market Making Strategy

 Market making is considered as a trading strategy which providing limit orders on both
sides of the midprice. How these limit orders are placed in terms of volume and distance
from the mid-price, are the concerns of this strategy. Relatively, Nevmyvaka et al. (2003)
use a simple class of non-predictive trading strategies to test electronic market making, and
examine the impact of various parameters on the market maker's performance. Kendall and
Su (2004) also use an agent-based model to evolve successful trading strategies by
integrating individual learning and social learning. Wang et al. (2013) implement a learning
algorithm for market makers to search the optimal trading frequency, and they study how
different trading frequencies of market makers affect the market.
 In another paper, Wah and Wellman (2015) employ simulation based methods to evaluate
heuristic strategies for market makers and find the presence of the market maker is benefit
to both impatient investors and overall market. However, the high frequency market
marking is differ from the traditional one in respect of the speed they gain market
information and conduct their transactions. So in our model, we take into account the huge
trading volume of high frequency market makers, and consider how the competition
between market makers affects the performance of strategy.
MODELLING OF HIGH FREQUENCY MARKET MAKING
 In this section, we build a continuous double auction stock market in which agents trade
using information on the limit order book (LOB), a place records unexecuted limit orders.
Agents in the model are classified into two categories according to their goals and
strategies. The one is Low Frequency Traders (LFTs), who evaluate the value of the asset
and try to earn the profit by using an integrated strategy of fundamental value-based and
trend-follow. The other is High Frequency Traders (HFTs), who ignore the value of the
asset but only pay attention to the trading environment itself, and they mainly try to
accumulate the profit on the spread using the market making strategy. We stimulate the
intra-day transaction scenario where both agent categories trade on one single asset. The
framework of the model and more details are presented in following subsections.

Framework
 The model is an extension of the one presented by Leal et al. (2014). For the totally T
trading sessions, trading procedure is as follows: ‚ Active LFTs decide whether to enter the
market according to their expected returns. If enter, they submit either a sell or a buy order
with size and price based on their expectations. ‚ Knowing the orders submitted by LFTs,
HFTs decide whether to enter the market. If enter, they usually submit both a sell and a buy
order with size and price in order to absorb the orders of LFTs and earn the profit on the
spread. ‚ LFTs and HFTs' orders are matched and executed according to their price and
arrival time. The latest trading price is determined then and unexecuted orders rest in the
LOB for the next trading session. ‚ After each session, LFTs and HFTs decide whether to
update their trading parameters according to their performances.

Low Frequency Traders Activity


 For each trading session, LFT i acts as following: 1. Decides whether to be active according
to his active probability LFi_ap. LFi_ap is drawn from a uniform distribution with support
[gLmin , gLmax] and can be changed according to individual profit. 2. If being active, LFT
i first calculates the expected price of the asset LFi_EP based on the expected return
LFi_ER, then generates the ask price LFi_APt and bid price LFi_BPt at time t based on the
latest trading price pt.
 Utilizing the idea of LeBaron and Yamamoto (2007), LFTs form their weighted forecasts
on the future returns by combining fundamental-, chart-, and noise-based forecasts as
follows:
 And the expected price LFi_EP is calculated as pt ⁄"e ^ LFi_ER. li represents the memory
length of LFT i, and li ~ U(1, lmax). ni 1 , ni 2 , ni 3 are the weights for fundamentalist,
chartist, and noise-induced components for LFT i, respectively, and randomly assigned
according to normal distributions: ni 1 ~ |N(0, j1)|, ni 2 ~ N(0, j2) and ni 3 ~ N(0, j3). And
price for sell/buy orders at time t are formed as follows:
Table : Parameters in initial simulation.
Description Symbol Value
Number of trading sessions T 400
Number of traders N 400
Fundamental value pf 50
Tick size ts 0.01
LFT initial active possibility [gLmin , gLmax] [0.01, 0.1]
LFT max memory length lmax 30
LFT order price fluctuation [せLmin , せLmax] [-0.002, 0.01]
LFT order size fluctuation [さLmin , さLmax] [200, 1000]
LFT order life けL 10
LFT parameter evolution circle k 30
LFT parameter evolution rate そ 0.3
Std of fundamental component j1 0.3
Std of chartists component j2 0.6
Std of noise-trader component j3 0.1
HFT percentage HFTper 2%
HFT active threshold [gHmin , gHmax] [5, 5]
HFT order price fluctuation せH 0.01
HFT order absorption rate [さHmin , さHmax] [0.1, 0.5]
HFT order life けH 1
COMPARISON OF MARKET MAKING STRATEGY
 In this section, some experiments that compare the performance of different market making
strategies are discussed. For more clarification, we mainly discuss the relationship between
different quoting prices and daily return.

Strategies considering quoting position and spread


 Market makers usually submit their orders in both buy and sell sides in order to earn the
spread. A common approach is to submit limit buy/sell orders at the current best bid/ask
prices (denoted as Pb t / Pa t ). This implies that the spread position is relatively constant.
Hence the mid-quote is taken as the base price. Another alternative is using the latest
trading price as the base price. This approach considers trading price in next few sessions
may evenly distributed around the latest trading price.
 Regarding the ask/bid order spread of market makers, we first look into the situation
which taking mid-quote as the base price. If a market maker places his orders at the
current best bid/ask prices, denoted as “ask/bid” strategy, then his ask/bid order spread is
equal to the spread in the LOB. One can also place his ask (bid) orders at a marginal lower
(higher) price than the current ask (bid), in order to get priority in the order execution.
 However, spreads in the LOB for a liquid stock are usually extremely tight and leave little
profit margin. Therefore, such submission strategy may hit the opposite side of the LOB
and in fact bring a loss to the market maker. Moreover, a market maker can place his
orders deeper into the LOB, such as one tick away from current best ask/bid price,
denoted as “ask/bid-” strategy. This strategy results in higher margins as well as lower
order execution rate for market makers. The previously described mechanisms are
expected when a market maker uses the latest trading price as the base price. We assume
he places ask/bid quotes one or two ticks away from the base price. These scenarios are
denoted as “last” and “last-” strategy respectively. Quoting prices of each strategy are
illustrated.
 In addition to quoting strategies, 2% of the traders are considered to be HFTs. Moreover,
all of those traders use a same quoting strategy, selected from the Table 2, and their orders
are submitted in a random order. We test the performance of these strategies evaluating
the daily return and end-of-day inventory. (end-of-day inventory for strategy “last” is
seen as
 Each strategy is simulated for 200 times, and the average return and end-of-day inventory
are calculated.
Strategies considering volatility and order imbalance
 The prior market making strategy can work well when the trajectory of the price is similar
to a random walk, but it may meet with difficulties if things happen in another way. For
example, if there comes the period that price keeps going up, the market maker can hardly
get his bid orders executed. Hence he accumulates a large short position and loses a lot
of money. So the information of market volatility and the order book imbalance need to
be considered to avoid such situation.
 According to empirical study (Raman et al. 2014), market makers are likely to reduce
their participation and their liquidity provision in periods of significantly high
volatility. In this case, we assume the market maker will place his orders deeper from
standard situation, denoted as strategy “v”.
 Moreover, market makers tend to adjust their quoting price when observing an order
imbalance in the LOB (Hendershott and Menkveld 2010). When the difference between
the volume of ask quotes and bid quotes becomes significant in the LOB, i.e. when (q_b
- q_s)/(q_b + q_s) > そ1, market makers expect an uptrend in the price movement and
adjust their ask/bid quotes with an increment そ2. They can also lower the ask/bid quotes
when observing there are much more sells than buys. We set そ1 equals to 0.5 and そ2
equals to ts, and name this order imbalance concerned strategy as “im”.
 We assume a market maker can use either one or the combination of these strategies. The
quoting prices of these strategies are listed in Table 3, and the “last” strategy is taken as
the baseline.

Basic Machine Learning Algorithm


Linear Regression
 Linear regression is used for stock or financial market prediction to forecast the future
price of stock regression and uses a model based on one or more attributes, such as closed
price, open price, volume, etc., to forecast the stock price. Regression modeling aims to
simulate the linear relationship between the dependent and independent variables. The
linear regression model produces a best-fit line that describes the connection between the
independent factors and the dependent variable.

Support Vector Machine (SVM)


 Stock market prediction using an SVM can be the most useful technique for predicting
stock price, as it can be used as a classification and regression algorithm. The comparison
of SVM and its variants, such as “Peeling + SVM” and “CC + SVM”, shows that its
prediction can be improved by advanced SVM methods (Grigoryan 2017). A support
vector machine involves supervised learning used to categorize aspects using a separator.
The separator is then discovered when the data are initially mapped to a high-dimensional
feature space.

Long Short-Term Memory (LSTM)


 LSTM is an advanced model of Recurrent Neural Networks (RNNs), a deep learning
algorithm. An LSTM model can handle lengthy sequences of data units as it can remember
the data sequence, which can be used for future inputs. Figure 2 shows a general LSTM
cell structure. It comprises three gates—the input gate, the forget gate, and the output gate.
All of the gates employ the sigmoid activation function. All of the gates used in the LSTM
are mathematically represented as per Equations (8)–(10).

General Machine Learning Pipeline


 Step 1: Load the data from a csv file or call the historical data with the help of an API.
(examples: Yahoo Finance, Quandl, IEXFinance, etc.).
 Step 2: Preprocess the historical data to remove any redundancies, null values, etc. and
feature selection should be conducted.
 Step 3: Before training the ML model, features such as open, close, adj close, volume, etc.,
can be selected along with secondary data.
 Step 4: Divide the preprocessed data into training and testing data, preferably, where
preferably 75% of the data should be used to train the model, while the remaining 25%
should be used to evaluate the model’s performance.
 Step 5: After splitting the data, use the training data to train the model; then, performance
evaluation can be carried out based on the model’s output using the testing data.
 Step 6: Once the model is constructed, the model’s respective evaluation parameters for
regression or classification can be used to evaluate the model. The evaluation parameters
are precision, recall, F1 Score, and accuracy. The mean absolute error, mean square error,
root mean squared error, R-squared, chi square, and mean absolute percent error (mean
absolute percentage error) can be used.
 Step 7: Fine-tune the hyperparameters to improve the evaluation parameters of the model.
Following hyperparameter tuning, the model should be evaluated to check for improved
prediction parameters, after which the prediction can be plotted.
Significance of Ensemble Modeling
 This section of the article is about the comparative analysis of the most significant methods
explored in Section 2 and Section 3. Based on the study, it is observed that most common
algorithms, such as SVR, MLPR, KNN, random forest, XG-Boost, and LSTM, are used by
various researchers in their research work. In this review article, we attempted to use these
algorithms for forecasting the stock price of two stocks, namely, Tainwala Chemicals and
Plastics (Mumbai, India) Lt. (TAINIWALCHM) and Agro Phos (Indore, India) Ltd.
(AGROPHOS), and proposed an ensemble algorithm based on “Random Forest + XG-
Boost + LSTM”. The idea behind including a comparison of the algorithms is to understand
the generic performance of the popular machine learning and deep learning algorithms
identified during the literature review.

Implications and Limitations of the Study


 This study focused on the application of machine learning and deep learning models in
stock forecasting. It can be noted that machine learning or deep learning models alone are
not sufficient. Ensemble techniques are capable of providing superior performance. But
merely developing a model is not enough, and emphasis should also be placed on
hyperparameter tuning. The performance of the model can be improved using
hyperparameters such as learning rates, regularization in cases of deep learning, the number
of hidden layers, max_depth, n_estimators, and learning rate. Choosing the proper settings
for these hyperparameters can considerably enhance the precision of stock forecasts.

Future Research Directions


 The presented review article is focused on the review of related and published articles on
stock price prediction, forecasting, and classification. The analysis of financial instruments
such as stocks and equities is a considerable challenge. It is said that the stock market
evolves over a period of time (Lim and Brooks 2011), and hence, the approaches
developed for handling specific problems will see low performance sooner or later even
though their performance is found to be appreciated initially. As the stock market evolves
under the influence of various factors such as geopolitical issues, equity trading, and
investment, the underlying challenges also change, and so do the methodologies for
addressing the new challenges (Sprenger and Welpe 2011; Shah et al. 2019)

CONCLUSIONS

 This paper focuses on comparing the performance of different market making strategies
for high frequency traders. We find one market making strategy which offering prices
based on the latest trading price, adjusting ask/bid spread according to market volatility,
as well as adopting a trend-follow strategy driven by order imbalance, helps to earn more
profits than others. In addition, simulation results show that trading speed plays an
important role in this strategy, especially when the number of HFTs increases.
 In this review, several conventional, machine learning, and deep learning techniques that
are employed in stock market forecasting are investigated. This review describes various
machine learning techniques, deep learning techniques, and time series forecasting
techniques. This article presents recent applications of machine learning and deep
learning models, and an ensemble model is also tested on the TAINIWALCHM and
AGROPHOS stock datasets. Despite the existence of several popular methods for stock
price forecasting, even today, there is no universal solution to accurately predict the stock
price or trend of the market. There is still a possibility that AI-based models can also fail
if they are not trained efficiently with fresh data. To conclude this article, we assert that
researchers should keep exploring new avenues to solve price action problems using
ensemble techniques.

_________________________________________________________________________

You might also like