<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>October</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Regarding the Selection of a Trading Strategy in Eficient Markets</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Arnaldo Vergara-Romero</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Petr Sed'a</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>César Pozo-Estupiñan</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lisette Garnica-Jarrin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Axios Research EC</institution>
          ,
          <addr-line>Daule</addr-line>
          ,
          <country country="EC">Ecuador</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad Bolivariana del Ecuador</institution>
          ,
          <addr-line>Durán</addr-line>
          ,
          <country country="EC">Ecuador</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universidad de Córdoba</institution>
          ,
          <addr-line>Córdoba</addr-line>
          ,
          <country>España</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>VSB-Technical University of Ostrava</institution>
          ,
          <addr-line>Ostrava</addr-line>
          ,
          <country country="CZ">Czech Republic</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>2</volume>
      <fpage>6</fpage>
      <lpage>28</lpage>
      <abstract>
        <p>The efectiveness of information processing in stock markets is frequently subjected to statistical analysis and verification. If a particular stock market is judged to be ineficient, it is reasonable to devise and implement an exchange plan that, if successful, would result in returns that are greater than the market average. Because nonlinear dependence in returns is typically the root cause of information ineficiency in stock markets, it is prudent to employ an exchange plan that is founded on nonlinear relationships to maximize one's chances of financial success. This article's purpose is not to present statistical verification of the efectiveness or inefectiveness of the marketplace in question; rather, it is to propose the principle underlying this exchange plan and provide an illustrative example based on actual data. The nonlinear dependencies in the return time series are the foundation of the exchange plan suggested in this paper. The k-nearest neighbor technique, also known as the k-NN technique, is used to generate buy or sell signals. This methodology adheres to the same fundamental underpinnings as the nonlinear BDS test. Python, which is a programming language, is going to be used to implement the k-NN technique.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Trading Strategy</kwd>
        <kwd>Eficient Markets</kwd>
        <kwd>Exchange Strategies</kwd>
        <kwd>Bootstrapped</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The disposition that an investor has toward risk, the time horizon over which they invest, and
