Conference PaperPDF Available

SMOOTHED HEIKIN-ASHI ALGORITHMS OPTIMIZED FOR AUTOMATED TRADING SYSTEMS

Authors:
  • Algorithm Invest

Abstract and Figures

Heikin-Ashi is the Japanese term for "average bar". This methodology is well known as one of the methods to identify and follow the trends using a price time series in financial markets. Nowadays, in the first decades of the 21st century, in the electronic trading environment, with very volatile price market conditions, using the Heikin-Ashi method gets new and special connotations especially when it is about the high-frequency trading. It was found that combining the classical Heikin-Ashi candlesticks with modern limit conditions reliable trading algorithms can be generated in order to produce a good trading return with automated trading systems. This paper will present several trading algorithms based on Heikin-Ashi method for algorithmic trading especially adapted for high-frequency trading systems. It will be revealed how the trading signals can be automatically built and used in order to automate the trading decisions and orders. Exit signals will also be discussed. Trading results obtained with the presented algorithms for Frankfurt Stock Exchange Deutscher Aktienindex Market will be displayed in order to qualify the methods and to compare them with any other trading strategies for high-frequency trading. As conclusions, Heikin-Ashi combined with special limit conditions can generate reliable trading models for algorithmic trading.
Content may be subject to copyright.
SMOOTHED HEIKIN-ASHI ALGORITHMS
OPTIMIZED FOR AUTOMATED TRADING SYSTEMS
Cristian Păuna, PhD student
1
Abstract: Heikin-Ashi is the Japanese term for "average bar". This methodology is well
known as one of the methods to identify and follow the trends using a price time series in
financial markets. Nowadays, in the first decades of the 21st century, in the electronic trading
environment, with very volatile price market conditions, using the Heikin-Ashi method gets
new and special connotations especially when it is about the high-frequency trading. It was
found that combining the classical Heikin-Ashi candlesticks with modern limit conditions
reliable trading algorithms can be generated in order to produce a good trading return with
automated trading systems. This paper will present several trading algorithms based on
Heikin-Ashi method for algorithmic trading especially adapted for high-frequency trading
systems. It will be revealed how the trading signals can be automatically built and used in
order to automate the trading decisions and orders. Exit signals will also be discussed.
Trading results obtained with the presented algorithms for Frankfurt Stock Exchange
Deutscher Aktienindex Market will be displayed in order to qualify the methods and to
compare them with any other trading strategies for high-frequency trading. As conclusions,
Heikin-Ashi combined with special limit conditions can generate reliable trading models for
algorithmic trading.
Key words: algorithmic trading, automated trading systems, Heikin-Ashi
1. INTRODUCTION
In the first decades of the 21st Century “the development of e-businesses represents an
important factor in boosting the growth and prosperity” [1] of the human society. In the new
electronic trading environment of the financial markets, automated trading systems (ATS)
have become an important part in any modern financial investment company. “The
development of the information and communication technology leads to the creation of new
business models and decision support systems” [2].
“In electronic financial markets, algorithmic trading (AT) refers to the use of computer
programs to automate one or more stages of the trading process” [3]. The trading decisions
and orders are made partially or completely automatically nowadays by computers using
advanced mathematical algorithms. “High-frequency trading (HFT) is a type of algorithmic
trading characterized by high speeds, high turnover rates, and high order-to-trade ratios that
leverages high-frequency financial data and electronic trading tools” [4].
There is a considerable number of trading strategies and models in the literature, but not all of
them are adapted for algorithmic trading. Nowadays the algorithmic traders “represent 52% of
market order volume and 64% of nonmarketable limit order volume” [5]. Different analytical
trading models that can be automated for the financial markets are presented by Larry
Connors in [6] and [7] with proved reliable results. Using the genetic based algorithms,
interesting reserches are presented by Yong Hu [8] and José Manuel Berutich [9]. Hybrid
trading strategies are also developed in the last time, a hybrid system is presented by
1
Economic Informatics Doctoral School, Bucharest Academy of Economic Studies,
11th Tache Ionesc Str., Bucharest, Romania, cristian.pauna@ie.ase.ro
This paper was co-financed by the Bucharest Academy of Economic Studies during the PhD program
Youngmin Kim [10]. A significant number of the trading strategies that can be automated for
the stock exchanges are adapted from the currency market; some reliable strategies are
presented by Kathy Lien in [11] and [12]. Considering the current academic literature related
with the trading strategies adapted for algorithmic trading, the subject about how the Heikin-
Ashi transformation can be used to detect the trend and to automate the trading signals is not
treated. This is the purposed filled by the current paper.
This paper will present some algorithms optimized especially for HFT. The models presented
here are based on the Heikin-Ashi (HA) methodology. HA is the Japanese term (平均足) for
the "average bar" and represents a transformation of the price time series into a new series
with the purpose to filter the noise and to obtain a graphic representation for the price trend.
The HA model is well known as a good method to identify and follow the trend in financial
markets. This paper will present how the HA methodology can be combined with modern
limit conditions (LC) in order to improve the trading efficiency and to automate the trading
decisions for inclusion in ATS.
It will be revealed the way how the trading signals based on HA can be automatically built
and used in order to automate the trading activity. Exit signals will also be discussed and built
using the same technique in order to automate the exit procedures. To qualify the presented
methods and to compare them with any other trading strategies for HFT, trading results will
be presented in the last part of the paper. These results were obtained with a HFT of the
Frankfurt Stock Exchange Deutscher Aktienindex DAX30 Market [13]. The results will
qualify the signals obtained with HA as to be reliable trading signals for AT that can be
included and optimized for any ATS.
2. HEIKEN-ASHI TECHNIQUE
It is well known that a price time series in financial market is given by the four values Open,
High, Low and Close price levels for each time interval. The time interval can vary between
one second until one month or even one year. Having the values above, noted here with Oi,
Hi, Li respectively Ci for each i interval, the time price series can be easily recorded and used
further. For an easy view, the four price levels characteristic for each time periods are drawn
as candle sticks presented in Figure 1.
Figure 1: Bullish and bearish price time series candlesticks (source: [14])
Candlestick charts are thought to have been used and developed “in the 18th century by
Munehisa Homma (1724-1803), a Japanese rice trader” [15]. The colors used for the
candlesticks are at the user disposal. The bullish and bearish differences are usually
highlighted using different colors. In the figure 2. it is represented a time price series of the
DAX30 index on daily timeframe using the candlesticks representation.
Figure 2: Time price series with candlesticks
The price trend is not obvious in the figure 2. Even the colors are different for bullish and
bearish candles the price tendency is not defined by this graph. The Heikin-Ashi technique
will highlight the bullish and bearish tendency of the graph. Reducing the noise and the
volatility a more accurate image will be obtained. A new price transformation will be made.
For each i time interval, the open level in the new space will be the average level between
open and close price of the last interval, the close level will be the average between the forth
price levels of the current interval and the low and high will be given by the minimum
respectively maximum of the price levels by:
 
 
4/
),,max(
),,min(
2/
11
iiiii
iiii
iiii
iii
CLHOCha
COHHha
COLLha
COOha
(1)
This transformation will gives us a clearer image for the tendency of the price movement.
Using one color for the intervals with Ohai<Chai (usually green or blue) and other color for
the cases with Ohai>Chai (usual red) we will obtain a graphs like in figure 3.
Figure 3: Time price series with Heikin-Ashi candlesticks
The price time series in the Figure 3. is the same as in the Figure 2. In the figure 3. the
transform made by formula (1) is drawn.
3. SMOOTHED HEIKEN-ASHI
Even the image is clearer using HA candlesticks, trading in volatile price movements is still
difficult. As we can see in figure 3, between the two bullish intervals there are some red HA
candlesticks. The graph suggests the long trend is almost finished but a strong continuation
contradicts this conclusion after a small interval. To filter the false signals and to give a more
stable graph, remaining in strong correlation with the price behavior, a different smoothed HA
transform is proposed:
 
 
4/
),,max(
),,min(
2/
11
i
ii
ii
ii
i
i
ii
i
i
iii
CLHOCha
COHHha
COLLha
COOha
(2)
where
i
O
,
i
H
,
i
L
and
i
C
represent the averages values for the open, high, low respectively
close price levels for a specified M number of time intervals. Good results are obtained using
exponential moving averages [16]. The smoothed HA technique obtained with formulas (2)
using exponential averaged of the price levels for M=6 time periods is presented in figure 4.
Figure 4: Time price series with smoothed Heikin-Ashi technique
Comparing the figure 3. and figure 4. it can be noticed that the indication given by the
candlesticks colors is clearer, a long trade being possible for the entire bullish period included
in the figure 4. In practice it is observed that using small period intervals for the moving
averages is proper to identify the secondary trends.
For the main trend higher values for the period of the smoothing moving averages must be
used. In the figure 5. is presented the same price time series with a modified smoothed HA
technique using M=40. It can be observed that the price trends are mode obvious. This
methodology is more adaptive to catch and follow the large trends. The graph forms the figure
5. was obtained using an exponential moving average for the smoothed HA. The timeframe
used in figure 3, figure 4. and figure 5. is the daily timeframe.
Figure 5: Time price series with smoothed Heikin-Ashi technique for longer intervals
Coding the smoothed HA technique in any multi query programming language is one usual
task. To exemplify, in the figure 6 it is presented a sample code for smoothed HA wrote in
Meta Quotes Language [17].
Figure 6: Meta Quotes code for smoothed HA
The problem that will be treated in the rest of the paper is how to use smoothed HA price
levels in order to build automated trading signals and how to include them into ATS.
4. TRADING SIGNALS
Once we have the methodology to obtain HA and smoothed HA candlesticks in order to
identify the price trends, in this chapter it will be presented the way to build automated trading
signals based on these techniques.
In order to automate the trading decisions and orders, the information regarding the price
evolution given by HA series must be transformed into a Boolean variable called trading
signal. When the BuySignal variable will have “true” value, a buy trade will be initiated by
the ATS. For those markets where sell trades can be considered, when the SellSignal variable
will have the “true” value, a short trade will be opened by the automated trading algorithm.
For this purpose, the price behavior must be included in these signal variables. The way to
build the trading signals based on smoothed HA technique is:
 
 
iiii
i
iiii
iHhaLhaOhaChaSellSignal
LhaHhaOhaChaBuySignal
(3)
Using smoothed HA technique exit signals can be also considered when the HA changes the
color of the candlesticks:
ii
ii BuySignalSellExit
SellSignalBuyExit
(4)
The exit signals given by formula (4) can be optimized finding the best value for the M
number of time intervals used in the smoothed HA series. The relations (4) are used for AT,
especially when trades are kept longer to catch longer trends.
The formula (4) is not proper for HFT where the profit target is very small. For HFT
additional conditions must to be imposed in order to avoid opening trades in the overbought
and oversold intervals. These conditions will be presented in the next chapter.
Looking to the figure 5. it can be seen a direct relation between the price tendency and the
distance between the Open and the Close of the smoothed HA price levels. When the distance
between Ohai and Chai is increasing, the price has a strong movement tendency, when the
distance between the open and close of the HA smoothed levels is decreasing, the price is
slowing down and it is approaching to change its behavior or trend. This considerations will
generate the second type of trading signals based on HA technique. A buy signal can be
considered when the open of the smoothed HA is lower than the close and the distance
between the two levels is increasing. The sell signal can be made in the same idea for those
periods with close less than open of the smoothed HA:
 
 
 
 
11
11
iiii
ii
i
iiii
ii
i
ChaOhaChaOha
OhaChaSellSignal OhaChaOhaCha
OhaChaBuySignal
(5)
The relations (5) will generate trades only on the intervals when the price makes significant
movements in the direction of the trend. All the rest intervals will be ignored or used in order
to close the already opened trades. Decreasing the distance between the open and close of the
smoothed HA can be also a good exit signal:
 
 
 
 
11
11
iiii
ii
i
iiii
ii
i
ChaOhaChaOha
OhaChaSellExit OhaChaOhaCha
OhaChaBuyExit
(6)
The signals (3), (4), (5) and (6) can be applied for different timeframes. These signals can be
used for both AT and HFT. For HFT the profit target is small. A significant larger number of
trades will be made for HFT. For this case additional conditions must to be imposed in order
to avoid opening trades on overbought and oversold intervals.
5. LIMIT CONDITIONS
Good results were obtained combining the trading signals presented in the last chapter with
limit conditions imposed in the “Price Cyclicality function” [18] values. Noting with PCYi
the value of the price cyclicality function, the limit conditions for the long signals can be
automated using the next formulas:
 
 
 
ii
iiii
ii
i
PCYPCY
OhaChaOhaCha
OhaChaBuySignal
11
(7)
where ρ and ξ are two functional parameters that will be optimized for each traded market.
The computational way to build the PCY function can be found in the author paper [10]. The
parameter ρ assure that the trading signal is not initiated too earlier while the parameter ξ will
filter the trades in order not to be opened in overbought intervals. The sell signals using the
limit conditions with the PCY function can be built similarly.
It was found that the trading signals (7) can open trades even the price trend is not strong
enough. In order to filter these cases, a limit condition can be imposed for the gradient of the
PCY function. Especially for HFT this filter will ensure good and positive profit expectancy.
New trades will be opened by (7) only if the gradient of the PCY function will be higher a
specified δ value:
 
 
 
 
1
11
ii
ii
iiii
ii
i
PCYPCY
PCYPCY
OhaChaOhaCha
OhaChaBuySignal
(8)
The measure of the functional parameters ρ, ξ and δ will be found by an optimization process
using the time price series for a historical interval. Using an iterative process, the optimal
values for each functional parameter will be found checking the trading signals for each time
interval in the historical price series. Trading results obtained with (8) will be presented in the
next chapter.
6. TRADING RESULTS
In this section we will present trading results obtained with the signals detailed above. These
results were obtained using TheDaxTrader [19], an automated trading system that uses
smoothed HA trading signals in order to generate buy trades for DAX30.
The results presented in table 1. were obtained for HFT of contract for difference (CFD) of
DAX30 the period 01.06.2015 30.06.2018 with a spread of 1 point using a fixed target of 10
points for each trade. The risk and exposed capital management were made using the “Global
Stop Loss Method” presented in the author paper [20].
The smoothed HA trading signals (8) were built for a four hours timeframe interval. An
additional condition was imposed regarding the hourly intervals of the executed trades
between 8:00 and 16:00 coordinated universal time (UTC) in order to ensure the liquidity on
the market.
Trading signals (8)
results
Start trading
01.06.2015
Stop trading
30.06.2018
CFD spread
1
Profit target
10
Number of trades
78
Total profit
23,257
Maximal drawdown
5,442
Absolute drawdown
2,204
Maximal RRR
1:4.27
Absolute RRR
1:10.55
Table. 1. Trading results obtained with smoothed HA trading signals
The results presented were obtained with the next functional parameters included in the
formula (8): M=40, ρ=5, ξ=95 and δ=8. The capital evolution due to the smoothed HA signals
is presented in figure 7. In the case presented no losing trade were recorded.
Figure 7: Capital evolution due to HA trading signals
The trading results above were obtained considering only one trade opened in a moment of
time. If a trade is opened and a new trading signal appears, no additional trade will be
considered until the initial trade is closed. The maximal time interval of the longest trade was
111 hours.
In order to reveal the advantages of the Smoothed Heikin-ashi methodology we present a
comparison with other known trading methods. The results presented in table 2. were
obtained using algorithmic trading in the same period of time (01.06.2015 30.06.2018), on
the same financial market (DAX30) with the same ten points target.
Trading signals
Number
of trades
Profit
Drawdown
Risk to
reward ratio
Smoothed Heikin-Ashi signals
78
23.257
5,442
1:4.27
Moving averages perfect order signals
96
18,045
8,712
1:2.07
Parabolic stop and reverse signals
102
18,816
6,011
1:3,47
Relative Strength Index signals
68
16,372
5,901
1:2.77
Table 2. Comparison between trigonometric interpolation and other known trading methodologies
The known trading methods used were the “Moving averages perfect order methodology”
[11], “Parabolic stop and reverse methodology” [21] and “Relative strength index
methodology” [6]. Each method was optimized to obtain the best trading efficiency for the
financial market used. In table 2 it can be seen that the SHA methodology makes a significant
larger number of trades with a very good value for the risk and reward ratio (RRR). These
results are an additional confirmation that the method is a reliable trading methodology for
algorithmic trading.
The author uses the HSA trading signals presented in this paper since 2013 year. This
methodology was included in TheDaxTrader automated trading software. With a proper
optimization parameters set, the HSA trading signals generate only profitable trades in the
stock markets. This methodology was tested, implemented and used with the same good
results for a representative number of 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 trigonometric interpolation methodology presented in this paper was applied for
Gold and Bent Crude Oil financial markets starting with 2015 year.
6. CONCLUSIONS
The Heikin-Ashi trading technique can be improved using smoothed methods with different
types of moving averages. The smoothed Heikin-Ashi model can be adapted for algorithmic
trading and high-frequency trading in the electronic trading today’s market conditions. The
presented model permits to identify the up and down trends for different timeframes in any
financial market. When an up trend is detected, a buy signal will be generated by the trading
software. Similarly, for those markets with profitable sell conditions, when a down trend is
detected, sell trades can be considered.
Automated trading signals can be built using the smoothed Heikin-Ashi time series. Both buy
and sell trading signals can be automated together with the exit signals using Boolean
variables. In order to avoid opening trades in the overbought and oversold price intervals,
additional limit conditions must to be imposed for the Smoothed Heikin-Ashi trading model.
Using the price cyclicality model these conditions can be included in the trading signals
variables in order to automate the trade decisions. In order to avoid opening trade in the
intervals when the price is not making significant movements additional limit conditions can
be imposed with the gradient of the price cyclicality function in order to consider only the
strong trends. With all these conditions, the smoothed Heikin-Ashi trading signals can
produce a significant number of trades with positive profit expectancy.
The presented trading methodology can be optimized based on the functional parameters in
order to be traded on different timeframe intervals and different markets. The functional
parameters included in the trading signals formulas will be optimized using repetitive
algorithms in order to maximize the profit and to reduce the exposure and capital risk. The
proper parameter set will be obtained for each traded market.
The presented trading signals can be named reliable, once a period of 36 months produced
trading results with 1:4.27 RRR and 1:10.55 absolute RRR. The optimization process of the
functional parameters for the trading signals presented can be made using a time price series
of the historical price for any market with good liquidity. These signals can be also optimized
for algorithmic trading with longer profit target for automated trading or automated
investment systems.
Looking at the compared results included in table 2. we can say that the signals obtained
using the smoothed Heikin-Ashi methodology are reliable trading signals. The values for the
RRR and the number of trades and profit obtained with the presented methodology are a good
confirmation for this assumption.
All trading and the exit conditions included in the presented methodology are based on the
Heikin-Ashi price transformation and can constitute a stand-alone trading model for
automated trading systems. Being exclusively a mathematical model, the methodology
presented in this paper can be applied with good results for algorithmic trading and high-
frequency trading. This model can also be used for manual trading.
REFERENCES
[1] Dănăiață, D., Margea, C., Hurbean, L., Artene, A.S. (2014) Electronic services for
business environment, Procedia - Social and Behavioral Sciences 124, Published by
Elsevier Ltd., pp. 351-360, ISSN: 1877-0428, doi: 10.1016/j.sbspro. 2014.02.496
[2] Ghilic-Micu, B., Mircea, M., Stoica, M. (2010) The Audit of Business Intelligence
Solutions, Informatica Economică vol. 14, no. 1/2010, pp. 66-77, ISSN 1453-1305
[3] Nuti, G., Mirghaemi, M., Traleaven, P., Yingsaeree, C. (2011) Algorithmic trading, IEEE
Journal, Volume 44, Issue 11, pp. 22
[4] Aldridge, I. (2013) High-Frequency Trading: A Practical Guide to Algorithmic Strategies
and Trading Systems, 2nd edition, Wiley, ISBN 1-118-34350-6
[5] Hendershott, T., Riordan, R. (2013) Algorithmic Trading and the Market for Liquidity,
Journal of Financial and Quantitative Analysis, 48(4), pp. 1001-1024.
DOI:10.1017/S0022109013000471
[6] Connors, L., Alvarez, C. (2009) Short Term Trading Strategies That Work. A Quantitative
Guide to Trading Stocks and ETFs, TradingMarkets Publishing Group, New Jersey, US,
ISBN: 978-0-0919239-0-1
[7] Connors L., Alvarez, C. (2009) High Probability ETF Trading 7 Professional Strategies
to Improve Your ETF Trading, Connors Research. ISBN: 978-0-615-29741-5
[8] Yong, H., Kang, L., Xiangzhou, Z., Lijun, S., Ngai, E.W.T., Mei, L. (2015) Application of
evolutionary computation for rule discovery in stock algorithmic trading: A literature
review, Applied Soft Computing, Applied Soft Computing, 36, 534-551. DOI:
https://doi.org/10.1016/j.asoc.2015.07.008
[9] Berutich, J.M., Francisco, L., Francisco, l., Quintana, D. (2016) Robust technical trading
strategies using GP for algorithmic portfolio selection, Expert Systems with Applications,
Volume 46 Issue C, March 2016 pp. 307-315, Pergamon Press, Inc. Tarrytown, NY, USA.
DOI: 10.1016/j.eswa.2015.10.040
[10] Youngmin, K., Wonbin, A., Kyong J.O., Enke, D. (2017) An intelligent hybrid trading
system for discovering trading rules for the futures market using rough sets and genetic
algorithms, Applied Soft Computing Archive, Volume 55 Issue C, June 2017, pp. 127-
140. Elsevier Science Publishers B. V. Amsterdam, The Netherlands, DOI:
10.1016/j.asoc.2017.02.006
[11] Lien. K. (2009) Day Trading & Swing Trading the Currency Market. Technical and
Fundamental Strategies to Profit from market Moves, John Wiley & Sons. ISBN: 978-0-
470-37736-9
[12] Lien, K. (2011) The Little Book of Currency Trading. How to make big Profits in the
World of Forex, John Wiley & Sons. ISBN:978-0-470-77035-1
[13] Börse, Frankfurt. (2018) Frankfurt Stock Exchange Deutsche Aktienindex DAX30
Components. Retrieved from http://www. boerse-frankfurt.de/index/dax
[14] Wikipedia encyclopaedia. (2018) Candle sticks chart presentation. Available at:
https://en. wikipedia.org/wiki/Candlestick_chart
[15] Morris, G.L. (2006) Candlestick Charting Explained: Timeless Techniques for
Trading Stocks and Futures, McGraw-Hill, ISBN 0-07-146154-X
[16] Cox, D.R.Sir. (1961) Prediction by Exponentially Weighted moving Averages and
Related Methods, Journal of the royal Statistical Society, Series B, Vol. 23, No. 2, pp.
414-422
[17] Meta Quotes. (2018) Online presentation Meta Quotes Language 4. Available at:
https://www. metatrader4.com/en/automated-trading/mql4-programming.
[18] Păuna, C., Lungu, I. (2018) Price Cyclicality Model for Financial Market. Reliable
Limit Conditions for Algorithmic Trading, Journal of Studies and Researches of Economic
Calculation and Economic Cybernetics, 4/2018, ISSN: 0585-7511
[19] Păuna, C. (2010) TheDaxTrader. Automated trading system. Online software
presentation. Available at: https://pauna.biz/thedaxtrader
[20] Păuna, C. (2018) Capital and Risk Management for Automated Trading Systems,
Proceedings of the 17th International Conference on Informatics in Economy, pp 183-188.
Available at: https://pauna.biz/Capital_and_ Risk_Management
[21] Wilder, W. Jr. (1978). New Concepts in Technical Trading Systems. Greensboro, NC:
Trend Research. ISBN 978-0894590276
... For the currency and commodity markets, reliable trading models that can be automated can be found in [8], [9], and [10]. Original investment models and methodologies especially optimized for automated capital investment software can be found in [11], [12], [13], [14], [15], and [16]. Essential psychological strategies that can be used for better adaptation to the context of actual markets can be found in [17], [18], and [19]. ...
... The exit conditions can be set considering a limit for the power of the trend. From this reason, we will call these conditions as to be limit conditions in order to exit the trades or to stay (13) where ψ is a functional parameter to be optimized for each traded market. The ψ parameter is the minimal power of the trend for which the transactions are kept still open. ...
... The results from table 1 were obtained for the period 01.07.2016 -30.06.2019 using a fixed target of 10 points for each trade. In addition, the exit conditions (13) were imposed in order to exit the trades and not to open new trades when these conditions are met. ...
Conference Paper
Full-text available
ABSTRACT Algorithmic capital investment procedures became the essential tools to make a profit in the volatile price markets of the 21st century. A large number of market participants, private traders, companies, or investment funds are buying and selling on thousands of markets every day to make a profit. After the 2010 year, algorithmic trading systems became a significant part of the capital investment environment. The price evolution is analyzed today in real-time by powerful computers. To buy cheap and to sell more expensive is a simple idea, but to put it on practice is not easy today in very volatile price markets. The orders are built and set almost instantly today by artificial intelligence software using special mathematical algorithms. These procedures automatically decide the best moments to buy and to sell on different financial markets depending on the price real-time movements. This paper will present a specific methodology to analyze the time price series of any capital market. The model will build reliable trading signals to enter and to exit the market to make a profit. The presented method uses trigonometric interpolation of the price evolution to build a significant trend line called here the Trigonometric Trend Line. It will be mathematically proved that this function is in a positive and direct correlation with the price evolution. The Trigonometric Trend Line will be used to build and automate capital investment signals. Besides, the introduced function will be used in order to qualify the actual price trend and to measure the trend power in order to decide if the price makes an important evolution or not. Limit conditions will be imposed in the financial market to avoid trading in non-significant price movement and to reduce the risk and capital exposure. Comparative trading results obtained with the presented methodology will be included in the last part of this paper to qualify the model. Each trading signal type presented in the paper was traded separately to have a qualitative image. Also, all capital trading signals built with the Trigonometric Trend Line were traded together in order to obtain a better risk to reward ratio. To classify the presented methodology, the presented results were compared with real trading profits obtained with the other three well-known capital investment strategies. With all of these, it was found that using the Trigonometric Trend Line reliable automated trading procedures can 7 th International Symposium "SOCIO-ECONOMIC ECOSYSTEMS " January 22-24, 2020 University of Alicante , Spain Please send to: abstract-submission@bslab-symposium.net be made and optimized for each financial market to obtain good results in the capital investment. Being exclusively a mathematical model, the Trigonometric Trend Line methodology presented in this paper can be applied with good results for any algorithmic trading and high-frequency trading software. The functional parameters can be optimized for each capital market and for each timeframe used in order to optimize the capital efficiency and to reduce the risk. The optimization methods will use the historical time price series in order to catch the price behavior and specificity of each market. The reduced number of parameters and the simplicity of the presented method recommend the Trigonometric Trend Line model to be used in any advanced algorithmic trading software.
... As we have resented in Fig. 7, evolution with a small grading of the PPL indicates a weakness of the price trend. A limit condition in the gradient of the PPL function is imposed to avoid opening trades in cases like these: (13) where ξ is the minimum gradient value for the PPL function to be considered strong enough in order to open a trade at a specified risk level. The ξ parameter can be considered in direct correlation with the power of the price trend. ...
... Working with signals made by (13) and (14) on volatile markets need sometimes additional conditions. In a volatile market, after a new trend was established and the PPL changes its color, entries can be made on points too far away the PPL or in the last part of the trend where the price is near the turning point. ...
... In this section are presented results obtained using the same PPL strategy applied in two time frames in the same time. The results in Table I were obtained applying (13) and (14) on one and four-hour time frames. When the buy trading signals were true for the both time frames, a new trade was opened with a ten points target. ...
Conference Paper
Full-text available
In the first decades of the 21st century, in the electronic trading environment, algorithmic capital investments became the primary tool to make a profit by speculations in financial markets. A significant number of traders, private or institutional investors are participating in the capital markets every day using automated algorithms. The autonomous trading software is today a considerable part in the business intelligence system of any modern financial activity. The trading decisions and orders are made automatically by computers using different mathematical models. This paper will present one of these models called Price Prediction Line. A mathematical algorithm will be revealed to build a reliable trend line, which is the base for limit conditions and automated investment signals, the core for a computerized investment system. The paper will guide how to apply these tools to generate entry and exit investment signals, limit conditions to build a mathematical filter for the investment opportunities, and the methodology to integrate all of these in automated investment software. The paper will also present trading results obtained for the leading German financial market index with the presented methods to analyze and to compare different automated investment algorithms. It was found that a specific mathematical algorithm can be optimized and integrated into an automated trading system with good and sustained results for the leading German Market. Investment results will be compared in order to qualify the presented model. In conclusion, a 1:6.12 risk was obtained to reward ratio applying the trigonometric method to the DAX Deutscher Aktienindex on 24 months investment. These results are superior to those obtained with other similar models as this paper reveal. The general idea sustained by this paper is that the Price Prediction Line model presented is a reliable capital investment methodology that can be successfully applied to build an automated investment system with excellent results.
... 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). ...
... Smoothed Heikin-Ashi price transform is analytically defined in (Păuna, 2018c): ...
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.
... Working with signals made by (13) and (14) on volatile markets need sometimes additional conditions. In a volatile market, after a new trend was established and the PPL changes its color, entries can be made on points too far away the PPL or in the last part of the trend where the price is near the turning point. ...
... In this section are presented results obtained using the same PPL strategy applied in two time frames in the same time. The results in Table I were obtained applying (13) and (14) on one and four-hour time frames. When the buy trading signals were true for the both time frames, a new trade was opened with a ten points target. ...
Article
Full-text available
In the first decades of the 21st century, in the electronic trading environment, algorithmic capital investments became the primary tool to make a profit by speculations in financial markets. A significant number of traders, private or institutional investors are participating in the capital markets every day using automated algorithms. The autonomous trading software is today a considerable part in the business intelligence system of any modern financial activity. The trading decisions and orders are made automatically by computers using different mathematical models. This paper will present one of these models called Price Prediction Line. A mathematical algorithm will be revealed to build a reliable trend line, which is the base for limit conditions and automated investment signals, the core for a computerized investment system. The paper will guide how to apply these tools to generate entry and exit investment signals, limit conditions to build a mathematical filter for the investment opportunities, and the methodology to integrate all of these in automated investment software. The paper will also present trading results obtained for the leading German financial market index with the presented methods to analyze and to compare different automated investment algorithms. It was found that a specific mathematical algorithm can be optimized and integrated into an automated trading system with good and sustained results for the leading German Market. Investment results will be compared in order to qualify the presented model. In conclusion, a 1:6.12 risk was obtained to reward ratio applying the trigonometric method to the DAX Deutscher Aktienindex on 24 months investment. These results are superior to those obtained with other similar models as this paper reveal. The general idea sustained by this paper is that the Price Prediction Line model presented is a reliable capital investment methodology that can be successfully applied to build an automated investment system with excellent results.
... The Heikin-Ashi price transformation was used by the Japanese even from the 18th century. More details about the Heikin-Ashi price transformation applied for algorithmic trading systems are presented in (Păuna, 2018). The Heikin-Ashi price transformation will be used in order to build the Silent Market Indicator presented in this paper. ...
Article
Full-text available
Investing in capital markets is a common task today. An impressive number of traders and investors, companies, private or public funds are buying and selling every day on the free markets. The current high price volatility in the financial markets gives everyone a tremendous number of speculative opportunities to make a profit. Sometimes the price makes no significant movement, however. The majority of the trades initiated in those periods will conclude to losses or will need a very long time to become profitable. To avoid these cases, a mathematical algorithm was developed in this paper: The Silent Market Indicator. This article will present the general principles and the mathematics behind the indicator and how it can be applied in financial trading to improve capital investment efficiency. It was found that the model generates a very reliable filter to avoid entry into the silent markets intervals, when the price action conducts to small amplitude price movements and when the profit expectation is lower. In order to reveal the efficiency of the Silent Market Indicator usage, some comparable trading results will be presented in the last part of this article together with the functional parameters optimized for several known capital markets. As a conclusion, it will be proved that the presented methodology is an excellent method to stay away from the market risk. In addition, being exclusively a mathematical model, it can be applied in any algorithmic trading system, combined with any other trading strategy in order to improve capital efficiency
... Advanced trading methodologies especially designed for algorithmic trading in the capital markets are presented in (Păuna, 2018a), (Păuna, 2018b) and (Păuna, 2018c). One of the best low-risk trading methods for the stock market is revealed in (Connors & Alvarez, 2009a) and uses the well known 2-period RSI indicator presented as "the trader's holy grail of indicators." ...
Conference Paper
Full-text available
Buy cheap and sell more expensive is one of the basic ideas of trading the capital markets for hundreds of years. To apply it in practice has become difficult nowadays due to the high price volatility. The uncertainty in the price movements often leads to high-risk allocation. One main question is when the price is low enough for a low-risk entry? Once established an entry point, the second question is how long to keep the open trades in order to optimize the investment efficiency? This article will answer these questions. A general trading algorithm based on the price cyclical behavior will be revealed. The mathematical model is developed using the Price Cyclicality Function combined with other computational techniques in order to establish low-risk intervals. The algorithm will use multiple entry points in order to catch the best price opportunities. A simple empirical exit algorithm will be optimized in order to maximize the profit for a certain capital exposure level. The presented model uses a low number of functional parameters which can be optimized with a reasonable computational effort for any financial market. Trading results obtained for several markets will also be included in this paper in order to reveal the efficiency of the presented methodology. It was found that the Low-Risk Trading Algorithm can be used with good results for algorithmic trading in any financial market. With the right parameters set, this methodology can be wide range applied in the stock markets, currency and cryptocurrency markets, commodities and raw materials markets and even for the real estate investments. The simplicity of the presented model and the good efficiency level obtained will recommend it. This methodology can be used by any investor in order to manage the investment plan with multiple capital markets.
Chapter
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 chapter 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.
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.
Conference Paper
Full-text available
The most important part in the design and implementation process of automated trading systems in any financial investment company is the capital and risk management solution. Starting from the principle that the trading system must run fully automated, the design process gets several particular aspects. The global stop loss is a special approach for the risk management strategy that will ensures a positive expectancy in algorithmic trading. A case study based on an already optimized trading algorithm will be used to reveal how important the risk level optimization is, in order to improve the efficiency of the trading software. The main optimal criteria are as usual the profit maximization together with the minimization of the allocated risk, but these two requirements are not enough in this case. This paper will reveal an additional optimization criterion and the main directions to build a reliable solution for an automated capital and risk management procedure. Keywords: automated trading software (ATS), business intelligence systems (BIS), capital and risk management (CRM), algorithmic trading (AT), high frequency trading (HFT). (Available at: https://pauna.biz/Capital_and_Risk_Management)
Article
Full-text available
According to the EU definition, e-government implies smaller but smarter back-office and bigger and better front-office. Enhanced, cost-effective and efficient delivery of information and services is the e-government substance, when it is perceived by citizens and organizations. There has been a significant demonstration effect of the productive difference that e-government has made in developed economies in the delivery of services, provision of information and internal efficiency of the public administration. In developing countries, including Romania, governance reform agendas have included e-government projects that aim to reduce corruption, increase transparency and quality of service. Still, lot of initiatives happen at the local level of administration – in Romania we witnessed a competition between counties in moving forward in e-government implementation.
Article
Full-text available
Although in this period humanity passes through a relative economic crisis, we all agree that our environment is that of a society of information and knowledge, based on communication and teleactivity, one that is also called information society. Every new form of activity in the information society has an associated informational component consisting in a software program, an application, a system, etc. It is a certainty that in the new economic environment it is necessary to adjust quickly to the opportunities of the market, through Business Process Reengineering, adoption of Business Intelligence solutions, implementation of complex automation applications like Enterprise Resource Planning. But, more than this, in, the digital economy the stress is put on the “label”, the “image”, the “brand”, and these features that are associated to organizations may be obtained by the information audit processes. The present study is focusing on the problem of information audit developed in one of the upper forms of manifestation of the information society in the field of changing the ways of doing business: Business Intelligence.
Article
Discovering intelligent technical trading rules from nonlinear and complex stock market data, and then developing decision support trading systems, is an important challenge. The objective of this study is to develop an intelligent hybrid trading system for discovering technical trading rules using rough set analysis and a genetic algorithm (GA). In order to obtain better trading decisions, a novel rule discovery mechanism using a GA approach is proposed for solving optimization problems (i.e., data discretization and reducts) of rough set analysis when discovering technical trading rules for the futures market. Experiments are designed to test the proposed model against comparable approaches (i.e., random, correlation, and GA approaches). In addition, these comprehensive experiments cover most of the current trading system topics, including the use of a sliding window method (with or without validation dataset), the number of trading rules, and the size of training period. To evaluate an intelligent hybrid trading system, experiments were carried out on the historical data of the Korea Composite Stock Price Index 200 (KOSPI 200) futures market. In particular, trading performance is analyzed according to the number of sets of decision rules and the size of the training period for discovering trading rules for the testing period. The results show that the proposed model significantly outperforms the benchmark model in terms of the average return and as a risk-adjusted measure.
Article
This paper presents a Robust Genetic Programming approach for discovering profitable trading rules which are used to manage a portfolio of stocks from the Spanish market. The investigated method is used to determine potential buy and sell conditions for stocks, aiming to yield robust solutions able to withstand extreme market conditions, while producing high returns at a minimal risk. One of the biggest challenges GP evolved solutions face is over-fitting. GP trading rules need to have similar performance when tested with new data in order to be deployed in a real situation. We explore a random sampling method (RSFGP) which instead of calculating the fitness over the whole dataset, calculates it on randomly selected segments. This method shows improved robustness and out-of-sample results compared to standard genetic programming (SGP) and a volatility adjusted fitness (VAFGP). Trading strategies (TS) are evolved using financial metrics like the volatility, CAPM alpha and beta, and the Sharpe ratio alongside other Technical Indicators (TI) to find the best investment strategy. These strategies are evaluated using 21 of the most liquid stocks of the Spanish market. The achieved results clearly outperform Buy&Hold, SGP and VAFGP. Additionally, the solutions obtained with the training data during the experiments clearly show during testing robustness to step market declines as seen during the European sovereign debt crisis experienced recently in Spain. In this paper the solutions learned were able to operate for prolonged periods, which demonstrated the validity and robustness of the rules learned, which are able to operate continuously and with minimal human intervention. To sum up, the developed method is able to evolve TSs suitable for all market conditions with promising results, which suggests great potential in the method generalization capabilities. The use of financial metrics alongside popular TI enables the system to increase the stock return while proving resilient through time. The RSFGP system is able to cope with different types of markets achieving a portfolio return of 31.81% for the testing period 2009-2013 in the Spanish market, having the IBEX35 index returned 2.67%.
Article
The mean square error of prediction is calculated for an exponentially weighted moving average (e.w.m.a.), when the series predicted is a Markov series, or a Markov series with superimposed error. The best choice of damping constant is given; the choice is not critical. There is a value of the Markov correlation ρ0 below which it is impossible to predict, with an e.w.m.a., the local variations of the series. The mean square error of an e.w.m.a. is compared with the minimum possible value, namely that for the best linear predictor (Wiener). A modified e.w.m.a. is constructed having a mean square error approaching that of the Wiener predictor. This modification will be of value if the Markov correlation parameter is negative, and possibly also when the Markov parameter is near ρ0.
High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems
  • I Aldridge
Aldridge, I. (2013) High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems, 2nd edition, Wiley, ISBN 1-118-34350-6