ArticlePDF Available

A Prediction Model Using the Price Cyclicality Function Optimized for Algorithmic Trading in Financial Market

Authors:

Abstract and Figures

After the widespread release of electronic trading, automated trading systems have become a significant part of the business intelligence system of any modern financial investment company. An important part of the trades is made completely automatically today by computers using mathematical algorithms. The trading decisions are taken almost instantly by logical models and the orders are sent by low-latency automatic systems. This paper will present a real-time price prediction methodology designed especially for algorithmic trading. Based on the price cyclicality function, the methodology revealed will generate price cyclicality bands to predict the optimal levels for the entries and exits. In order to automate the trading decisions, the cyclicality bands will generate automated trading signals. We have found that the model can be used with good results to predict the changes in market behavior. Using these predictions, the model can automatically adapt the trading signals in real-time to maximize the trading results. The paper will reveal the methodology to optimize and implement this model in automated trading systems. After tests, it is proved that this methodology can be applied with good efficiency in different timeframes. Real trading results will be also displayed and analyzed in order to qualify the methodology and to compare it with other models. As a conclusion, it was found that the price prediction model using the price cyclicality function is a reliable trading methodology for algorithmic trading in the financial market.
Content may be subject to copyright.
AbstractAfter the widespread release of electronic trading,
automated trading systems have become a significant part of the
business intelligence system of any modern financial investment
company. An important part of the trades is made completely
automatically today by computers using mathematical algorithms.
The trading decisions are taken almost instantly by logical models
and the orders are sent by low-latency automatic systems. This paper
will present a real-time price prediction methodology designed
especially for algorithmic trading. Based on the price cyclicality
function, the methodology revealed will generate price cyclicality
bands to predict the optimal levels for the entries and exits. In order
to automate the trading decisions, the cyclicality bands will generate
automated trading signals. We have found that the model can be used
with good results to predict the changes in market behavior. Using
these predictions, the model can automatically adapt the trading
signals in real-time to maximize the trading results. The paper will
reveal the methodology to optimize and implement this model in
automated trading systems. After tests, it is proved that this
methodology can be applied with good efficiency in different
timeframes. Real trading results will be also displayed and analyzed
in order to qualify the methodology and to compare it with other
models. As a conclusion, it was found that the price prediction model
using the price cyclicality function is a reliable trading methodology
for algorithmic trading in the financial market.
KeywordsAlgorithmic trading, automated trading systems,
financial markets, high-frequency trading, price prediction.
I. INTRODUCTION
RADING and investing in financial markets is a common
activity today. An important number of market
participants are buying and selling every day in the free
markets. Private and public investors, different types of
companies and traders are continuously speculating the
markets in order to make a profit. The main objective is to
catch the price difference in time, to buy cheap and to sell
more expensive using different trading and investing
strategies.
“Nowadays, in the current challenging economic
environment, businesses have changed their models in order to
be more service oriented and serve a broader and global
audience.” [1] The trading and investment domain is one on
the top in this long list. “The increases in complexity of the
C. Păuna is with the Economic Informatics Doctoral School, Bucharest
University of Economic Studies, 11th Tache Ionescu str. 010352 Bucharest
Romania (phone: +407.4003.0000; e-mail: cristian.pauna@ie.ase.ro).
This paper was co-financed by the Bucharest University of Economic
Studies during the Ph.D. program and Algorithm Invest company
(https://algoinvest.biz).
phenomena that characterize a firm’s activity in general and of
financial aspects in particular, have led to an exponential
increase in the volume of data and information operated from
any field of financial activity.” [2] All of these issues involve
new aspects to organize the activity. All are competing to new
directions for the business environment in financial trading.
After the widespread release of electronic trading, “the role
of the automated trading software in the business intelligence
systems of any financial or investment company became
significant.” [3] An important part of the trades is set up
completely automatically today by computers using advanced
mathematical algorithms. The low-latency real-time
automated systems are used today to build and send trading
orders without any human intervention. Designing, testing and
developing automated software for trading decisions has
become a sustained activity nowadays and this is the field this
paper is addressed for. In this article, a computational model
will be revealed to predict the price evolution using the real-
time price series. Being exclusively a mathematical algorithm,
the methodology presented can be applied in any algorithmic
trading system to automate the trading decisions. In the first
part of the paper, the prediction model will be described and
explained. Computing a price prediction line is the core of the
model based on the price cyclicality function [4]. The
prediction model is presented in the form of two bands, one
for the stop loss and one for the take profit price levels. Some
clear trading strategies will be developed based on this model
together with the implementation steps into an automated
trading system.
In the second part of this paper, the main direction will be
revealed to integrate the developed model into an algorithmic
trading system. The general logical scheme for automated
trading software will be presented together with the steps to
compute the Price Cyclicality Function. The automated
trading signals are built based on the Price Prediction Line.
The article will also include code examples to compute these
functions. In order to present the reliability of the developed
model, in the last part, real trading results obtained with this
methodology will be included. A comparative study is also
presented in order to compare the developed trading model
with other known trading strategies. The study will permit to
highlight the advantages of the price prediction bands
methodology and its place in the algorithmic trading domain.
In the last chapter, different practical conclusions will be
presented. It was found that the methodology presented in this
paper can obtain good results to predict the changes in price
Cristian Păuna
A Prediction Model Using the Price Cyclicality
Function Optimized for Algorithmic Trading in
Financial Market
T
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
226International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
behavior. This article will conclude that the price prediction
model built with the price cyclicality bands is a reliable
method which can be applied for algorithmic trading in a wide
range of capital markets.
II.
THE PRICE PREDICTION MODEL
In order to answer the questions “when to buy?” and “when
to sell?” on financial markets to make profits, a mathematical
model will be developed in this chapter. Based only on the
price action, this model will permit to set up the buy and sell
orders by specialized software in order to automate the trading
process. The concepts used in this chapter are not new. The
Price Cyclicality (PCY) function was presented for the first
time in [4] and represents a function describing the cyclical
behavior of the price movement and the intervals when the
price is approaching to change its direction. The PCY function
can be used in order to set limit conditions to entry and to exit
the markets. The Price Prediction Line (PPL) was developed
and explained in [5]. It represents an accurate trend line that
describes and predicts the price evolution with good results.
What is new in this paper is assembling all of these tools into a
model building price bands that will give a clear indication for
the entry and exit points, a reliable mathematical that can be
adapted into automated software.
A. PCY Function
Being given a data price series of i intervals, the Price
Cyclicality Function (PCY) is defined by:

11 iiii PCYPCYPCY
with 0
0
PCY (1)
where
ii
ii
iminmax
max
with iii maMA
(2)
and
kk
Niik
imaMA ,
maxmax (3)
kk
Niik
imaMA ,
minmin (4)
in which MA and ma represent the moving averages [6] with
two different periods. In (3) and (4), the term N is the period
of the cyclicality function and represents the number of the
time intervals taken into account to build the PCY function; α
is a functional parameter that can be optimized for each
financial market in order to obtain the best results.
More details about how PCY function was created,
developed and optimized are presented in [4] together with the
influence of the functional parameter α. It is also presented a
study which reveals how the PCY function can be used in
order to build a trading and limit conditions for financial
markets. The PCY function can be applied in any timeframe
and is a part of the trading model developed later.
B. Price Prediction Line
The Price Prediction Line (PPL) is a trend line obtained
using a transformation function of the PCY function back into
the price space using the formula:
iiiii PPPPCYPPL min100/minmax
( 5 )
where i
Pmax and i
Pmin represent the maximum and
minimum price values in the current monotony interval of the
PCY function given by (1). The PCY function is limited in the
interval [0; 100]. Meanwhile, the PPL function is defined into
the price interval and predicts the price evolution with good
accuracy, as proved in [5]. For some financial markets with
high price volatility, the PPL function defined by (5) needs an
attenuation process in order to have a smooth evolution. For
this, any known methods can be applied as smoothing with
Spline line interpolations [7], polynomial or trigonometric
interpolations [8] or just a simple, exponential or weighted
moving averages [6] with a small period.
PCY and PPL functions for a daily price series of Frankfurt
Stock Exchange Deutscher Aktienindex DAX30 financial
market [9] are presented in Fig. 1. The functions can be used
in order to trade the markets. When PCY and PPL functions
are starting to increase, a buy condition is met because the
price will increase in the next time intervals. In [4] and [5] are
presented different types of trading signals developed with this
idea. As we can see in Fig. 1, the information about the entry
point in the market can be easily found. For long term or
investment trading systems, this point is a good trading
opportunity. Even so, the exit point is not so obvious, once the
market is bouncing up and down many times until the
direction changes. For high-frequency trading systems, with
small profit targets, to know the trend direction and the
starting point of the trend is not enough. For this kind of
algorithms, a take profit value and a stop loss level are
required in order to have a complete trading strategy. For this
purpose a methodology will be developed in the next sections,
using the Parabolic Stop and Reverse (PSAR) indicator
developed by Wilder [10].
C. Price Prediction Bands
In this section we will define the Price Prediction Bands
(PPB) using for ascending trend (current price higher than
PSAR):
ii PSARndStopLossBa (6)

iiii PSARPPLPPLOneTakeProfit
(7)

iiii PSARPPLPPLTwoTakeProfit
(8)
and for the descending part of the trend (current price lower
than PSAR) we have similarly:
ii PSARndStopLossBa (9)
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
227International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278

iiii
PPLPSARPPLOneTakeProfit (10)

iiii
PPLPSARPPLTwoTakeProfit
(11)
D. How to Use the PPB
As we can see in Fig. 2, once the price touched the PSAR
level above PPL, the new PASR level will be calculated under
the PPL and the current price. This is the moment when the
uptrend begins. There are many trading strategies using this
point as an entry point, but the PSAR methodology [10] is
limited when it is about the exit point. The usual exit point is
located when the price level is equal with PSAR when a new
downtrend is starting. This idea is not productive at all,
because many times the profit level is too low. It was found
that exit the trade will produce a higher profit when the price
level is equal with PPB, once the profit is taken near a local
maximum point.
The first take profit level predicted by the PPB is calculated
in direct relation with the distance between PPL and PSAR.
For each time interval the values for PPL and PSAR are
different, consequently, the level for the take profit band
(TPB) is different. Because the values of the PPL depend on
the price evolution and PSAR is updated in strong correlating
with the Average True Range (ATR) developed also by
Wilder in [11], the take profit level given by PPB is in direct
correlation with the price behavior and ATR evolution. The
price band formed with the PSAR values levels will be noted
here as SLB (stop-loss band). These values are used as stop-
loss level in our model.
As we can see in Fig. 2, the distance between TPB and SLB
is variable. We will call this distance as to be a safe trade
range (STR), because under SLB a stop loss is touched and for
values higher than TPB the price is too high for a new entry.
There are intervals where the STR distance is increasing. In
this case, we will say that we have a price expansion, these are
the cases associated with a strong trend when the price is
making new highs. If the STR is decreasing, we will say we
have a price contraction. If we have an uptrend, this is the case
when the trend is preparing to reverse or to slow down the
price motion. Starting from the analysis of STR we will
develop a trading strategy as it is presented in the next section.
As it can be seen in Fig. 2, sometimes the price goes higher
the TPB levels. For these cases, the second TPB is included
using (8) and (11). We will note the second TPB with TP2B.
In Fig. 2, the TP2B was plotted using the gold ratio (δ=1.618).
This band is used in case of powerful trends to know where to
close the trade with good profit, before the price turning point.
Fig. 1 PCY Function and PPL
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
228International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
Fig. 2 PPB defined with PPL and PSAR
In the majority of the financial market, after the price
touched the TPB or TP2B, a down movement is present before
the next up movement. This is the interval when a new entry
in the trade is possible in order to maximize the profit. Once
the PPL is increasing and the PCY function is increasing too,
the uptrend is still present and a new entry neat the PPL is a
good opportunity. The PCY values give us good information
about the proximity of the price turning point when the trend
is reversing. In addition, large values of the STR involve good
profit expectation meanwhile lower values for the STR can be
a good indication to stay away from the market risk.
The PPB can be used for manual trading on daily timeframe
or 4 hours (4H) timeframe. The information included in the
PPB is good enough for short and medium time trades. Better
results are expected using algorithmic trading and even high-
frequency trading as we will see in the next section. An
automated algorithm will use the PPB values in order to build
automated trading signals. For high-frequency trading small
profit target range will be used, the TPB and TP2B being used
in order to limit the entry into a new position. For these cases,
SLB is also used as a stop-loss level.
The PPB can be also used in order to find some cases when
the price is oversold. Sometimes the price exceeds TPB and
TP2B into downtrends with the STR is in contraction. In these
cases, the price can be considered oversold and a buy trade
can be a good opportunity until the price is bouncing again in
the STR area. A case like this is plotted in Fig. 3. The oversold
cases found with PPB will be a subject for additional trading
signals included in the next section.
E. Trading Signals Based on the PPB
To automate the trading decisions we have to include the
significance of the PPB levels into some Boolean variables
called trading signals. These will be the core of the automated
trading software presented in the next chapter. The first type
of trading signal based on PPB is related to the point when the
uptrend is starting. These signals for each time interval are
given by:

 

iii
ii
iiiii
PCYPCYPCY
TPBAskSLBAsk
SLBPPLPPLPPLBuy
1
1
( 1 2 )
where Ask is the current ask price for the equity traded, θ is the
minimal take profit level and ρ is the maximum PCY value as
protection for the trend reversal. The functional parameters θ
and ρ can be optimized for each financial market traded in
order to maximize the profit. These trading signals can be used
with good results for daily and four hours timeframes.
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
229International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
Fig. 3 Oversold price area detected with PPB
For the rest part of the uptrend, on the expansion periods of
the STR, the trading signals can be given by:

 

iii
ii
iiii
PCYPCYPCY
TPBAskSLBAsk
SLBPPLExpansionBuy
1
(13)
where
11
iiiii
SLBTPBSLBTPBExpansion
(14)
defines the price expansion intervals, where STR is increasing.
These types of signals are used with good results for daily and
four hours timeframes.
The signal given by (13) gives us good results for the price
expansion intervals as we will see in the last chapter. In the
rest of the intervals, when we have not an expansion for the
STR, there are also good cases for trading opportunities. We
have found that cases are filtered by an additional condition
imposed for the TPB. When the TPB is increasing, even STR
is decreasing, good trading opportunities can be found. All of
these are given by the trading signals assembled with the
formula:

 

iii
ii
iiiii
PCYPCYPCY
TPBAskSLBAsk
SLBPPLTPBTPBBuy
1
1
( 15)
It was found that the trading signals given by (15) give us
good trading results for the daily and four hours timeframes.
To automate the cases for the oversold price intervals detected
with PPB, the trading signals can be given by:
 

ii
iiii
PCYTPBAsk
TPBPPLExpansionBuy !
(16)
where μ is a minimal value for the PCY function for which
long trade is accepted in the oversold area. This functional
parameter can be optimized for each financial market in order
to improve the results. These signals give us good results for
four hours timeframe. For the daily timeframe, the trading
signals (16) need to be filtered with an additional condition in
order to set only that trades in presence of a strong trend. For
this purpose, a simple limit condition for the ATR values is
strong enough. In this section, we presented the buy side
signals developed with PPB. These are the most used trading
signals for the majority of the markets. For those markets
where sell trades can be considered, the sell trading signals
can be assembled similarly.
III. I
NFORMATICS FOR
A
UTOMATIC
T
RADING
The place of the automated trading software in the business
intelligence system of a modern investment company is well
defined in [3]. “An automated trading system is a software
which is receiving the real-time and historical price data of an
equity, generates the signals for buying and selling of the
equity based on well-determined algorithms, sets the volume
of trading based on the capital liquidity and the capital a
defined risk level, builds the trading orders and send them to
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
230International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
the brokerage account without any human intervention” [3]. A
logical scheme for automated trading software is presented in
Fig. 4.
There are three data inputs for automated trading software.
First is the low-latency real-time price data from the stock
exchange. The second is the historical price data coming from
a data warehouse. These two data fluxes are managed by two
modules for real-time and historical data-mining processes. A
low latency data management module will assure the speed for
the data processing. The price data series are stored in memory
and set up to be ready for the mathematical model.
The trading algorithms use low-latency price data and build
trading signals. The third data flux includes real-time capital
and liquidity data from the brokerage account. These data are
the core of the risk management module. In this module,
depending on the liquidity and the risk level established, the
volume for the trading orders is set up. A reliable capital and
risk management method is presented in [11]. With the signals
and trading volume, the orders can be assembled and
automatically sent to the brokerage account.
In this paper, details about the integration of the trading
model developed will be presented. All technical aspects
regarding data acquisition are already solved. There are many
trading platforms available that integrate all of these features.
One of them is Meta Trader 4 [12] which permits algorithmic
trading using a Meta Quotes programming language [13]. This
language will be used in the next sections in order to
exemplify the codes for different procedures.
A. Integration of PCY Function
The PCY function is the core of the presented trading
model. The formulas presented in Section II A must be
computed with low time consumption for a prompt response,
to permit assemblage and sending the trading orders as fast as
possible. In Fig. 5 is presented a code sample to compute the
PCY function in real time.
Fig. 4 Data logical scheme of automated trading system
Fig. 5 Code sample to compute the PCY Function [4]
B. Integration of PPL
Once the PCY functions values are computed, the PPL
values can be given by a procedure like in Fig. 6.
With PCY and PPL values ready, the trading signal
variables can be easily computed. When the signal is
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
231International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
confirmed, a trading order is assembled and sent instantly by
the trading platform to the broker.
Fig. 6 Code sample to compute the PPL
Fig. 7 Capital evolution due to the trades made by PPB signals
IV. T
RADING
R
ESULTS
In this chapter are displayed results obtained with all
trading signal types presented above.
A. Trading Results Using PPB Methodology
The results presented below were obtained using
TheDaxTrader [14], an automated trading system that uses the
PPB trading signals in order to generate buy side trades for
DAX30 [9].
The results presented in Table I were obtained with a high-
frequency trading algorithm applied for DAX30 the period
01.06.2015 – 30.09.2018 using a fixed target of 10 points for
each trade. The DAX30 index market was traded as a contract
for difference (CFD) with a spread of 1 point. The exposed
capital involved and the risk management for the high-
frequency trading procedures was made using the “Global Slot
Loss Method” presented in [11].
The PPB trading signals were built for daily and four hours
timeframe interval. An additional condition was imposed
regarding the hourly intervals of the executed trades between
8:00 and 20:00 coordinated universal time (UTC) in order to
ensure the liquidity on the market. In Table I are presented the
trading results obtained for the PCY limit ρ = 99.95, for the
minimal take profit distance θ=10 and for α=0.33, the
functional parameter of the PCY function. For the signals
given by (16) the value μ = 1 was used for the maximal level
of the PCY into the oversold intervals. The moving averages
used to build the PCY function were computed for 20 and 50-
time intervals. The signals were computed by the trading
software one time per minute.
All trading signals assembled with the PPB values generate
a significant number of trades and good values for the risk and
reward ratio (RRR). For the signals (12), (13) and (15) traded
together; the RRR obtained is 1:8.22, a very good value
compared with other signals as we will see in the next section.
The lowest capital exposure is obtained for these signals made
in direction of the main trend. For all PPB signals traded
together, the RRR is 1:6.53, also a good value.
TABLE
I
T
RADING
R
ESULTS
O
BTAINED WITH
PPB
S
IGNALS
Trading signals and
timeframe
Number of
trades Profit Draw-
down RRR
(12) 4 Hours 53 7,410 5,350 1:1.39
(12) Daily 117 16,224 5,353 1:3.03
(13) 4 Hours 72 10,292 5,123 1:2.01
(13) Daily 119 16,069 5,688 1:2.83
(15) 4 Hours 136 19,570 5,131 1:3.81
(15) Daily 180 25,701 5,687 1:4.52
All above together 330 46,970 5,716 1:8.22
(16) 4 Hours 179 25,274 9,337 1:2.71
All signals together 430 60,969 9,337 1:6.53
The longest trade period for these signals obtained in the
study above was 218 hours. The Quality Trading Coefficient
(QTC) [16] obtained was between 0.52 and 0.87. All these
values indicate that PPB trading methodology is a reliable one.
Even the oversold PPB trading signals used a double capital
exposure, the returns from this type of trades is significant.
The capital evolution in the time interval for all signals
assembled together is presented in Fig. 7.
B. Comparative Trading Results
In order to have a clear image of the PPB trading
methodology, in this section will be presented comparative
trading results made in the same market conditions with
different and known trading methodologies. In order to
compare the same type of trading methodologies, we will
compare the results obtained with (12), (13) and (15) with
results made with other trading methodologies in the direction
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
232International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
of the main trend. To obtain the results in Tables II and III,
TheDaxTrader [14] automated trading system was used for
DAX30 Index [9] for the period 01.06.2015 – 30.09.2018
using a high-frequency trading methodology with a fixed
profit target of 10 points for all signals presented.
TABLE II
COMPARATIVE TRADING RESULTS
Trading signals and
timeframe
Number of
trades Profit Draw-
down RRR
Perfect Order [16] 107 20,107 8,712 1:2.31
Fischer Signals [17] 177 47,212 6,321 1:7.46
Turtle Signals [18] 162 24,160 3,693 1:6.54
PPB (12)+(13)+(16) 330 46,970 5,716 1:8.22
As we can see in Table II, the results made with PPB
trading methodology have the highest RRR value. The PPN
trading signals made almost double trades than other trading
strategies in the same trading conditions. These results are an
additional confirmation that the PPB trading methodology is a
reliable one. The results made with (16) will be compared with
other results made also with an oversold price trading
methodology in Table III.
TABLE III
COMPARATIVE TRADING RESULTS OBTAINED WITH PRICE OVERSOLD
METHODS
Trading signals and
timeframe
Number of
trades Profit Draw-
down RRR
RSI Oversold [19] 76 18,243 5,901 1:3.09
PPB (16) 179 25,274 9,337 1:2.71
As we can see, the PPB trading signals made a significant
number of trades with a comfortable RRR value. The PPB
results are perfect comparable with the RSI oversold trading
method presented in [19]. Both methods included in Table III
trade the cases when the rice is oversold but they rarely
intersect. Using both methods into a trading system will
generate additives profits with the same capital exposure.
V. CONCLUSIONS
The PPB presented in this paper can be used to develop a
reliable trading methodology. Based only on the price action,
the trading method presented here can be easily applied for
algorithmic trading and high-frequency trading in automated
trading systems.
The core of this trading model is the PCY function. It is a
mathematical transformation of the price into a subspace
defined in the [0; 100] interval. Based on the minimal and
maximal price values on a time interval, the PCY function has
an asymptotic behavior and can be used in order to impose
limit conditions in order to avoid initiating trades in the
interval when the main trend is preparing to reverse.
The PPL [5] was considered as the core for this trading
model. It is a reversed transformation of the PCY Function
into the price space. This trend line is considered as the main
price for the prediction bands. In order to find the main trend,
the method uses the PSAR [10] function which defines the
current SLB. To have a complete trading model, TPBs are
defined using (7), (8), (10) and (11). All of these together
define the PPB.
The methodology presented in this paper can be easily used
for manual trading and investment. The PPB levels can be
followed in order to set up the trades. The best results are
obtained with daily and four hours timeframes. This
methodology was tested with good results for the next
financial markets: Deutscher Aktienindex (DAX30), Dow
Jones Industrial Average (DJIA30), Financial Times London
Stock Exchange (FTSE100), Cotation Assistée en Continue
Paris (CAC40), Swiss Stock Exchange Market Index (SMI20),
Australian Securities Exchange Sydney Index (ASX200),
Tokyo stock Exchange Nikkei Index (Nikkei225),
NASDAQ100 Index, Standard & Poor’s Index (S&P500) and
Small Capitalization US Index (Russell2000). Also with good
and stable results, the PPB methodology presented in this
paper was applied for Gold and Bent Crude Oil financial
markets. For the currency markets, the method can be also
applied using additional conditions regarding the price
volatility level and the power of the trend. The cases when the
market is not in a major trend must be avoided.
Being exclusively a mathematical model based on the price
action, the PPB method can be adapted for algorithmic trading
and can be easily included in an automated trading system.
Sample codes about how the PCY Function, the PPL and the
PPB can be automated are also included in this paper. The
simplicity of this method and the reduced number of
functional parameters made this methodology to be one of the
easiest integrated ones into a trading system. All parameters
for the PCY function can be set up and used with the same
valued for all financial markets. The parameters for the trading
signals presented can be optimized for each financial market
but the values do not differ in time; once optimized for a long
period of time, they can be used with good results for the next
period.
Looking at the results presented in the last chapter, the
significant number of the trades set up by the presented
method and the good values for the risk and reward ratio
recommend the PPB as to be a reliable trading methodology.
As it was presented, the method shows when a new trend
begins. For these particular moments, trading signals can be
built with (12). The PPB also reveals the time intervals when
the price is in an expansion. For these cases when the STR is
increasing, good trading opportunities can be found using
(13). For the intervals when the price is contracting, sustained
trading signals are also built with (15). All of these signals
traded together obtained a risk to reward ratio value equal with
1:8.22 for the study case took as an example. This value is a
very good one for a single strategy computed with algorithmic
trading into an automated trading system.
As it was found in this paper, using the price level related to
the PPB values, good opportunities for oversold buy trades
can be found using (16). These additional trading signals offer
us a significant number of trades even if the risk and reward
ratio is higher. The profit made by these types of signals is a
significant one and the methodology is preferred by many
investors. The signals build with the PPB can be also included
in automated investment systems with very good efficiency.
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
233International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
Taking in consideration the results presented, the simplicity
of the method, all the advantages regarding the trend
detection, stop loss and take profit levels, detection of the
price expansion and contraction intervals, defining the STR in
different timeframe make the PPB be a reliable and sustained
trading methodology.
The reduced number of the functional parameters and the
simple integration into any trading software recommend the
method presented to be considered for any automated trading
and investment system.
The PPB trading methodology improves the spectrum of the
trading strategies and can also be considered as a data-mining
filter in addition to any other trading methodology in order to
improve the trading efficiency.
REFERENCES
[1] R.D. Zota, L. Ciovica, Designing software solutions using business
processes, 7th International Conference on Globalization and Higher
Education in Economics and Business Administration, GEBA 2013,
DOI: 10.1016/S2212-5671(15)00125-2
[2] V.D. Păvăloaia, Methodological Approaches to Computer Modeling
Possibilities in Financial Analysis, Scientific Annals of Economics and
Business, January 2012, ISSN: 2501-3165, DOI: 10.2478/v10316-012-
0026-5, Available at: https://www.researchgate.
net/publication/267202159
[3] C. Păuna, Automated Trading Software. Design and Integration in
Business Intelligence Systems. Bucharest, Romania: Database Systems
Journal, vol. IX/2018, ISSN: 2069-3230. Academy of Economic Studies.
Available at: http://dbjournal.ro/archive /29/29_3.pdf
[4] C. Păuna, I. Lungu, Price Cyclicality Model for Financial Markets.
Reliable Limit Conditions for Algorithmic Trading, Journal of Studies
and Researches of Economic Calculation and Economic Cybernetics,
4/2018, ISSN: 0585-7511. Academy of Economic Studies DOI:
10.24818/18423264/ 52.4.18.10 Available at: http://ecocyb.ase.ro
[5] C. Păuna, A Price Prediction Model for Algorithmic Trading, under final
review at Romanian Journal for Information Science and Technology,
ISSN: 1453-8245. Romanian Academy.
[6] Cox, D.R. Sir, Prediction by Exponentially Weighted Moving Averages
and Related Methods, 1961, Journal of the royal Statistical Society,
Series B, Vol. 23, No. 2, pp. 414-422.
[7] C. Reinsch, Smoothing by Spline functions, Numerische Mathematik,
Volume 10, Issue 3, ISSN 0945-3245, 1967, DOI https://doi.org/
10.1007/BF02162161. pp. 177-183.
[8] C. Berbente, S. Mitran, S. Zancu, Metode Numerice. Bucharest,
Romania: Editura Tehnica, 1997, ISBN 973-31-1135-X, pp. 15-20.
[9] Börse, Frankfurt, Frankfurt Stock Exchange Deutscher Aktienindex
DAX30 Components, 2018. Available on: http://www.boerse-
frankfurt.de/index/dax
[10] J.W. Wilder, Jr., New Concepts in Technical Trading Systems.
Greensboro, NC Trend Research, 1978. ISBN 978-0-89459-027-6.
[11] C. Păuna, Capital and risk management for automated trading systems,
Iași, Romania: Proceedings of the 17th International Conference on
Information in Economy, May 2018, Alexandru Ioan Cuza Academy.
Available at: https://pauna.biz/ideas
[12] Meta Trader 4, 2018. Available at: https://www.metatrader4.com
[13] Meta Quotes Language 4, 2018 Available at: https://www.
metatrader4.com/en/automated-trading/mql4-programming
[14] C. Păuna, TheDaxTrader. Automated trading system, 2010. Online
software presentation. Available at: https://pauna.biz/ thedaxtrader
[15] C. Păuna, The Quality Trading Coefficient. General Formula to Qualify
a Trade and a Trading Methodology, Bucharest, Romania: Economic
Informatics Journal, vol. 22, no.3/2018. ISSN: 1453-1305, Academy of
Economic Studies. DOI: 10.12948/issn14531305/ 22.3.2018.09.
Available at: http://revistaie. ase.ro/content/87/09%20-%20pauna.pdf
[16] K. Lien, Day Trading & Swing Trading the Currency Market
Technical and Fundamental strategies to Profit from Market Moves,
John Wiley & Sons, 2009, pp. 138-140
[17] C. Păuna, Reliable Signals Based on Fisher Transform for Algorithmic
Trading, Timișoara, Romania: Timisoara Journal of Economic and
Business, Volume 11, Issue 1/2018. ISSN: 2286-0991 DOI:
10.2478/tjeb-2018-0006 Available at: https://www.tjeb.ro
[18] C. Păuna, A Different Approach for the Turtle Strategy in Algorithmic
Trading, under final review for INEKA 2019 at University of Verona,
Italy. Available at: https://pauna.biz/ideas
[19] L. Connors, C. Alvarez, Short Term Trading Strategies That Work – A
Quantified Guide to Trading Stocks and ETFs, TradingMarkets
Publishing Group, 2009. pp. 53-74
World Academy of Science, Engineering and Technology
International Journal of Computer and Information Engineering
Vol:13, No:4, 2019
234International Scholarly and Scientific Research & Innovation 13(4) 2019 ISNI:0000000091950263
Open Science Index, Computer and Information Engineering Vol:13, No:4, 2019 waset.org/Publication/10010278
... A particular approach for risk management techniques that can be used in automated decision-making systems for capital investments can be found in (Vince, 1992). Mathematical models especially designed and optimized for algorithmic trading with proved and sustained results in real capital investments can be found in (Păuna & Lungu, 2018), (Păuna, 2018a), (Păuna, 2018b), (Păuna, 2018c), (Păuna, 2019a), (Păuna, 2019b), (Păuna, 2019c), (Păuna, 2019d), (Păuna, 2019e), (Păuna, 2019f), and (Păuna, 2020). ...
Conference Paper
Full-text available
Capital investment is a sustained activity nowadays. After the worldwide release of the electronic trading systems, automated decision-making investment software is the new trend in financial speculation. A significant part of capital trading is fully computerized today. The buying and selling orders are made and sent automatically, almost in real-time. The price evolution is analyzed by servers using advanced mathematical algorithms. This paper will present one of these models named Price Probability Predictor. It is a method to build a probability field based on the price history and the real-time price action. The revealed function will generate the current probability of a price growth in the next time intervals. Automated entry and exit signals and market limit conditions will be built using the new indicator, in order to automate the whole investment process. Capital investment results will also be included in the current paper to qualify the presented trading methodology and to compare it with other similar models. In conclusion, it was found that the Price Probability Predictor is a reliable mathematical algorithm that can assist any trading decisions, in both ways, manual or automatic capital investments.
Thesis
Full-text available
After several attempts to publish my Ph.D. thesis with different prestigious publishers, I have decided to make this work public and free of charge for anyone. Enjoy! Cristian Păuna
Conference Paper
Full-text available
Using automated capital investment software systems is a common task today. At the beginning of the third millennium, modern investors are using artificial intelligence resources and methods to find the best investment opportunities on capital markets and to process the trading orders. One of the most important aspects of this activity, besides the buying and selling decisions, is to stay away from the market risk in specific conditions. For this purpose, in the current doctoral research, the notion of limit conditions in capital markets was introduced by the authors. On the high price volatility markets, when the economic or geopolitical background is changing fast, real-time decisions for earlier investment closing, or filtering decision not to open new positions in specific market states, will contribute together to the risk reduction and will provide a higher capital efficiency a the long time run. In the real-time investment software systems, the limit conditions method's implementation presumes particular aspects in order not to introduce additional time delays for the trading orders. This paper will present the way how to include additional limit conditions procedures into automated algorithmic trading software systems. It was found that any investment strategy can be improved by using the limit conditions methods presented in this paper. Based on particular data-mining methods applied to real-time price series of any market, these methods can be automated and included in any capital investment informatics systems in order to improve the results and to reduce the allocated capital risk.
Article
Full-text available
Trading and investment on financial markets are common activities today. A very high number of investors, companies, public or private funds are buying and selling every day with a single purpose: the profit. The common questions for any market participant are: when to buy, when to sell and when is better to stay away from the market risk. In order to answer all these questions, many trading strategies are used to establish the best moments to entry or to exit the trades. Due to the large price volatility, a significant part of the trades is set up automatically today by computers using algorithmic trading procedures. For this particular field, special aspects must be met in order to automate the trading process. This paper presents one of these mathematical models used in automated trading systems, a method based on the Fisher transform. A general form of this method will be presented, the functional parameters and the way to optimize them in order to reduce the risk. It will be also suggested a method to build reliable trading signals with the Fisher function in order to be automated. Three different trading signal types will be explained together with the significance of the functional parameters in the price field. A code sample will be included in this paper to prove the simplicity of this method. Real results obtained with the Fisher trading signals will be also presented, compared and analyzed in order to show how this method can be implemented in algorithmic trading.
Article
Full-text available
Trading the financial markets is a common idea nowadays. Millions of market participants, individuals, companies or public funds are buying and selling different equities in order to obtain profit from the buy and sell price difference. Once the equity was established, the main question marks are when to buy, when to sell and how long to keep the opened positions. This paper will present a mathematical model for the cyclicality of the price evolution. The model can be applied for any equity in any financial market, using any timeframe. The method will gives us information about when is good to buy and when is better to sell. The price cyclicality model is also a method to establish when the price is approaching to change its behavior in order to build limit conditions to stay away the market and to minimize the risk. The fundamental news is already included in the price behavior. Being exclusively a mathematical model based on the price evolution, this method can be easily implemented in algorithmic trading. The paper will also reveal how the cyclicality model can be applied in automated trading systems and will present comparative results obtained in real-time trading environment.
Article
Full-text available
Trading the financial markets is a wide activity nowadays. There are several indicators to measure this activity. The drawdown, the profit factor and the trading efficiency are some of them. This paper will present a different one: the quality trading coefficient. The new formula will indicate several particular aspects originating from the human psychological emotions and fears during transactions on the way to make profit. If the trade was fast and the price moved continuous to the profit target level, the quality trading coefficient will have a positive value close to one. When most of the time the trading position was on loss and the profit was made on the last part of the trade time, the coefficient will have a positive value more close to zero. If the trade is closed on losses, the coefficient will have a negative value tends to minus one if the market goes against the direction of the trade on the entire interval. Measuring this coefficient for all trades made with a trading strategy we can compare and categorize the strategies for any market and for any time interval. The quality trading coefficient became a new optimization criterion for the trading strategies used in automated trading systems.
Article
Full-text available
After the introduction of the electronic execution systems in all main stock exchanges in the world, the role of the automated trading software in the business intelligence systems of any financial or investment company became significant. Designing of reliable trading software to build and send automated orders based on quantitative mathematical models applied in the historical and real-time price data is a challenge for nowadays. Algorithmic trading and high-frequency trading engines become today a relevant part of any trading system and their specific characteristics related with the fast execution trading process and capital management involves specific measures to be used. Smart integration of the trading software in the business intelligence systems is also a sensitive theme for any financial and investment activity, a plenty of functional, control and execution issues being subjects of researches for future improvements. This paper wants to gather together more particular aspects on this subject, based on the experience of last years, opening the way for future topics.
Article
Full-text available
In the present time, when companies’ businesses are growing more and more, the software developers may adapt to a change from the industry direction and must continuously analyze and optimize current solutions. By developing new strategies to automate services, the architects and developers contribute to more flexible and efficient solutions that provide support for business integration and agility. In this paper we are presenting the development of a software solution design with the use of business processes, in order to provide a better software solution.
Article
Full-text available
The current research intention' is to present some methodological approaches regarding the possibilities of computerizing the field of financial analysis. Therefore, at first, the characteristics, necessity and objectives of the financial analysis are clearly presented. Secondly, the classical models of application development are compared within a table, pointing out the advantaged versus the disadvantages of each model. Also, the agile models are included for the purpose of deciding which model is the best suited for the analyzed filed. Thirdly, the specific languages for enterprise modelling, namely UML language and ontology are presented and specific ideas are formulated. The article states, at the end, which methodology, model and modelling language is the best suited for computerizing the field of financial analysis and also presents a conceptual computer modelling for financial analysis.
Article
During the last years, spline functions have found widespread application, mainly for the purpose of interpolation []. However, there may be a demand to replace strict interpolation by some kind of smoothing. Usually, such a situation occurs if the values of the ordinates are given only approximately, for example if they stem from experimental data. In the case in which, for theoretical reasons, the form of the underlying function is known a priori, it is recommended that the latter be approximated by an appropriate trial function which is fitted to the data points by application of the usual least squares technique. Otherwise a spline function may be used. The following algorithm wilt furnish such a spline function, optimal in a sense specified below. Its application is mainly for curve plotting. 2. Formulation
A Price Prediction Model for Algorithmic Trading, under final review at Romanian Journal for Information Science and Technology
  • C Păuna
C. Păuna, A Price Prediction Model for Algorithmic Trading, under final review at Romanian Journal for Information Science and Technology, ISSN: 1453-8245. Romanian Academy.