the degree to which they have faith in the eficient market hypothesis are typically the deciding
factors in how that investor chooses to trade [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It is abundantly clear that some participants
in the market frequently engage in irrational behavior. Evidence of systematic errors made
by some investors has been presented by behavioral financial economists and psychologists.
When it comes to choosing a exchange plan, rational investors have two primary options to
choose from. Since it is a game of no winners and always the same number of losers, passive
management may still be a valid tactic in some circumstances. Obviously, somebody must
hold all the stocks, and while some investors are able to generate returns that are higher than
average, other investors have to generate returns that are lower than average. When additional
costs associated with active management are considered, it is possible that most investors will
not outperform the market average; consequently, passive investors may achieve better results.
The use of fundamental and technical analyses is an option if a particular market is ineficient.
Of course, it is also possible to apply rules or models that are more complex in nature [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] cites several empirical studies that all came to the same conclusion: returns are
conditionally predictable. In the body of academic literature, linear dependencies in financial time series
returns have been identified only very infrequently. Only extremely low and extremely high
frequencies are exempt from this rule [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. It is common practice to assume that the potential
for nonlinear dependencies is too complex to be accurately specified. As a result, practitioners
focus a lot of their attention on the use of artificial intelligence and data mining techniques
that do not require the forecaster to precisely describe the associations that exist in the time
series. For this reason, a wide variety of data mining techniques, including neural networks,
nearest neighbor analysis, classification trees, random forests, and many others, have been
implemented to forecast the future values of financial time series [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>The plan of an exchange approach that would be established on nonlinear relationships in
returns and that would therefore combine data mining techniques with modern programming
tools is the practical challenge that needs to be addressed. The purpose of this paper is to
propose the principle of an exchange plan that is based on nonlinear dependencies detected in
returns by the k nearest neighbor (k-NN) technique using the Python programming language,
and to show an illustrative example on a real data sample. The k nearest neighbor (k-NN)
technique detects nonlinear dependencies in returns by comparing each return to its nearest
neighbor.</p>
      <p>The value that is brought to the table by this piece of writing can be broken down into the
following two categories:
• The correlation between the results of the nonlinear BDS test and exchange plan will be
demonstrated.
• The k-NN technique will be used to demonstrate how the possibility of using the
programming language Python to detect signals for selling and buying generated by the
technique will also be demonstrated.</p>
      <p>The following outline describes how this article is structured. In the introduction, the
motivation was broken down, a brief overview of the relevant literature and the existing body
of knowledge was presented, and the significance of this paper’s contribution to the field was
emphasized. A theoretical background of the problem that was investigated is presented in the
second chapter. It is briefly described how the eficient market hypothesis (EMH), the adaptive
market hypothesis (AMH), and the BDS test are all related to one another. In the third section,
an exchange plan that makes use of the outcomes of the BDS statistical test, the programming
language Python, and the nearest neighbor technique is described. This plan was developed
using the aforementioned tools. In addition to that, you will be provided with an illustrative
example that contrasts the outcomes of three diferent exchange strategies. The conclusion of
this paper provides a synopsis of the findings and a discussion of those findings.</p>
    </sec>
    <sec id="sec-2">
      <title>2. The ability to predict returns under certain conditions, based on nonlinear dependencies</title>
      <p>The efects of statistical tests that investigate whether or not returns are conditionally expectable
have a fundamental bearing on the manner in which exchange strategies can be practically
applied, regardless of whether the market in question is eficient or ineficient [</p>
      <sec id="sec-2-1">
        <title>5]. However,</title>
        <p>
          conditional predictability is not statistical proof of the market’s eficiency or lack of eficiency.
The AMH suggests that both eficiency and ineficiency can shift and develop over the course of
one’s lifetime. As a means of adjusting to shifting market conditions, market agents frequently
turn to heuristics to select appropriate investment opportunities. According to [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], the degree
to which market conditions can be predicted shifts over time. This is because market conditions
can change. Using statistical tools, one can investigate whether or not the returns on assets are
conditionally predictable.
        </p>
        <p>
          The unpredictable nature of price shifts is one of the empirical hallmarks of markets that
are informationally eficient. Because of this, the evolution of prices should not be predictable
in markets that are eficient. In the scientific literature, several statistical tests, both linear
and nonlinear, have been defined to verify the randomness of return values. According to
[
          <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
          ], the BDS test is one of the most powerful nonlinear tests that can be used to examine
the first type of random walk hypothesis. The BDS test of independence is a non-parametric
technique for evaluating the null hypothesis that the data are unrelated to one another and
are distributed in an equal fashion [
          <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
          ]. The concept of the correlation integral will serve
as the foundation for the examination. The BDS test considers a diverse range of competing
hypotheses. Non-stationarity, chaos, and nonlinear stochastic processes are some examples of
the types of non-independent and unequally distributed processes that it can identify [
          <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
          ].
When one possesses a sequence of logarithmic returns rt that is comprised of n observations,
one can write the correlation integral for m dimensions as follows:
,() =
        </p>
        <p>2
( −  + 1) * ( − ) *
∑︁</p>
        <p>∑︁
−  − +1 − 1
=1 =+1 =0
∏︁ ( + ,  + )
where  is a small enough preset distance,  is a nesting parameter and  is the Heaviside
function, the following formula holds true for this function:
(,  ) =
︂{</p>
        <p>1 
0  
ℎ
| −  | ≤</p>
      </sec>
      <sec id="sec-2-2">
        <title>According to [9, 10], test statistics are defined as follows:</title>
        <p>,() =
√ −  + 1 * [,() − 1,− +1()]
ˆ,()
∼  (0, 1)
An approximation of the asymptotic standard deviation is denoted by the notation ˆ,().</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. An outline of a potential exchange plan</title>
      <p>
        In light of the findings that were presented by [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], in which it was discovered that returns are
rather expectable based on the findings of the nonlinear BDS test, it is reasonable to propose an
exchange plan that is based on the existence of nonlinear associations in earnings.
      </p>
      <sec id="sec-3-1">
        <title>3.1. K-nearest neighbor technique</title>
        <p>
          It would appear that the k-NN technique is an appropriate technique for the generation of buy
or sell signals. According to [
          <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
          ], this technique involves selecting geometric segments
of historical time series values that are comparable to the segment that came immediately
before the observation that is going to be predicted. In point of fact, the k-NN technique
selects pertinent earlier observations not according to their position in time but rather on the
basis of the levels and geometric trajectories they followed [
          <xref ref-type="bibr" rid="ref15 ref16">15, 16</xref>
          ]. The k-nearest neighbors
technique of prediction can be broken down into several distinct steps. The time series , where
 = 1, ..., , needs be transformed into a series of segments of the same length. These segments
need to have the form of vectors  ,  and they need to contain m sample observations of
the original time series at intervals  ∈  :
        </p>
        <p>, = (, −  , − (− 1) )</p>
        <p>Where denotes the nesting dimension, and is the delay parameter, respectively. In the
scientific literature, these m-dimensional vectors are referred to as m-histories, whereas the
phase space of the time series is represented by the multidimensional space . The nearness of
two m-histories in the segment area of the time series can be characterized as nearby neighbors
in the dynamical behavior of two sections in the time series .</p>
        <p>
          The forecast of the time series  where  = 1, ..., , is based on the analysis of the historical
paths of the vectors around the last vector  = (, − 1, ..., − (− 1)). his analysis was
carried out so that the  time series could be predicted. In the subsequent step, segments with
dynamic behaviors that are similar to those previously identified are identified and used for
prediction. In order to derive a prediction for a time series, it is necessary to take into account a
total of k m-histories, such as 1, 2, 3, ..., , which are most comparable to . In this
way, the prediction can be obtained [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. It is necessary to identify the nearest  vectors in the
phase space of time series  in order to locate the nearest neighbors of . This is done so
that the nearest neighbors of  can be located. The process of identification involves locating
the m-history  that has the highest serial correlation with the most recent vector, which is
denoted by . The prediction of the time series +1 using the NN technique is accomplished
by applying linear autoregression, the coeficients of which are estimated using the technique
of least squares. This allows for accurate forecasting of the time series [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. This represents a
regression across the entirety of k m-histories, including 1, 2, 3, ..., .
        </p>
        <p>
          It is critical that the prediction made by the k-NN technique depends not only on the value
of the nestling measurement m but also on the quantity of points in the phase space of the time
series  that are closest to . It is possible to make use of a number of diferent heuristic
techniques, for instance, in order to determine these two parameters [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]. However, the use
of genetic algorithms, which enable the concurrent purpose of the optimum values of  and
(4)
, is the technique that is considered to be the most applicable. Genetic algorithms are a type
of adaptive examine and optimization techniques. They have the advantage of being able to
evaluate the loss functions associated with the predictor parameters without assuming the
continuousness or diferentiability of the loss function, which is a common assumption with
other types of exploration and optimization techniques [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]. The use of genetic algorithms
ofers an additional benefit in that it removes the issue of data snooping, which is another
advantage of using genetic algorithms. The sample has been separated into a training set
and an exam set. However, prior to utilizing the k-NN technique, it is recommended to first
determine whether or not the time series of returns contains any nonlinear dependence. The
demonstration of nonlinearity would provide conclusive evidence that our line of thought
regarding the implementation of the k-NN technique is on the right track. It would appear
that the BDS test, which follows a similar line of reasoning, is the one that is most applicable
[
          <xref ref-type="bibr" rid="ref21 ref22">21, 22</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. K-nearest neighbor technique</title>
        <p>Python is a high-level programming language that supports multiple programming paradigms
and provides dynamic control over the data types that are used. These programming paradigms
include object-oriented programming, imperative programming, and functional programming.
Python is an open-source software program that provides free installation packages for the
majority of operating systems and computing platforms (Unix, MS Windows, macOS, Android).
In the world of applied finance, the programming language Python is also experiencing a
meteoric rise in popularity right now.</p>
        <p>
          In point of fact, the k-NN algorithm produces an imaginary boundary for the data classification
process. The algorithm makes its predictions relative to the nearest boundary line whenever new
data points are added. As a result, having a higher value for the parameter k implies a damping
of the separation curves, which ultimately results in models that are simpler. While a smaller
value for the k parameter has a tendency to overfit the data and result in complex models, larger
values tend to fit the data more accurately. In conclusion, selecting the appropriate value for
the k parameter is extremely important if one wishes to avoid either overfitting or underfitting
the data set [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ]. Python code implementing the nearest neighbor algorithm should proceed
through the following series of steps:
• Import the k-NN algorithm that is contained within the scikit-learn package.
• Develop variables for features and objectives.
• Separate the data into the test data set and the training data set.
• Create a k-NN model based on the value of the neighboring node.
• Train or fit data into a model.
        </p>
        <p>• Try to anticipate the values in the future</p>
        <p>
          The most important question is how to compute an appropriate value for the k parameter
when working with a data set. To obtain the range of the expected k-value, it is obvious that we
need to obtain knowledge of the data sample first. This is obvious even at a cursory glance. It
is necessary to test the model for each expected k-value if we are to obtain a k-value that is
accurate [
          <xref ref-type="bibr" rid="ref24">24</xref>
          ]. Figure 1 displays some code written in Python as an example.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. K-nearest neighbor technique</title>
        <p>
          The exchange plan that has been proposed is founded on the concept of straightforward market
timing, which entails either investing in the stock market (an index or asset), or in a
riskfree asset. The k-NN technique’s forecasts are used to divide the next exchange day into two
categories, and each category corresponds to a diferent exchange option [
          <xref ref-type="bibr" rid="ref25">25</xref>
          ]. The first choice
involves the investor’s participation in the market (which will result in a return proportional to
the market), while the second choice involves the investor’s withdrawal from the market and
an investment in a safe asset (it will bring a riskfree return). The exchange plan outlines the
position for the following exchange day by taking into account the current state (whether there
is presence or absence in the market) and generating buy or sell signals through the application
of the k-NN technique. If, under the circumstances of market presence, it is anticipated that
prices will go down based on the prediction made using the k-NN technique, then the asset is
sold, and the proceeds are invested in an asset that does not involve any risk [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ]. On the other
hand, if there is no activity in the market at all, the k-NN technique forecasts a rapid increase
in price in the not-too-distant future, and this results in the generation of a signal to buy the
asset. After the sale of the risk-free asset, the proceeds are placed in market-based investments.
When selecting either of the other two possibilities, the status quo will be maintained [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ].
        </p>
        <p>When the exchange rule is applied to the entirety of the exchange period, beginning at time
1 and ending at time T, the yield , which can be written as follows:</p>
        <p>
          Where () represents the market return,  and  are indicator variables that take on the
value of one if the k-NN technique produces a signal for buying or selling, respectively, and take
on the value zero in all other circumstances. It is required that the condition  *  = 0, ∀ ∈
(1,  ) be satisfied, where  is the total number of transactions, and the value of c represents the
transaction costs expressed as a percentage of the price [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ].
        </p>
        <p>
          If the value of the prediction at time t is close to the value of the closing price at time  − 1,
then it is convenient to modify a simple rule for buying or selling with a filter that reduces
the number of false signals for buying or selling [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ]. This can be done by checking to see
if the prediction at time  is close to the value of the closing price at time  − 1. One way to
think about the filter is as the quantity of risk that the stakeholder is disposed to take on. If
the expected value obtained by the k-NN technique is higher (lower) than the closing price at
time  − 1, adjusted by the percentage of the standard deviation of the price diferences on the
interval from 1 to  − 1, the filter rule will generate buy (sell) signals at time . This occurs
when the closing price at time  − 1 is compared to the expected value obtained by the k-NN
technique. If, ˆ is the value that was predicted for the price ¶(), then a buy signal will be
generated if, ˆ is greater than − 1 +  .  while the investor is absent from the market at the
same time [
          <xref ref-type="bibr" rid="ref30">30</xref>
          ]. Given that we already have a presence in the market, we shouldn’t withdraw
from it. On the other hand, a sell signal is generated if the condition, ˆ ≤  ( − 1) +  . 
applies and the investor is present on the market at the same time. In the event that we do not
have a presence in the market, we should keep holding onto the risk-free asset [
          <xref ref-type="bibr" rid="ref31">31</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. K-nearest neighbor technique</title>
        <p>
          It is necessary to consider how the k-NN exchange plan proposed stacks up against other
possible approaches. In order to keep this piece to a reasonable length, we will only provide one
example for illustration purposes. The exchange strategies that are chosen for comparison are
going to be based on the Relative Strength Index (RSI) and the Relative Momentum (RM) [
          <xref ref-type="bibr" rid="ref32">32</xref>
          ].
        </p>
        <p>
          In light of the fact that the k-NN technique is predicated on the presence of non-linear
relationships in returns, it is recommended that the BDS test be utilized in order to validate the
non-linearity of the data sample in question. Asymptotic estimates are used as the foundation
for the BDS test statistic. On the other hand, it may cause one to draw incorrect inferences [
          <xref ref-type="bibr" rid="ref31">31</xref>
          ].
The bootstrap technique was utilized so that this issue could be resolved.
        </p>
        <p>In this approach, individual and combined statistical tests are computed by making use of
samples of T-observations that are produced through the process of weighting the initial data.
The fraction of replications in a bootstrapped study that are external the restrictions described
by the predictable measurements is what is used to directly calculate the bootstrapped study’s
p-value. It was decided that there would be 2500 replications of each experiment.</p>
        <p>The daily returns of the S&amp;P 500 index were selected for inclusion in this article. In Figure 2,
you can see how the p-values of the non-linear BDS test statistics for the S&amp;P 500 index returns
changed over the course of the period from 2006 to 2017. Calculations were made to determine
the values of BDS statistics for nesting dimensions 2 and 3. (marked by the symbols BDS2 and
BDS3). The level of statistical significance that will be used to evaluate the significance of BDS
tests is set at 5%, and this level is represented in the graphs by a horizontal line in the color
red. On the basis of a time series that spanned twenty months, the p-values were calculated.
The p-value for October 2008, for instance, corresponds to the data sample for the time period
spanning February 2007 through September 2008. As can be seen in Figure 2, the assumption of
complete independence between returns is not supported by the data for the years 2011-2012
and 2014-2015.</p>
        <p>
          As a starting point for the calculations, we used the dividend-adjusted daily closing rates
of the S&amp;P 500 index that were in efect during the four-year time span beginning January 1,
2011, and ending December 31, 2014. This time frame was specifically selected on purpose.
Figure 2 presents the findings that indicate that the BDS test conducted during that time period
frequently led to the rejection of the null hypothesis of independence. The information was
gathered from the website located at http://finance.yahoo.com. As a risk-free investment option,
a United States Treasury bill with a maturity of three months was chosen. The transaction
costs, denoted by c, were set at a level equal to five percent of the total price. Additionally, the
percentage of the standard deviation that corresponds to the price diferences was established
at 5 percent [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ].
        </p>
        <p>
          It is recommended that the 14-day indicator be used for the RSI calculation because it
represents the most suitable time period. Therefore, the same frequency was selected for the
RM indicator, when typically, a value from the range of 5-25 exchange days is selected [
          <xref ref-type="bibr" rid="ref34">34</xref>
          ].
        </p>
        <p>The outcomes of all three exchange strategies are compared and summarized in Table 1. The
profitability indicator presents the proportion of total trades that resulted in a profit relative
to the total number of trades executed. The most important feature of each exchange plan
is expressed as a percentage and represents the typical return obtained by using that plan.
According to the findings, during the evaluation period, the k-NN plan performed marginally
better than the other two options when the average yield was taken into consideration. This
is, of course, merely a hypothetical illustration of how one could use historical data samples
without actually investing any money.</p>
        <p>Plan
k-NN plan
RM 14 plan
RSI 14 plan</p>
        <p>Profiability</p>
        <p>Average yield
57%
48%
53%
84%
69%
86%</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>Within the scope of this research project, a k-NN-based exchange plan was proposed for
consideration. However, the purpose of this paper was not to test that approach on existent
statistics samples and thus specify statistical verification of the efectiveness or inefectiveness
of the given marketplace. Instead, the purpose of this paper was to discuss the topic at hand. The
purpose of this paper was to propose only the principle of an exchange plan that is established
on nonlinear dependencies detected in revenues, utilize the Python programming language,
and show an illustrative example on a real data sample. Specifically, the goal was to show that
nonlinear dependencies can be detected in returns. The nonlinear k-NN technique is responsible
for the generation of buy or sell signals for the proposed exchange plan.</p>
      <p>The nonlinear BDS independence test and the k-NN technique are both based on similar
underlying principles, specifically the correlation integral and nesting dimensions. As a result,
there is an unmistakable link between the findings of the statistical analysis and the exchange
plan that has been suggested. In addition, the article demonstrates the direct utilization of the
k-NN technique in the Python programming environment, which is a tool that is becoming
increasingly popular not only in empirical finance but across the board. The profitability of
the suggested exchange plan was evaluated using real data derived from the US stock market
during the period 2011-2014, which was a time when the results of the BDS test frequently
confirmed non-linear dependencies in return values. After that, the k-NN plan was compared
to exchange strategies based on RSI and RM to see which one performed better.</p>
      <p>The empirical findings lean somewhat in favor of a tactic that is founded on the k-NN
technique. In addition to testing the proposed k-NN plan on data from other markets, for a
variety of assets, at various stages of market development, for a variety of data frequencies,
in subperiods of varying lengths, and comparing the results of these tests to those of other
types of strategies, the proposed plan should also be tested on data from other markets. It
is also recommended that a statistical investigation be carried out to determine whether the
profitability of the k-NN plan is in any way connected to the outcomes of the BDS test.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Urquhart</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>McGroarty</surname>
          </string-name>
          ,
          <article-title>Are stock markets really eficient? evidence of the adaptive market hypothesis</article-title>
          ,
          <source>International Review of Financial Analysis</source>
          <volume>47</volume>
          (
          <year>2016</year>
          )
          <fpage>39</fpage>
          -
          <lpage>49</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A. R.</given-names>
            <surname>Pagan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. A.</given-names>
            <surname>Sossounov</surname>
          </string-name>
          ,
          <article-title>A simple framework for analysing bull and bear markets</article-title>
          ,
          <source>Journal of applied econometrics 18</source>
          (
          <year>2003</year>
          )
          <fpage>23</fpage>
          -
          <lpage>46</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Christofersen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. X.</given-names>
            <surname>Diebold</surname>
          </string-name>
          ,
          <article-title>Financial asset returns, direction-of-change forecasting, and volatility dynamics</article-title>
          ,
          <source>Management Science</source>
          <volume>52</volume>
          (
          <year>2006</year>
          )
          <fpage>1273</fpage>
          -
          <lpage>1287</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R. C.</given-names>
            <surname>Cavalcante</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. C.</given-names>
            <surname>Brasileiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. L.</given-names>
            <surname>Souza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. P.</given-names>
            <surname>Nobrega</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L.</given-names>
            <surname>Oliveira</surname>
          </string-name>
          ,
          <article-title>Computational intelligence and financial markets: A survey and future directions</article-title>
          ,
          <source>Expert Systems with Applications</source>
          <volume>55</volume>
          (
          <year>2016</year>
          )
          <fpage>194</fpage>
          -
          <lpage>211</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A.</given-names>
            <surname>Morante</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Villamil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Florez</surname>
          </string-name>
          ,
          <article-title>Framework for supporting the creation of marketing strategies</article-title>
          ,
          <source>Information</source>
          <volume>20</volume>
          (
          <year>2017</year>
          )
          <fpage>7371</fpage>
          -
          <lpage>7378</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A. W.</given-names>
            <surname>Lo</surname>
          </string-name>
          ,
          <article-title>The adaptive markets hypothesis: Market eficiency from an evolutionary perspective</article-title>
          ,
          <source>Journal of Portfolio Management</source>
          ,
          <string-name>
            <surname>Forthcoming</surname>
          </string-name>
          (
          <year>2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>P.</given-names>
            <surname>Sed</surname>
          </string-name>
          <article-title>'a, Teoretické aspekty hypotézy efektivního trhu a empirie na akciových trzích v zemích střední evropy</article-title>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Romero-Subia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Jimber-del Rio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. S.</given-names>
            <surname>Ochoa-Rico</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vergara-Romero</surname>
          </string-name>
          ,
          <article-title>Analysis of citizen satisfaction in municipal services</article-title>
          ,
          <source>Economies</source>
          <volume>10</volume>
          (
          <year>2022</year>
          )
          <fpage>225</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>W. A.</given-names>
            <surname>Broock</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Scheinkman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. D.</given-names>
            <surname>Dechert</surname>
          </string-name>
          ,
          <string-name>
            <surname>B. LeBaron,</surname>
          </string-name>
          <article-title>A test for independence based on the correlation dimension</article-title>
          ,
          <source>Econometric reviews 15</source>
          (
          <year>1996</year>
          )
          <fpage>197</fpage>
          -
          <lpage>235</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Vergara-Romero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.-A.</given-names>
            <surname>Jimber-del Río</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Márquez-Sánchez</surname>
          </string-name>
          ,
          <article-title>Food autonomy within food sovereignty: Evidence from a structural model</article-title>
          ,
          <source>Agronomy</source>
          <volume>12</volume>
          (
          <year>2022</year>
          )
          <fpage>1141</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>P.</given-names>
            <surname>Sed</surname>
          </string-name>
          <article-title>'a, L. Caridad Lopez del Rio, Conditional predictability of assets returns: a dynamic approach</article-title>
          ,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>M.-S.</surname>
            Ochoa-Rico,
            <given-names>J.-A.</given-names>
          </string-name>
          <string-name>
            <surname>Jimber-del Río</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Cornejo-Marcos</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Vergara-Romero</surname>
          </string-name>
          ,
          <article-title>Characterization of the territory and estimation of a synthetic index of social welfare</article-title>
          .,
          <source>TEM Journal 11</source>
          (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>F.</given-names>
            <surname>Fernandez-Rodrıguez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sosvilla-Rivero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Andrada-Felix</surname>
          </string-name>
          ,
          <article-title>Exchange-rate forecasts with simultaneous nearest-neighbour methods: evidence from the ems</article-title>
          ,
          <source>International Journal of forecasting 15</source>
          (
          <year>1999</year>
          )
          <fpage>383</fpage>
          -
          <lpage>392</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>G.</given-names>
            <surname>Macas-Acosta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Macas-Lituma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vergara-Romero</surname>
          </string-name>
          ,
          <article-title>The internal and external factors that determined private investment in ecuador 2007-2020</article-title>
          , Economies
          <volume>10</volume>
          (
          <year>2022</year>
          )
          <fpage>248</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Gu</surname>
          </string-name>
          ,
          <article-title>Using support vector regression and k-nearest neighbors for shortterm trafic flow prediction based on maximal information coeficient</article-title>
          ,
          <source>Information Sciences 608</source>
          (
          <year>2022</year>
          )
          <fpage>517</fpage>
          -
          <lpage>531</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>D.</given-names>
            <surname>Chumachenko</surname>
          </string-name>
          , I. Meniailov,
          <string-name>
            <given-names>K.</given-names>
            <surname>Bazilevych</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Chumachenko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yakovlev</surname>
          </string-name>
          ,
          <article-title>Investigation of statistical machine learning models for covid-19 epidemic process simulation: Random forest, k-nearest neighbors, gradient boosting</article-title>
          ,
          <source>Computation</source>
          <volume>10</volume>
          (
          <year>2022</year>
          )
          <fpage>86</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>L.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , W. Ding, J. Xu,
          <article-title>Feature reduction for imbalanced data classification using similarity-based feature clustering with adaptive weighted k-nearest neighbors</article-title>
          ,
          <source>Information Sciences 593</source>
          (
          <year>2022</year>
          )
          <fpage>591</fpage>
          -
          <lpage>613</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>S.</given-names>
            <surname>Bouzebda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Laksaci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mohammedi</surname>
          </string-name>
          ,
          <article-title>The k-nearest neighbors method in single index regression model for functional quasi-associated time series data</article-title>
          ,
          <source>Revista Matemática Complutense</source>
          <volume>36</volume>
          (
          <year>2023</year>
          )
          <fpage>361</fpage>
          -
          <lpage>391</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>M.</given-names>
            <surname>Mailagaha Kumbure</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Luukka</surname>
          </string-name>
          ,
          <article-title>A generalized fuzzy k-nearest neighbor regression model based on minkowski distance</article-title>
          ,
          <source>Granular Computing</source>
          <volume>7</volume>
          (
          <year>2022</year>
          )
          <fpage>657</fpage>
          -
          <lpage>671</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>J. H. Holland,</surname>
          </string-name>
          <article-title>Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence</article-title>
          , MIT press,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Tripathy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Prusty</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Bingi</surname>
          </string-name>
          ,
          <article-title>A k-nearest neighbor-based averaging model for probabilistic pv generation forecasting</article-title>
          ,
          <source>International Journal of Numerical Modelling: Electronic Networks, Devices and Fields</source>
          <volume>35</volume>
          (
          <year>2022</year>
          )
          <article-title>e2983</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cubillos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Wøhlk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. N.</given-names>
            <surname>Wulf</surname>
          </string-name>
          ,
          <article-title>A bi-objective k-nearest-neighbors-based imputation method for multilevel data</article-title>
          ,
          <source>Expert Systems with Applications</source>
          <volume>204</volume>
          (
          <year>2022</year>
          )
          <fpage>117298</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>D.</given-names>
            <surname>Sisodia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Sisodia</surname>
          </string-name>
          ,
          <article-title>Quad division prototype selection-based k-nearest neighbor classifier for click fraud detection from highly skewed user click dataset</article-title>
          ,
          <source>Engineering Science and Technology, an International Journal</source>
          <volume>28</volume>
          (
          <year>2022</year>
          )
          <fpage>101011</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>M.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. C.</given-names>
            <surname>Tsang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Chen</surname>
          </string-name>
          , W. Xu,
          <article-title>Attribute reduction based on overlap degree and k-nearest-neighbor rough sets in decision information systems</article-title>
          ,
          <source>Information Sciences 584</source>
          (
          <year>2022</year>
          )
          <fpage>301</fpage>
          -
          <lpage>324</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>K.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Feng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Jia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Huang</surname>
          </string-name>
          ,
          <article-title>A block cipher algorithm identification scheme based on hybrid k-nearest neighbor and random forest algorithm</article-title>
          ,
          <source>PeerJ Computer Science</source>
          <volume>8</volume>
          (
          <year>2022</year>
          )
          <article-title>e1110</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zeng</surname>
          </string-name>
          ,
          <article-title>A reduced order method for nonlinear parameterized partial diferential equations using dynamic mode decomposition coupled with k-nearestneighbors regression</article-title>
          ,
          <source>Journal of Computational Physics</source>
          <volume>452</volume>
          (
          <year>2022</year>
          )
          <fpage>110907</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>J.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Du</surname>
          </string-name>
          ,
          <article-title>A novel fault detection scheme based on mutual k-nearest neighbor method: Application on the industrial processes with outliers</article-title>
          ,
          <source>Processes</source>
          <volume>10</volume>
          (
          <year>2022</year>
          )
          <fpage>497</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Nababan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Khairi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. S.</given-names>
            <surname>Harahap</surname>
          </string-name>
          ,
          <article-title>Implementation of k-nearest neighbors (knn) algorithm in classification of data water quality</article-title>
          ,
          <source>Jurnal Mantik</source>
          <volume>6</volume>
          (
          <year>2022</year>
          )
          <fpage>30</fpage>
          -
          <lpage>35</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , P. Zhong,
          <string-name>
            <given-names>M.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Hybrid metric k-nearest neighbor algorithm and applications</article-title>
          , Mathematical Problems in Engineering 2022 (
          <year>2022</year>
          )
          <fpage>1</fpage>
          -
          <lpage>15</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>L. M.</given-names>
            <surname>Elshenawy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Chakour</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Mahmoud</surname>
          </string-name>
          ,
          <article-title>Fault detection and diagnosis strategy based on k-nearest neighbors and fuzzy c-means clustering algorithm for industrial processes</article-title>
          ,
          <source>Journal of the Franklin Institute</source>
          <volume>359</volume>
          (
          <year>2022</year>
          )
          <fpage>7115</fpage>
          -
          <lpage>7139</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Abdulameer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tiun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. S.</given-names>
            <surname>Sani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ayob</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. Y.</given-names>
            <surname>Taha</surname>
          </string-name>
          ,
          <article-title>Enhanced clustering models with wiki-based k-nearest neighbors-based representation for web search result clustering</article-title>
          ,
          <source>Journal of King Saud University-Computer and Information Sciences</source>
          <volume>34</volume>
          (
          <year>2022</year>
          )
          <fpage>840</fpage>
          -
          <lpage>850</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>R. D.</given-names>
            <surname>Edwards</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Magee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. C.</given-names>
            <surname>Bassetti</surname>
          </string-name>
          ,
          <article-title>Technical analysis of stock trends</article-title>
          , CRC press,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>K.</given-names>
            <surname>Georgiev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. S.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Stoyanov</surname>
          </string-name>
          ,
          <article-title>Periodic portfolio revision with transaction costs</article-title>
          ,
          <source>Mathematical Methods of Operations Research</source>
          <volume>81</volume>
          (
          <year>2015</year>
          )
          <fpage>337</fpage>
          -
          <lpage>359</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>J.</given-names>
            <surname>Veselá</surname>
          </string-name>
          ,
          <source>Investování na kapitálových trzích</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>