Abstract
In this paper, we apply special fuzzy techniques to analyze the gold price historical data. The main tools are the higher degree fuzzy transform and specific methods of fuzzy natural logic. First, we show how to apply the former for the estimation of the trend-cycle. Then, we provide methodologies for identifying monotonous periods in the trend-cycle and describe them by sentences in natural language.
Keywords: Fuzzy transform, Fuzzy modeling, Financial time series, Data mining
Introduction
The crises of the global financial environment in recent years have put many financial markets into complicated situations, e.g., the drop in oil prices, the unusual fluctuation of gold prices, the unprecedented boom of digital currencies. These make it difficult for people who would like to optimize their profit when trading in such financial markets. Facing this situation, any knowledge of how a market behaves is significantly helpful. In this paper, we devote several techniques to mine information behind a market based on its historical data. Our focus is on the gold market.
First, we apply the fuzzy transform (F-transform) technique for estimation of the trend-cycle of the gold price historical data. The F-transform is a fuzzy approximation technique proposed by I. Perfilieva in [21] and later elaborated by several authors in [5, 10, 13, 22] and elsewhere. It has been successfully applied in many branches of applied sciences [6, 8, 12, 14, 25, 26], and especially, in time series analysis [3, 4, 17, 18, 27] that inspires our investigation in this paper. From those contributions, it is known that the trend-cycle of a time series can be estimated by the F-transform technique, successfully. However, the quality of this estimation strongly depends on practical experience in setting parameters of the latter. Therefore, in addition to the application of the fuzzy transform to the trend-cycle estimation, we introduce a technique for choosing parameters to make it possible to achieve an efficient estimation without requiring much practical experience.
To help investors have a better understanding of the behavior of a market (particularly the gold market), we introduce the concept of bull and bear periods on the trend-cycle to characterize the monotonous stages on it. These concepts are inspired through the notions of bull and bear markets in finance [2, 19]. For practical purposes, an algorithm is provided for identifying bull and bear periods on the estimated trend-cycle.
Finally, we employ one of the important tasks in mining information from time series that is to extract linguistic characterization of the trend-cycle. Let us note that mining linguistic information or time series summarization has been studied for quite a while, recently. There are several approaches that have been proposed to this issue such as [1, 9, 15, 20, 24, 28] and elsewhere. Being motivated by fuzzy natural logic techniques used for describing the behavior of the trend-cycle [15], we develop a methodology to extract linguistic characteristics of bull and bear periods on the trend-cycle of the gold price market and represent them by sentences.
The paper is structured as follows. The next section provides a brief introduction to the (higher degree) F-transform and specific tools in fuzzy natural logic. The main contribution of this paper is described in Sect. 3, where we analyze the trend-cycle of the gold price data. This consists of the estimating of the trend-cycle, identifying of monotonous periods on it, and describing its course in natural language (by sentences). The last section is the conclusion.
Preliminaries
Let
,
and
denote the set of natural numbers, integers and real numbers, respectively.
The Higher Degree Fuzzy Transform
The central notion in the theory of fuzzy transform is the fuzzy partition. Standardly, a fuzzy partition is a set of fuzzy sets on
that satisfy the Ruspini’s condition.1 Together with the development of the fuzzy transform, this concept has several modified versions such as: the generalized (uniform) fuzzy partition [7], the adjoint fuzzy partition [23]. For the practical purposes of this paper, we restrict our consideration on a particularly simple one, called the triangular generalized uniform fuzzy partition.
Definition 1
Let
, and two positive constants h and r be such that
. Let
be a set of fuzzy sets on
, defined by
![]() |
Then,
is called a triangular generalized uniform fuzzy partition of the real line
determined by the triplet
. Each fuzzy set in this fuzzy partition is called a basic function.
Note that basic functions determined in Definition 1 need not to be normal, because there can be more than one basic function covering their peak, in general (see [7]).
In the sequel, since
does not affect the theoretical results concerning the fuzzy transform, for the sake of simplicity, we restrict our investigation to the fuzzy partitions with
. Moreover, we fix
. Therefore, we omit the reference both to
as well as r in the triplet
and deal with h only. We call h the bandwidth of the fuzzy partition.
The higher degree fuzzy transform (F
-transform,
) is a fuzzy approximation technique that can provide both local and global approximation of functions. The first phase, called direct
-transform, transforms a given function to a family of polynomials of degree up to m. These polynomials are orthogonal projections of the given function onto polynomial approximation spaces concerning specific inner products defined with respect to basic functions of a fuzzy partition. Below, we briefly introduce how the direct F
-transform of a function is computed.
Let f be a locally square Lebesgue integrable function on
, and
be a fuzzy partition of the latter in the sense of Definition 1. Let
be defined by2
![]() |
The direct
-transform of
f with respect to
is the family
![]() |
where, for any
,
![]() |
with
,
![]() |
1 |
where
is an
invertible matrix defined by
![]() |
and
is defined by
![]() |
2 |
The polynomial
is called the k-th component of the direct
-transform of f. It provides an approximation of the latter on the region covered by the basic function
.
The second phase called the inverse
-transform of f transforms the vector of components to a function defined as the linear-like combination of the direct F-transform components and the corresponding basic functions, i.e.,
![]() |
Being motivated by fuzzy natural logic techniques used for characterizing behavior of the trend-cycle in time series, we develop a methodology to extract linguistic characteristics of bull and bear periods on the trend-cycle of the gold price market and represent them by sentences. This function provides an approximation to f on its domain
(global approximation). The quality of this approximation depends on the settings of fuzzy partition
, particularly, the bandwidth h. By contrast, under reasonable setting of the bandwidth, the inverse F
-transform can suppress high frequencies in the function f. Namely,
is a smoothed function of the latter. In the sequel, when needing to emphasize the influence of the bandwidth to the inverse function, we use the notation
.
Evaluative Linguistic Expressions: A Formal Theory in Fuzzy Natural Logic
The fuzzy natural logic (FNL) was established as the formal logic aiming at modeling of natural human reasoning which proceeds in natural language. It is an extension of mathematical fuzzy logic, and its paradigm extends the classical concepts of natural logic suggested by Lakoff in [11]. FNL is a class of several formal theories such as: theory of evaluative linguistic expressions, theory of fuzzy IF-THEN rules, etc. For the purposes of this paper, we only focus on the theory of evaluative linguistic expressions.
Evaluative linguistic expressions are special expressions of natural language that are used to specify the course of development of some processes, to evaluate a phenomenon or to make a decision. These expressions may have a complicated structure, but in this paper, we simply consider evaluative linguistic expressions of the following form:
![]() |
3 |
where the atomic evaluative expression comprises any of the canonical adjectives: small, medium, big, and the linguistic hedge is a specific adverb, for example, extremely, significantly, very, rather, roughly, very roughly. The linguistic hedge makes the meaning of the atomic expression more or less precise. An evaluative expression of the form (3) will be denoted by a script letter, for example,
or
.
When using an evaluative expression to evaluate values of a variable X, the resulting expression is of the form
![]() |
4 |
is called the evaluative (linguistic) predication. To make such a predication meaningful, one must specify the context (the state of the world ) in which variable X is considered. The context is characterized by a triplet
, where
and
. These numbers characterize the minimal, typically middle, and maximal values, respectively, of the evaluated characteristics (e.g., “height”, “distance”) in the specified context of use. Only when a context is specified to X, the meaning of the predication in (4) is well-defined and interpreted by a fuzzy set on
. Moreover, if a context w is known then one can determine an evaluative linguistic expression
characterizing a given value
of X by using a function of local perception
![]() |
For the details of this function as well as tools in FNL, we refer to the book [16].
Gold Price: Trend-Cycle Model and Analysis
Our investigation employs the Gold Future Historical Data published in the site investing.com. This is the daily data of the price, the open, high, and low prices in the US Dollar of one Troy Ounce of gold. Our methodology is focused on the price only. A similar analysis can be applied to the rest of the data. This section aims at developing techniques based on the fuzzy transform and tools developed in the theory of evaluative linguistic expressions for estimation of the trend-cycle of the data, classifying periods in the trend-cycle into specific stages concerning its monotonousness, and finally, for extraction of the linguistic characterization of the course of the trend-cycle. Established methods are applied to the data from October 1, 2018, to December 3, 2019, of the length 312, as presented in Fig. 1.
Fig. 1.
The daily gold price from October 1, 2018, to December 3, 2019.
Time Series Model
Let us consider the gold price values as a time series
where
. Standardly, a time series can be additively (multiplicatively) decomposed into a trend-cycle, a seasonal component and an irregular fluctuation. However, we know that the influence of the seasonality to the gold market is weak, and even, unclear. Therefore, let us assume that the time series X can be decomposed as follows:
![]() |
5 |
where TC is the trend-cycle component and R(t) is a realization of a random process characterized by quick decay of its autocorrelation function
, i.e.,
![]() |
6 |
Trend-Cycle Estimation
This task has been elaborated in several papers as mentioned in the introduction. Most of these investigations are to show that the (higher degree) F-transform is a good technique for estimating the trend-cycle of a time series. More precisely, the inverse F
-transform of X provides an estimation of the trend-cycle TC,
![]() |
7 |
However, one can see that the quality of this estimation depends on the degree m of the fuzzy transform and the construction of the fuzzy partition (the bandwidth h). In what follows, we describe a methodology for setting these parameters such that the trend-cycle is well estimated by (7) without requiring much practical experience.
Choosing of the degree m: The more the time series changes its course (or has higher volatility), the higher the degree m should be chosen. A rule of thumb says that if the observed trend-cycle is a nearly linear function then we should choose
or
; otherwise, choose
or
.- Choosing of the bandwidth h: Let
and
be its sample autocorrelation function. The chosen bandwidth
is the value satisfying that
where
and
are two positive integers chosen by the users.
Applying these rules to the gold price data displayed in Fig. 1, we find
with the bandwidth
. Namely, the trend-cycle of the considered data is estimated by the inverse F
-transform with respect to the fuzzy partition determined as in Definition 1 with
. The estimated trend-cycle is depicted in Fig. 2.
Fig. 2.
The trend-cycle estimated by the fuzzy transform (dark/blue line). (Color figure online)
Identification of Monotonous Periods on the Trend-Cycle
This section provides a method for identification of monotonous periods on the trend-cycle TC of time series X. These periods are determined based on duration and market move constraints. Inspired by the notion of bull and bear markets in finance [2, 19], we classify monotonous periods into three categories: bull, bear and neutral ones, corresponding to the increasing, decreasing and stagnating of the trend-cycle. To characterize the monotonousness of the trend-cycle, we use the forward difference defined as follows.
Definition 2
Let f(t),
be a discrete function. The forward difference
of
f is a discrete function determined by
![]() |
Below, we define the bull, bear and neutral periods in the trend-cycle.
Definition 3
Let
be a time period in
. Let
,
and
be three positive real numbers. The period
in TC is said to be a bull (or bear) period with respect to
(or
) and
if the following statements hold true:
-
(i)
(or
), for any
, -
(ii)
If
is a time period satisfying that
(or
), for any
, then
, -
(iii)
(or
) and
.
S is said to be a neutral period if it is neither bull nor bear period.
In Definition 3,
is the smallest length of the bull and bear periods, while
and
are thresholds characterize the steepness of the trend-cycle. From (iii), one can see that
and
are chosen to categorize long stages with little change of the trend-cycle to the neutral periods. In practice,
is the shortest time period, chosen by traders based on the time frame of their trading strategy. Knowing bull and bear periods with lengths greater than
is significantly insightful. For example, if one would like to trade on the gold market weekly based on the given data, he would choose
. Moreover,
and
are chosen based on the market move and the duration constraints. Let us assume that one is interested to discover bull (or bear) periods in the gold market with at least
jump in at most a half of the month (10 days). In this specific case, he should choose
(or
).3
In what follows, we describe an informal algorithm for identifying the bull and bear periods on a trend-cycle.
Apply Algorithm 1 to the considered gold price data where the inputs are the estimated trend-cycle obtained in the previous subsection,
and
. We obtain the result as in Fig. 3.
Fig. 3.
The bull (dark/blue lines), bear (dotted/red lines) and neutral (grey/green lines) periods on the estimated trend-cycle. (Color figure online)
Evaluation of the Trend-Cycle in Natural Language
In this subsection, we describe how the course of the trend-cycle can be evaluated in natural language. Namely, we focus on the bull and bear periods of the trend-cycle TC and introduce a method for generating the linguistic characterization of these stages. Each bull and bear period is characterized by the following sentence,
![]() |
8 |
where
![]() |
with
![]() |
Neutral stages are evaluated as “stagnating”.
Let
be a bull (bear) period on the trend-cycle TC. From Definition 3, this stage is characterized by two essential components: the change of price and the length of the stage. Let
and
be the change of price and the length of S, respectively. In this case,
and
. Then,
![]() |
where
and
are the contexts corresponding to the change of price and the length of periods, respectively. For details how to set the context, we refer the readers to [16].
In what follows, we apply the proposed technique for extracting the linguistic characteristics of the trend-cycle of the considered gold price data depicted in Fig. 3. Since the exact trend-cycle is unknown, we mine the information on its estimation. Namely, we form the linguistic characterization of the bull, bear, and neutral periods (cf. Fig. 3). To do this, we set
and
. The obtained results are presented in Table 1, where linguistic hedges are abbreviated as follows: Ex (Extremely), Si (Significantly), Ra (Rather), Ve (Very), ML (More or Less), Ro (Roughly), QR (Quite Roughly), Ty (Typically) and VR (Very Roughly). From this table, one can extract sentences characterizing the behavior of the bull and bear stages on the trend-cycle of the given data, for example, “the bull period on [51, 74] is Ty moderate increasing in Ra long period”, or “the bear period on [137, 145] is VR weak decreasing in QR short period”.
Table 1.
Linguistic characterization of the trend-cycle.
| Time period | Identified stage | Linguistic characterization |
|---|---|---|
| [0, 3] | neutral | stagnating |
| [3, 12] | bull | ML moderate increasing in VR short period |
| [12, 24] | neutral | stagnating |
| [24, 30] | bear | Ro weak decreasing in Ra short period |
| [30, 38] | neutral | stagnating |
| [38, 48] | bull | QR weak increasing in ML medium period |
| [48, 51] | neutral | stagnating |
| [51, 74] | bull | Ty moderate increasing in Ra long period |
| [74, 80] | bear | Ro weak decreasing in Ra short period |
| [80, 89] | bull | Ra moderate increasing in VR short period |
| [89, 98] | neutral | stagnating |
| [98, 104] | bull | ML weak increasing in Ra short period |
| [104, 113] | bear | Ra moderate decreasing in VR short period |
| [113, 126] | bull | QR weak increasing in Ty medium period |
| [126, 132] | bear | QR weak decreasing in Ra short period |
| [132, 137] | neutral | stagnating |
| [137, 145] | bear | VR weak decreasing in QR short period |
| [145, 151] | bull | Si weak increasing in Ra short period |
| [151, 155] | neutral | stagnating |
| [155, 161] | bull | Ex weak increasing in Ra short period |
| [161, 168] | bear | Ra weak decreasing in ML short period |
| [168, 171] | neutral | stagnating |
| [171, 180] | bull | Ra moderate increasing in VR short period |
| [180, 185] | neutral | stagnating |
| [185, 194] | bull | ML strong increasing in VR short period |
| [194, 202] | neutral | stagnating |
| [202, 212] | bull | Ro weak increasing in ML medium period |
| [212, 216] | neutral | stagnating |
| [216, 229] | bull | Si strong increasing in Ty medium period |
| [229, 233] | neutral | stagnating |
| [233, 239] | bull | QR weak increasing in Ra short period |
| [239, 244] | neutral | stagnating |
| [244, 251] | bear | Ra moderate decreasing in ML short period |
| [251, 258] | bull | ML weak increasing in ML short period |
| [258, 264] | bear | VR weak decreasing in Ra short period |
| [264, 268] | neutral | stagnating |
| [268, 275] | bear | Ra weak decreasing in ML short period |
| [275, 287] | neutral | stagnating |
| [287, 293] | bear | Ra moderate decreasing in Ra short period |
| [293, 299] | bull | Ve weak increasing in Ra short period |
| [299, 305] | bear | Ra weak decreasing in Ra short period |
| [305, 311] | neutral | stagnating |
Conclusions
We applied special fuzzy techniques, consisting of the F-transform and the FNL techniques, for analyzing the gold price historical data. We focused on three critical tasks in mining information of financial time series, including in estimating the trend-cycle, classifying periods in the trend-cycle into bull, bear and neutral stages, and extracting linguistic characterization of the course of the trend-cycle. In this paper, we restricted our consideration on the gold market. However, since the suggested methodologies are described in general schemes, this makes it possible to apply them to other financial data. This is one of the topics for our future researches.
Acknowledgments
This work was supported by the project GA ČR No. 18-13951S. Additional support was provided also by the project (No. CZ.02.1.01/0.0/0.0/17_049/0008414.) “Centre for the development of Artificial Inteligence Methods for the Automotive Industry of the region”.
Footnotes
The sum of all membership functions corresponding to fuzzy sets in a fuzzy partition over each point in
is one.
This function is known as a generating function of the fuzzy partition
(see in [7]).
and
can be different. The setting is up to users.
Contributor Information
Marie-Jeanne Lesot, Email: marie-jeanne.lesot@lip6.fr.
Susana Vieira, Email: susana.vieira@tecnico.ulisboa.pt.
Marek Z. Reformat, Email: marek.reformat@ualberta.ca
João Paulo Carvalho, Email: joao.carvalho@inesc-id.pt.
Anna Wilbik, Email: a.m.wilbik@tue.nl.
Bernadette Bouchon-Meunier, Email: bernadette.bouchon-meunier@lip6.fr.
Ronald R. Yager, Email: yager@panix.com
Linh Nguyen, Email: Linh.Nguyen@osu.cz.
Vilém Novák, Email: Vilem.Novak@osu.cz.
Michal Holčapek, Email: Michal.Holcapek@osu.cz.
References
- 1.Chiang DA, Chow LR, Wang YF. Mining time series data by a fuzzy linguistic summary system. Fuzzy Sets Syst. 2000;112(3):419–432. doi: 10.1016/S0165-0114(98)00003-7. [DOI] [Google Scholar]
- 2.Hoepfner, M.: Retrospective identification of bull and bear markets: a new, but simple algorithm (2018)
- 3.Holčapek M, Nguyen L. Suppression of high frequencies in time series using fuzzy transform of higher degree. In: Carvalho JP, Lesot M-J, Kaymak U, Vieira S, Bouchon-Meunier B, Yager RR, editors. Information Processing and Management of Uncertainty in Knowledge-Based Systems; Cham: Springer; 2016. pp. 705–716. [Google Scholar]
- 4.Holčapek M, Nguyen L. Trend-cycle estimation using fuzzy transform of higher degree. Iran. J. Fuzzy Syst. 2018;15:23–54. [Google Scholar]
- 5.Holčapek M, Nguyen L, Tichý T. Polynomial alias higher degree fuzzy transform of complex-valued functions. Fuzzy Sets Syst. 2018;342:1–31. doi: 10.1016/j.fss.2017.06.011. [DOI] [Google Scholar]
- 6.Holčapek M, Tichý T. A smoothing filter based on fuzzy transform. Fuzzy Sets Syst. 2011;180:69–97. doi: 10.1016/j.fss.2011.05.028. [DOI] [Google Scholar]
- 7.Holčapek M, Perfilieva I, Novák V, Kreinovich V. Necessary and sufficient conditions for generalized uniform fuzzy partitions. Fuzzy Sets Syst. 2015;277:97–121. doi: 10.1016/j.fss.2014.10.017. [DOI] [Google Scholar]
- 8.Hurtík P, Perfilieva I, Hodáková P. Fuzzy transform theory in the view of image registration application. In: Laurent A, Strauss O, Bouchon-Meunier B, Yager RR, editors. Information Processing and Management of Uncertainty in Knowledge-Based Systems. Cham: Springer; 2014. pp. 143–152. [Google Scholar]
- 9.Kacprzyk J, Wilbik A, Zadrożny S. Linguistic summarization of time series using a fuzzy quantifier driven aggregation. Fuzzy Sets Syst. 2008;159(12):1485–1499. doi: 10.1016/j.fss.2008.01.025. [DOI] [Google Scholar]
- 10.Kokainis M, Asmuss S. Higher degree F-transforms based on B-splines of two variables. In: Carvalho JP, Lesot M-J, Kaymak U, Vieira S, Bouchon-Meunier B, Yager RR, editors. Information Processing and Management of Uncertainty in Knowledge-Based Systems; Cham: Springer; 2016. pp. 648–659. [Google Scholar]
- 11.Lakoff G. Linguistics and natural logic. Synthese. 1970;22:151–271. doi: 10.1007/BF00413602. [DOI] [Google Scholar]
- 12.Loia V, Tomasiello S, Vaccaro A. Fuzzy transform based compression of electric signal waveforms for smart grids. IEEE Trans. Syst. Man Cybern.: Syst. 2016;47(1):121–132. doi: 10.1109/TSMC.2016.2578641. [DOI] [Google Scholar]
- 13.Nguyen L, Holčapek M, Novák V. Multivariate fuzzy transform of complex-valued functions determined by monomial basis. Soft. Comput. 2017;21(13):3641–3658. doi: 10.1007/s00500-017-2658-8. [DOI] [Google Scholar]
- 14.Nguyen L, Perfilieva I, Holčapek M. Boundary value problem: weak solutions induced by fuzzy partitions. Discrete Continuous Dyn. Syst.-B. 2020;25(2):715. doi: 10.3934/dcdsb.2019263. [DOI] [Google Scholar]
- 15.Novák V. Linguistic characterization of time series. Fuzzy Sets Syst. 2016;285:52–72. doi: 10.1016/j.fss.2015.07.017. [DOI] [Google Scholar]
- 16.Novák V, Perfilieva I, Dvořák A. Insight into Fuzzy Modeling. Hoboken: Wiley; 2016. [Google Scholar]
- 17.Novák V, Perfilieva I, Holčapek M, Kreinovich V. Filtering out high frequencies in time series using F-transform. Inf. Sci. 2014;274:192–209. doi: 10.1016/j.ins.2014.02.133. [DOI] [Google Scholar]
- 18.Novák V, Štěpnička M, Dvořák A, Perfilieva I, Pavliska V, Vavříčková L. Analysis of seasonal time series using fuzzy approach. Int. J. Gener. Syst. 2010;39:305–328. doi: 10.1080/03081070903552965. [DOI] [Google Scholar]
- 19.Pagan AR, Sossounov KA. A simple framework for analysing bull and bear markets. J. Appl. Econ. 2003;18(1):23–46. doi: 10.1002/jae.664. [DOI] [Google Scholar]
- 20.Palpanas T, Vlachos M, Keogh E, Gunopulos D. Streaming time series summarization using user-defined amnesic functions. IEEE Trans. Knowl. Data Eng. 2008;20(7):992–1006. doi: 10.1109/TKDE.2007.190737. [DOI] [Google Scholar]
- 21.Perfilieva I. Fuzzy transforms: theory and applications. Fuzzy Sets Syst. 2006;157:993–1023. doi: 10.1016/j.fss.2005.11.012. [DOI] [Google Scholar]
- 22.Perfilieva I, Daňková M, Bede B. Towards a higher degree F-transform. Fuzzy Sets Syst. 2011;180:3–19. doi: 10.1016/j.fss.2010.11.002. [DOI] [Google Scholar]
- 23.Perfilieva I, Holčapek M, Kreinovich V. A new reconstruction from the F-transform components. Fuzzy Sets Syst. 2016;288:3–25. doi: 10.1016/j.fss.2015.10.003. [DOI] [Google Scholar]
- 24.Sripada, S., Reiter, E., Hunter, J., Yu, J.: Summarizing neonatal time series data. In: 10th Conference of the European Chapter of the Association for Computational Linguistics (2003)
- 25.Tomasiello S. An alternative use of fuzzy transform with application to a class of delay differential equations. Int. J. Comput. Math. 2017;94(9):1719–1726. doi: 10.1080/00207160.2016.1227436. [DOI] [Google Scholar]
- 26.Vlašánek P, Perfilieva I. Patch based inpainting inspired by the F1-transform. Int. J. Hybrid Intell. Syst. 2016;13(1):39–48. doi: 10.3233/HIS-160223. [DOI] [Google Scholar]
- 27.Štěpnička M, Dvořák A, Pavliska V. A linguistic approach to time series modeling with the help of F-transform. Fuzzy Sets Syst. 2011;180:164–184. doi: 10.1016/j.fss.2011.02.017. [DOI] [Google Scholar]
- 28.Yu J, Reiter E, Hunter J, Mellish C. Choosing the content of textual summaries of large time-series data sets. Nat. Lang. Eng. 2007;13(1):25–49. doi: 10.1017/S1351324905004031. [DOI] [Google Scholar]






















