Content uploaded by Cristian Mihail Păuna
Author content
All content in this area was uploaded by Cristian Mihail Păuna on Aug 25, 2019
Content may be subject to copyright.
Database Systems Journal, vol. X/2019 25
Trading Fragmentation Methodology to Reduce
the Capital Exposure with Algorithmic Trading
Cristian PĂUNA
The Bucharest University of Economic Studies, Romania
cristian.pauna@ie.ase.ro
This paper presents a practical methodology to reduce the capital exposure by early exits
from the financial markets using algorithmic trading. The method called trading
fragmentation uses several automated trading software applied on more unrelated markets
and a particular risk management strategy to obtain a higher profit level with a lower risk.
An advanced capital management procedure is used to integrate all into an unitary risk
management system applied into a single trading account. It was found that the method
presented here is the proper way to avoid large loss trades and to reduce the time when the
capital is blocked into negative positions for the recovery process. In this way the efficiency of
the capital usage is improved and the profit is made faster with lower risk level. The method
was tested with real capital for more than five years and positive results were obtained.
Comparative trading numbers will be also included in this paper in order to reveal the
efficiency and the advantages obtained with the trading fragmentation methodology.
Keywords: algorithmic trading, capital exposure, risk management, trading fragmentation
Introduction
In the context of the electronic trading
release and implementation all over the
world in financial markets, algorithmic
trading has become a major research
interest theme nowadays. “With rapid
advances in technology, enterprises today
frequently search for new ways to
establish value positions” [1]. Integrating
the automated trading software in the
business intelligence systems of the
financial investment companies is a trend
and a necessity today.
Modern methodologies to automate the
trading decisions and the risk
management offer more and more
advanced solutions and advantages in
order to make profit. “Business
intelligence is the result of the natural
evolution in time of decision support
systems and expert systems, systems that
aimed at replacing humans in the decision
making process or, at least, at offering
solutions to the issues they are concerned
of” [2].
“The real-time data analysis for
prediction and risk management in the
electronic trading systems place the
automated trading systems to be the main
engine in the business intelligence system of
a financial or investment company” [3]. The
design and implementation of any
algorithmic trading strategy into an
automated software starts from the
principles of the manual trading activity.
There are two major question marks in the
trading activity: when to entry on the market
and how to exit from the opened trades in
order to obtain the desired profit with a
minimal risk level.
For the first question there are a higher
number of researches and studies testing and
developing trading strategies with positive
edge to locate the right moment to buy
equities on financial market. Using the
computers to process the price evolution in
time, with the right data mining process
applied for the time price series, the entry in
the markets are built as trading signals and
can be automatically executed by the trading
software. This will not be the subject of this
particular paper.
How to exit from the market in order to
reduce the capital exposure is a subject less
treated in the academic literature today. This
article will present a methodology in order
to exit from the markets. The new approach
called “trading fragmentation” will permit to
1
26 Trading Fragmentation Methodology to Reduce the Capital Exposure with Algorithmic Trading
decrease the capital exposure and to
obtain the desired profit faster and with a
lower effective capital risk. The paper
will present the basics for this
methodology that can be applied in any
financial markets for any entry used
strategy. One strong point is that this exit
method can be completed automated in
order to be integrated into an automated
trading system for any business
intelligence system applied for any
investor or company type.
2 Classical exit methods
In this chapter it will be presented on
short several classical known exit
strategies to close a trade and to exit from
the market. Once a trade was opened, the
usual exit method is to close that trade
when the profit is equal with a specified
value a priori established before to open
that trade. This is the most common exit
method used in algorithmic trading and
especially in high-frequency trading
systems. The fixed target level (FTL)
method sets the take profit level from the
beginning and wait the market to evolve
until the price reaches that price target.
The method is very simple and good to
test and optimize any trading strategy.
For a specified profit target level, all
functional parameters of the trading
strategy will be optimized in order to
maximize the profit level and to minimize
the capital exposure. It was found that the
third optimization criterion is “the
Longest Time Trade period” [4] (LTT).
“This factor makes the difference
between trading and investment” [4] and
is the main indicator to establish how
long the capital is blocked into the
recovery process of a trading strategy.
Other trading strategies use different exit
methods become classical because they
are used since years. As example it will
be mentioned here the “Fixed Time Exit
Strategy” (FTE) which “tells us to exit
when a certain amount of time has
passed” [5], “First Up Close Exit
Strategy” (FUC) meaning to exit after the
market “has its first up close versus the
previous day” [5], “New High Exit
Strategy” (NHE) is about to exit the position
on the market “after it closes above a new
high” [5], “Close above the Moving
Average” (AMA) method that indicate
simply to close the trade dynamically after
the market “has closed above its simple
moving average” [5] and “2-Period RSI
Exit” (2PR) which indicate to exit the trade
when the 2-Period RSI has a value higher
than a specified limit value (65% or 70%
according to the source [5]).
Other known exit method, applied especially
for those trades that were opened using a
trend indicator, is to close that trade when
the trend indicator used tells us that the trend
is no longer exists or the power of the trend
is decreasing. Methodologies to measure the
power of the trend are presented in [6] and
[7] and can generate good exit signals.
With all of these exit methodologies any
trading strategy can be optimized in order to
have the proper functional parameters set to
obtain the desired profit. It was found that,
using several automated trading software in
a single trading account, none of these exit
methods assure the optimal solution. Each
exit methods mentioned above can produce
a solution for any trading strategy but all of
them generate two types of trades. With a
proper optimization the most of the trades
can touch the exit criteria in a short period
of time. Because there is no perfect trading
method, each exit strategy will generate also
a small number of trades that will last a
longer period of time. In these cases, after
the trade was opened, the market reversed
and evolved against the direction of the open
trade. Even the trade will be closed on
profit, this process can last sometimes
hundreds or thousand of trading hours. This
is a case that must be avoided. In all this
time the capital is blocked in that particular
trade and cannot be used to make new
profits. These cases reduce drastically the
efficiency of the capital usage. The exit
strategy presented later in this paper will
solve the problem and will gives a method
for capital efficiency optimization.
Database Systems Journal, vol. X/2019 27
3 Diversification in financial trading
To trade on only one financial market is
not a proper solution. To optimize the
capital usage several markets must be
traded in the same time. This is called
diversification. It is recommended
“diversifying into a minimum of three
unrelated markets. At any point of time,
one market might be in a major uptrend
and one might be in a major downtrend,
with a third trendless. The odds of
catching major moves increase with the
number of markets traded. One caveat:
they should be unrelated markets” [8].
In the actual conditions of the high price
volatility, “the price variations per time
unit have become extremely fast and in
order to capture and optimally use the
price differences it is necessary a fast
calculation for the buy and sell decisions
and at the same time the transmission of
these orders as fast as possible to the
execution” [9]. To ensure the low-latency
condition, each market will be traded by
particular trading software using a
particular set of trading strategies with
particular optimization sets for the
functional parameters.
In this point is obviously that we deal
with “software on demand”. “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” [10].
With all of these the design direction for
the trading system is clear: we need to
trade several unrelated markets to ensure
the diversification with one special
software especially designed and
optimized for each of these markets to
ensure the low-latency condition.
When it is about the exit decisions, the
process to design, develop, test and
optimize the trading software includes one
of the classical exit strategies presented in
chapter 2 of this paper. Usually the FTL exit
methodology is a good and simple choice
for this step. With this, the trade profit will
be calculated using the natural formula:
where V is the traded volume, pt is the target
price and pe is the entry price. Once a trade
is opened, the V and pe are known. For each
Pt profit level wanted, the target price pt can
be calculated from the formula (1). Starting
from these considerations, the exit decision
can be automated using the exit signal for
each i trade using the Boolean variables:
where pi is the current price level and Pi is
the current profit for each trade. The trading
software will continuously compare the
current price level with the target level and
will close the trades when the exit condition
(2) is met. This is the classical FTL exit
condition transposed in the Boolean variable
in order to automate the exit decision. In the
formula (2) it was included a second form
for the exit decision variable to prepare the
next considerations.
Once the diversification and the low-latency
conditions were met in order to have a
reliable and optimal trading system, using
several automated trading software will not
assure the capital is well used. Even each
trading strategy is optimized longer trades
will be always present in the trading reports.
The practice shows us a drastically reduction
of the trading efficiency for those trading
strategies optimized to make very shorter
trades. A case study was presented in [9]. By
filtering the data mining processes to obtain
only very short trades, “an algorithm has
produced a profit of one hundred times
smaller than its counterpart that performs ten
times longer transactions” [9]. A new
method was searched in order to prevent
longer trades for the same profit level. This
will be presented in the next chapter.
28 Trading Fragmentation Methodology to Reduce the Capital Exposure with Algorithmic Trading
4 The trading fragmentation method
The trading fragmentation exit method
starts from the principle “run your profits,
cut your losses” [11], which is the most
important principle in the trading
psychology in the current paper author’s
opinion.
Before to define the method let's see how
the trading activity is evolving when we
use several trading systems in order to
trade on more unrelated markets. All
software will open one or more trades.
The most of these trades will ran in the
direction of the trends and will be close
on profit in a short period of time after
they were opened. Some of trades, fewer,
will be on negative amount. These are the
cases when the market changed the
direction and goes against the trading
methodology. Almost all trading
strategies generate losing trades. Some of
these trades will be closed on profit after
the market will reverse again and will
recover all that losses. Other part of these
trades will be close on loss, after a
significant number of trading hours,
when the loss became higher enough to
touch the stop loss used by each trading
software. All of this process will block a
part of the trading capital and will reduce
the trading efficiency.
The trading fragmentation principles
consist to close all opened trades once a
specified small profit level was achieved
into the trading account. Using a several
number of trading strategies on more
unrelated markets will generate a high
number of small profitable trades and a
low number of losing trades. Instead to
wait to recover all that negative trades,
once a specified profit level was achieved
into the trading account, all the negative
trades will be closed. In this way, the
capital blocked in those losing trades will
be released and will be involved by other
trading strategies into new trades in order
to make profit.
The profit level when all trades will be
closed is called profit fragment and usual
has a small value between 0.1% and 2%
of the traded capital. The exit condition with
the trading fragmentation method can be
also automated using the formula:
Pj is the profit value realized for all closed
trades using the formula (2), M is the total
number of the closed trades, Pj is the current
profit of the open trades, N is the total
number of opened trades and ξ is the profit
fragment.
With other words we do not start the trading
software and let them to open trades
continuously and follow exits only by
formula (2). Time to time, setting a profit
fragment ξ, we will close all opened trades
to avoid large period for loss accumulation.
This will methodology will reduce the
longest time trade for the entire trading
system and will improve the capital
efficiency usage involving the blocked
capital into new trades.
A very important observation is that the
trading fragmentation methodology works
only if the traded markets are unrelated. This
is because the loss trades closed at the
moment when the ξ profit level is achieved
are practically recovered by other positive
trades made by other trading software in the
same trading account. To be sure if two
markets are unrelated it can be calculated
the Galton-Paerson correlation coefficient
[12] between the two time price series. If
this coefficient is closed to zero, we will
have unrelated markets.
The trading fragmentation methodology can
be applied for correlated markets also, if the
trading strategies involved in each trading
system are different and use totally different
principles. What important is, is to have a
good coverage of positive trades to cancel
the losses of the wrong trades.
There is not a general prediction for the
valued of the profit fragment ξ. This is a
functional parameter that must be optimized
for each trading system.
Database Systems Journal, vol. X/2019 29
5 Comparative results
In order to reveal the efficiency of the
trading fragmentation methodology we
present the next trading results obtained
with the automated trading system
theServer [13]. The system traded 12
financial markets using 20 trading
software components which includes 60
different trading strategies optimized for
each market. Each strategy has its own
FTL level and all trades are individually
closed using the (2) exit formulas. The
risk management strategy used the
“Global Stop Loss” methodology
presented in [14] with a maximal capital
exposure level of 1% for each trading
software and with a 10% maximal capital
exposure for the whole trading system.
The results presented below were
obtained in a real time trading test
organized in three different accounts. In
one account the trading fragmentation
methodology was not enabled (Table 1).
In the second account the trading
fragmentation methodology was applied
with a profit fragment ξ=0.5% of the
trading capital (Table 2). In the third
account the trading fragmentation exit
methodology was applied with a profit
fragment ξ=1% of the trading capital
(Table 3).
All accounts were hosted by the same
brokerage company, they all had the
same leverages, commissions and
slippage taxes and all accounts had the
same trading capital amount on the
beginning. All the functional parameters
of the trading system were the same and
the latency of the price time series was
the same. The purpose of this test was
only to reveal the influence of the trading
fragmentation methodology. For this
reason, the only one parameter that was
different between the three trading
accounts used was the profit fragment
value. The test was intentionally closed at
a limited date, before touching the profit
target in one of the three accounts in
order to see the differences. Here are the
trading results obtained:
Table. 1. Trading results obtained without
trading fragmentation exit methodology
Start trading
01.01.2018
Stop trading
30.06.2018
Initial capital
50,000 euro
Profit target
50%
Profit fragment
not applied
Number of trades
634 trades
Total profit
16,423 euro
Longest trade
1,422 hours
Max. drawdown
4,842 euro
Abs. drawdown
2,104 euro
Maximal RRR
1:3.39
Absolute RRR
1:7.81
Table. 2. Trading results obtained with
trading fragmentation for ξ=0.5%
Start trading
01.01.2018
Stop trading
30.06.2018
Initial capital
50,000 euro
Profit target
50%
Profit fragment
ξ=0.5%
Number of trades
852 trades
Total profit
18,861 euro
Longest trade
147 hours
Max. drawdown
2,214 euro
Abs. drawdown
811 euro
Maximal RRR
1:8.51
Absolute RRR
1:23.25
Table. 3. Trading results obtained with
trading fragmentation for ξ=1.0%
Start trading
01.01.2018
Stop trading
30.06.2018
Initial capital
50,000 euro
Profit target
50%
Profit fragment
ξ=1.0%
Number of trades
784 trades
Total profit
19,283 euro
Longest trade
2097 hours
Max. drawdown
2,633 euro
Abs. drawdown
811 euro
Maximal RRR
1:7.32
Absolute RRR
1:23.77
The RRR is the risk to reward ratio. In the
tables above were highlighted with red the
negative part of the initial trading system
(without fragmentation) and with blue the
positive advantages obtained using the
trading fragmentation methodology.
30 Trading Fragmentation Methodology to Reduce the Capital Exposure with Algorithmic Trading
6 Conclusions
Looking at the Table 1, the negative
factor that should be corrected is the
longest time trade. Even the trading
strategies included in each automated
trading software were optimized in order
to maximize the profit and to reduce the
capital exposure level, the longest trade
periods is still important. 1,422 hours
means about 60 days and this time is due
to the usage of six automated investment
software included in theServer. In all this
time a capital stake is blocked into the
negative trade that it is waiting to be
recovered by the trading software. In all
this period that capital will produce
nothing, and even that trade will be
closed on profit, the efficiency of that
capital will be low.
Looking to the results from the Table 2
we can see that using the trading
fragmentation model, the maximal trade
period was reduced by almost ten times.
In this case, with ξ=0.5%, the longest
time trade was 147 hours instead 1,422
hours in the first case. Using the new exit
methodology those negative trades from
the first case were covered by some
positive trades made by other trading
software. In this way the capital was
blocked for a shorter period of time and a
14,84% supplementary profit stake was
obtained. In addition, the maximal and
the absolute drawdown were improved
and by consequences the RRRs obtained
numbers are significantly better.
Thinking to the trading fragmentation
methodology we can suppose that the
best case is to use a smallest ξ, but this is
not the true case. Looking to the Table 3.
we can see that using a ξ=1.0% a better
profit level was obtained. The
explanation is that with a larger ξ, some
of the losing trades were recovered in
time and produced a supplementary part
of the profit. For the case with ξ=1.0%
the profit is with 2,23% higher than the
case with ξ=0.5% and with 17,40%
higher than the case without
fragmentation.
A first conclusion is that the trading
fragmentation exit methodology is a
significant improvement factor for an
advanced automated trading system.
An important notice is about the profit
fragment level. Even in the numbers
presented above we have seen that the case
with ξ=1.0% is the better case, this
conclusion is good only for the trading
system used as example. The profit fragment
level must be optimized for each trading
system. This factor depends on the trading
strategies used, on the profit level used for
each individual exit methodology by each
trading software and it depends also on the
capital exposure level allocated for each
trading strategy. Further researches indicate
that the ξ level depends also on the spreads,
commissions and slippage taxes asked by
the brokerage company.
Another factor hard to be predicted without
tests is that the ξ level depend on the
markets used to trade, on the correlation
coefficient between those markets together
and on the independence between the
trading strategies used. With all of these
considerations the ξ level must be optimized
for each trading software and for each
financial market used by the system.
Another important factor is that the ξ level
cannot be optimized using simulation or
back tests. We have the methodologies to
simulate the functionality of any trading
system but to simulate 10 or 20 trading
software together is a very hard that can ask
a huge computing power and time. To avoid
these complications trading tests like those
presented in the chapter 5 can be made using
different valued for the ξ level.
Together with the “Global Stop Loss”
methodology presented in [4], the trading
fragmentation method is the best method I
have found in my research to reduce the
capital exposure and to increase the trading
efficiency using algorithmic trading in any
advanced automated trading system that
trade in several unrelated markets.
Database Systems Journal, vol. X/2019 31
References
[1] A. Bâra, I. Botha, V. Diaconița, I.
Lungu, A. Velicanu and M. Velicanu,
A model for Business Intelligence
Systems’ Development, Informatica
Economică Journal, vol. 13, no.
4/2009. ISSN: 1453-1305
[2] A. Bologa and R. Bologa, Business
Intelligence using Software Agents,
Database Systems Journal vol. II, no.
4/2011. ISSN: 2069-3230
[3] C. Păuna, Automated Trading
Software - Design and Integration in
Business Intelligence Systems,
Database Systems Journal vol. IX,
2018. ISSN: 2069-3230
[4] C. Păuna, Capital and Risk
Management for Automated Trading
Systems, Proceedings of the
International Conference on
Informatics in Economy, May 2018.,
Iași, Romania. Available at:
https://pauna.biz/ideas
[5] L. Connors and C. Alvarez, Short
Term Trading Strategies That Work.
A Quantitative Guide to Trading
Stocks and ETFs, TradingMarkets
Publishing Group, 2009, ISBN: 978-
0-9819239-0-1. pp. 112.
[6] C. Păuna, Trend Detection with
Trigonometric Interpolation for
Algorithmic Trading, Scientific
Annals of Economics and Business,
ISSN: 2501-1960
[7] C. Păuna, A Price Prediction Model
for Algorithmic Trading, Romanian
Journal of Information Science and
Technology, ISSN: 1453-8245
[8] G. Kleinman, The new commodity
trading guide. Breakthrough
Strategies for Capturing Market
Profits, FT Press, 2009, ISBN:0-13-
714529-2. pp. 126.
[9] C. Păuna, The psychology of the
automated decision-making
algorithms usage in the financial
information systems, Revista de
Psihologie, ISSN: 0034-8759
[10] R. Zota and L. Ciovica, Designing
software solutions using business
processes, Proceedings of the 7th
International Conference on
Globalization and Higher Education in
Economics and Business Administration,
GEBA 2013. Published by Elsevier B.V.
ISSN: 2212-5671. doi:10.1016/S2212-
5671(15)00125-2
[11] S. Ward, High Performance Trading.
35 Practical Strategies and Techniques
to Enhance Your Trading Psychology
and Performance, Harimann Hours,
2009, ISBN: 978-1-905641-61-1. pp.
125.
[12] I. Purcaru, Informaie i corelaie,
Editura tiințifică și Enciclopedică,
1988, pp. 91.
[13] C. Păuna, theServer automated trading
system online presentation, 2015.
Available at: https://pauna.biz/theserver
[14] C. Păuna, Capital and Risk
Management for Automated Trading
Systems, Proceedings of the 17th
International Conference on Informatics
in Economy, 2018, pp 183-188.
Available at: https://pauna.biz/ideas
32 Trading Fragmentation Methodology to Reduce the Capital Exposure with Algorithmic Trading
Cristian PĂUNA graduated the Faculty of Cybernetics, Statistics and
Economic Informatics of the Economic Studies Academy in 1999 and he is
also a graduate of the Aircraft Faculty from the Bucharest Polytechnic
University in 1995. He got the title of Master of Science in Special Aerospace
Engineering in 1996. In the last decades he had a sustained activity in the
software development industry, especially applied in the financial trading
domain. Based on several original mathematical algorithms, he is the author
of more automated trading software for financial markets. At present he is the Principal
Software Developer of Algo Trading Service Ltd. and he is involved as PhD student in the
Economic Informatics Doctoral School from the Economic Studies Academy.