text
stringlengths
128
2.05k
Baseline method: As baseline method, we adopt the simple moving average strategy (SMA) widely tested and used as a null model in stock market prediction
. It estimates the price of a currency at day [MATH] as the average price of the same currency between [MATH] and [MATH] included.
Evaluation We compare the performance of various investment portfolios built based on the algorithms predictions. The investment portfolio is built at time [MATH] by equally splitting an initial capital among the top [MATH] currencies predicted with positive return. Hence, the total return at time [MATH] is:
[EQUATION] The portfolios performance is evaluated by computing the Sharpe ratio and the geometric mean return. The Sharpe ratio is defined as:
[EQUATION] where [MATH] is the average return on investment obtained between times [MATH] and [MATH] , and [MATH] , the corresponding standard deviation.
The geometric mean return is defined as: [EQUATION] where [MATH] corresponds to the total number of days considered. The cumulative return obtained at [MATH] after investing and selling on the following day for the whole period is defined as [MATH]
The number of currencies [MATH] to include in a portfolio is chosen at [MATH] by optimising either the geometric mean [MATH] (geometric mean optimisation) or the Sharpe ratio [MATH] (Sharpe ratio optimisation) over the possible choices of [MATH] . The same approach is used to choose the parameters of Method 1 ( [MATH] ...
Results We predict the price of the currencies at day [MATH] , for all [MATH] included between Jan, 1st 2016 and Apr 24th, 2018. The analysis considers all currencies whose age is larger than [MATH] days since their first appearance and whose volume is larger than [MATH] . To discount for the effect of the overall mark...
Parameter setting First, we choose the parameters for each method. Parameters include the number of currencies [MATH] to include the portfolio as well as the parameters specific to each method. In most cases, at each day [MATH] we choose the parameters that maximise either the geometric mean [MATH] (geometric mean opti...
Baseline strategy: We test the performance of the baseline strategy for choices of window [MATH] (the minimal requirement for the [MATH] to be different from [MATH] ) and [MATH] . We find that the value of [MATH] mazimising the geometric mean return (see Appendix Fig.
A1 -A) and the Sharpe Ratio (see Appendix Fig. A1 -D) fluctuates especially before November [MATH] and has median value [MATH] in both cases. The number of currencies included in the portfolio oscillates between [MATH] and [MATH] with median at [MATH] , both for the Sharpe Ratio (see Fig.
A1 -B) and the geometric mean return (see Fig. A1 -E) optimisation. Method 1: We explore values of the window [MATH] in [MATH] days and the training period [MATH] in [MATH] days (see Appendix Fig.
A2 ). We find that the median value of the selected window [MATH] across time is [MATH] for both the Sharpe ratio and the geometric mean optimisation. The median value of [MATH] is [MATH] under geometric mean optimisation and [MATH] under Sharpe ratio optimisation. The number of currencies included in the portfolio osc...
A2 -A) and [MATH] for the geometric mean return (see Appendix Fig. A2 -C) optimisations. Method 2: We explore values of the window [MATH] in [MATH] days and the training period [MATH] in [MATH] days (see Appendix Fig.
A3 ). The median value of the selected window [MATH] across time is [MATH] for both the Sharpe ratio and the geometric mean optimisation. The median value of [MATH] is 10 under geometric mean and Sharpe ratio optimisation. The number of currencies included has median at [MATH] for the Sharpe Ratio and [MATH] for the ge...
A3 -A and C). Method 3: The LSTM has three parameters: The number of epochs, or complete passes through the dataset during the training phase; the number of neurons in the neural network, and the length of the window [MATH] . These parameters are chosen by optimising the price prediction of three currencies (Bitcoin, R...
A4 ) reveal that, in the range of parameters explored, the best results are achieved for [MATH] . Results are not particularly affected by the choice of the number of neurones nor the number of epochs. We choose [MATH] neuron and 1000 epochs since the larger these two parameters, the larger the computational time. The ...
A5 -A) and the Sharpe ratio (see Appendix Fig. A5 -B). In both cases the median number of currencies included is [MATH] Cumulative return
In Fig. , we show the cumulative return obtained using the 4 methods. The cumulative returns achieved on April,24 under the Sharpe Ratio optimisation are [MATH] BTC (Baseline), [MATH] BTC (Method 1), [MATH] BTC (Method 2), [MATH] BTC (Method 3). Under geometric mean optimisation we obtain [MATH] BTC (Baseline), [MATH] ...
A9 ). This is expected, since the Bitcoin price has increased during the period considered. While some of these figures appear exaggerated, it is worth noticing that (i) we run a theoretical exercise assuming that the availability of Bitcoin is not limited and (ii) under this assumption the upper bound to our strategy,...
A6 ). We consider also the more realistic scenario of investors paying a transaction fee when selling and buying currencies (see Appendix Section
A3 ). In most exchange markets, the fee is typically included between [MATH] and [MATH] of the traded amount . For fees up to [MATH] , all the investment methods presented above lead, on average, to positive returns over the entire period (see Table
A1 ). The best performing method, Method 3, achieves positive gains also when fees up to [MATH] are considered (see Table A1 ). The cumulative return in Fig.
is obtained by investing between January 1st, 2016 and April 24th, 2018. We investigate the overall performance of the various methods by looking at the geometric mean return obtained in different periods (see Fig.
). Results presented in Fig. are obtained under Sharpe ratio optimisation for the baseline ( Fig. -A), Method 1 ( Fig. -B), Method 2 ( Fig.
-C), and Method 3 ( Fig. -D). Note that, while in this case the investment can start after January 1st, 2016, we optimised the parameters by using data from that date on in all cases. Results are considerably better than those achieved using geometric mean return optimisation (see Appendix Fig.
A10 ). Finally, we observe that better performance is achieved when the algorithms consider prices in Bitcoin rather than USD (see Table
A2 ). Feature importance In Fig. , we illustrate the relative importance of the various features in Method 1 and Method 2. For Method 1, we show the average feature importance; For Method 2, we show the average feature importances for two sample currencies: Ethereum and Ripple.
Portfolio composition The 10 most selected currencies under Sharpe Ratio optimisation are the following: Baseline: Factom (91 days), E-Dinar Coin (89 days), Ripple (76 days), Ethereum (71 days), Steem (70 days), Lisk (70 days), MaidSafeCoin (69 days), Monero (58 days), BitShares (55 days), EDRCoin (52 days).
Method 1: Ethereum (154 days), Dash (128 days), Monero (111 days), Factom (104 days), Ripple (94 days), Litecoin (93 days), Dogecoin (92 days), Maid Safe Coin (86 days), BitShares (73 days), Tether (59 days)
Method 2: Ethereum (63 days), Monero (61 days), Factom (51 days), Ripple (42 days), Dash (40 days), Maid Safe Coin (40 days), Siacoin (30 days), NEM (26 days), NXT (26 days), Steem (23 days).
Method 3: Factom (48 days), Monero (46 days), Ethereum (39 days), Lisk (36 days), Maid Safe Coin (32 days), E-Dinar Coin (32 days), BitShares (26 days), B3 Coin (26 days), Dash (25 days), Cryptonite (22 days).
Conclusion We tested the performance of three forecasting models on daily cryptocurrency prices for [MATH] currencies. Two of them (Method 1 and Method 2) were based on gradient boosting decision trees and one is based on long short-term memory recurrent neural networks (Method 3). In Method 1, the same model was used ...
We built investment portfolios based on the predictions of the different method and compared their performance with that of a baseline represented by the well known simple moving average strategy. The parameters of each model were optimised for all but Method 3 on a daily basis, based on the outcome of each parameters ...
The three methods performed better than the baseline strategy when the investment strategy was ran over the whole period considered. The optimisation of parameters based on the Sharpe ratio achieved larger returns. Methods based on gradient boosting decision trees (Method 1 and 2) worked best when predictions were base...
It is important to stress that our study has limitations. First, we did not attempt to exploit the existence of different prices on different exchanges, the consideration of which could open the way to significantly higher returns on investment. Second, we ignored intra-day price fluctuations and considered an average ...
A different yet promising approach to the study cryptocurrencies consists in quantifying the impact of public opinion, as measured through social media traces, on the market behaviour, in the same spirit in which this was done for the stock market
. While it was shown that social media traces can be also effective predictors of Bitcoin and other currencies price fluctuations, our knowledge of their effects on the whole cryptocurrency market remain limited and is an interesting direction for future work.
Appendix A1 Parameter optimisation In Fig. A1 , we show the optimisation of the parameters [MATH] (A,C) and [MATH] (B,D) for the baseline strategy. In Fig.
A2 , we show the optimisation of the parameters [MATH] (A,D), [MATH] (B,E), and [MATH] (C,F) for Method 1. In Fig. A3 , we show the optimisation of the parameters [MATH] (A,D), [MATH] (B,E), and [MATH] (C,F) for Method 2. In Fig.
A4 , we show the median squared error obtained under different training window choices (A), number of epochs (B) and number of neurons (C), for Ethereum, Bitcoin and Ripple. In Fig.
A5 , we show the optimisation of the parameter [MATH] (C,F) for Method 3. A2 Return under full knowledge of the market evolution.
In Fig. A6 , we show the cumulative return obtained by investing every day in the top currency, supposing one knows the prices of currencies on the following day.
A3 Return obtained paying transaction fees. In this section, we present the results obtained including transaction fees between [MATH] and [MATH]
. In general, one can not trade a given currency with any given other. Hence, we consider that each day we trade twice: We sell altcoins to buy Bitcoin, and we buy new altcoins using Bitcoin. The mean return obtained between Jan. 2016 and Apr. 2018 is larger than [MATH] for all methods, for fees up to [MATH] (see Table
A1 ). In this period, Method 3 achieves positive returns for fees up to [MATH] . The returns obtained with a [MATH] (see Fig. A7 ) and [MATH] (see Fig.
A8 ) fee during arbitrary periods confirm that, in general, one obtains positive gains with our methods if fees are small enough.
A4 Results in USD In this section, we show results obtained considering prices in USD. The price of Bitcoin in USD has considerably increased in the period considered. Hence, gains in USD ( Fig.
A9 ) are higher than those in Bitcoin ( Fig. ). Note that, in Fig. A9 , we have made predictions and computed portfolios considering prices in Bitcoin. Then, gains have been converted to USD (without transaction fees). In Table
A2 , we show instead the gains obtained running predictions considering directly all prices in USD. We find that, in most cases, better results are obtained from prices in BTC.
A5 Geometric mean optimisation In Fig. A10 , we show the geometric mean return obtained by between two arbitrary points in time under geometric mean return optimisation for the baseline ( Fig. A10 -A), Method 1 ( Fig. A10 -B), Method 2 ( Fig. A10 -C), and Method 3 ( Fig. A10 -D).
# Source: arxiv 1805.08630 # Title: Estimating probabilistic context-free grammars for proteins using contact map constraints # Sections: all # Downloaded: 2026-03-03T05:16:22.192150+00:00
Estimating probabilistic context-free grammars for proteins using contact map constraints Abstract Learning language of protein sequences, which captures non-local interactions between amino acids close in the spatial structure, is a long-standing bioinformatics challenge, which requires at least context-free grammars....
Keywords : probabilistic context-free grammar, syntactic tree, structural constraints, protein sequence, protein contact map, maximum-likelihood estimator, contrastive estimation
Introduction 1.1 Grammatical modeling of proteins The essential biopolymers of life, nucleic acids and proteins, share the basic characteristic of the languages: infinite number of sequences can be expressed with a finite number of monomers. In the case of proteins, merely 20 amino acids species (letters) build million...
Not surprisingly the concept of protein language dates back to at least 1960s (Pawlak, 1965 , and since early applied works in 1980s (Brendel and Busse, 1984 ; Jimenez-Montao, 1984 formal grammatical models have gradually gained importance in bioinformatics (Searls, 2002 2013 ; Coste, 2016 . Most notably, Hidden Markov...
One difficulty with modeling proteins is that interactions between amino acids are often less specific and more collective in comparison to RNA. Moreover, the larger alphabet made of 20 amino acid species instead of just 4 bases in nucleic acids, combined with high computational complexity of CF and CS grammars, impede...
An important advantage of CF and CS grammars is that parse trees they produce are human readable descriptors. In RNA modeling, the shape of parse trees can be used for secondary structure prediction (Dowell and Eddy, 2004 . In protein modeling, it was suggested that the shape of parse trees corresponds to protein spati...
1.2 Grammar estimation with structural constraints In this piece of research the focus is on learning probabilistic context-free grammars (PCFG) (Booth, 1969 . Learning PCFG consists in estimating the unfixed parameters of the grammar with the aim of concentrating probability mass from the entire space of possible sequ...
The training sample can be made of a set of sequences or a set of syntactic trees. In the former case, all derivations for each sentence are considered valid. Given the underlying non-probabilistic CFG, probabilities of rules can be estimated from sentences in the classical Expectation Maximization framework (e.g. the ...
Much more information about the language is conveyed in the syntactic trees. If available, a set of trees (a treebank) can be directly used to learn a PCFG (Charniak, 1996 . Usability of structural information is highlighted with the result showing that a large class of non-probabilistic CFG can be learnt using unlabel...
1.3 Protein contact constraints To our knowledge constrained sets of syntactic trees have never been applied for estimating PCFG for proteins. In this research we propose to use spatial contacts between amino acids distant in sequence as a source of constraints. Indeed, an interaction between amino acids, which forms a...
Currently, reasonably reliable contact maps can also be obtained computationally from large collective alignments of evolutionary related sequences. The rationale for the contact prediction is that if amino acids at a pair of positions in the alignment interact then a mutation at one position of the pair often requires...
1.4 Structure of the document The rest of the document is organized as follows. Section introduces the main contribution of this work. First, a novel PCFG-CM framework for learning PCFG with the Contact-Map constraints is established, for which the maximum-likelihood and contrastive estimators are defined (section 2.1 ...
Methods 2.1 General model 2.1.1 Basic notations Let [MATH] be a non-empty finite set of atomic symbol (representing for instance amino acid species). The set of all finite strings over this alphabet is denoted by [MATH] . Let [MATH] denote the length of a string [MATH] . The set of all strings of length [MATH] is denot...
Unlabeled syntactic tree An unlabeled syntactic tree (UST) [MATH] for [MATH] is an ordered rooted tree such that the leaf nodes are labeled by [MATH] , which is denoted as [MATH] , and the non-leaf nodes are unlabeled. Let [MATH] denotes the set of all USTs that yield a sequence in [MATH] , let [MATH] , where [MATH] is...
Context-free grammar A context-free grammar (CFG) is a quadruple [MATH] , where [MATH] is defined as above, [MATH] is a finite set of non-terminal symbols (also called variables) disjoint from [MATH] [MATH] is a special start symbol, and [MATH] is a finite set of rules rewriting from variables into strings of variables...
Probabilistic context-free grammar A probabilistic context-free grammar (PCFG) is a quintuple [MATH] , where [MATH] is a finite set of probabilities of rules: [MATH] , setting for each rule [MATH] its probability to be chosen to rewrite [MATH] with respect to other rules rewriting [MATH] (such that [MATH] ). Let PCFG [...
[EQUATION] [MATH] is said to be consistent when it defines probability distribution over [MATH] [EQUATION] The probability of sequence [MATH] given [MATH] is:
[EQUATION] and the probability of UST [MATH] given [MATH] is: [EQUATION] Since [MATH] and [MATH] define each a partition of [MATH] for [MATH] and for [MATH] , a consistent grammar [MATH] defines also a probability distribution over [MATH] and [MATH]
2.1.2 Contact constraints Most proteins sequences fold into complex spatial structures. Two amino acids at positions [MATH] and [MATH] in the sequence [MATH] are said to be in contact if distance between their coordinates in spatial structure [MATH] is below a given threshold [MATH] . A full contact map for a protein o...
For a contact map [MATH] of length [MATH] , let [MATH] denotes the subset of [MATH] consistent with [MATH] , and [MATH] denotes the subset of [MATH] consistent with [MATH] . Note that [MATH] . Analogous notations apply to parse trees.
2.1.3 Estimation Learning grammar [MATH] can be seen as estimating the unfixed parameters of [MATH] with the aim of concentrating probability mass from the entire space of unlabeled syntactic trees [MATH] to the set of unlabeled syntactic trees for the target population [MATH] . In practice, only a sample of the target...
Maximum likelihood grammar Let [MATH] be a sample set of sequences in [MATH] , and let [MATH] be a set of corresponding contact matrices. The sample set [MATH] consists of a set of tuples [MATH] , where [MATH] and [MATH] . Let [MATH] be the corresponding set of compatible USTs:
[EQUATION] Grammar [MATH] that concentrates probability mass on [MATH] can be estimated using the classical Bayesian approach: [EQUATION]
Noting that [MATH] does not influence the result and, in the lack of prior knowledge, assuming [MATH] uniformly distributed among all [MATH] , the solution is then given by the maximum likelihood formula:
[EQUATION] Assuming independence of [MATH] s: [EQUATION] In the absence of contact constraints the maximization problem becomes equivalent to the standard problem of estimating grammar [MATH] given the sample [MATH]
[EQUATION] where [MATH] denotes a square null matrix of size equal to the length of the corresponding sequence, and [MATH] Contrastive estimation
Often it is reasonable to expect that [MATH] comes from a neighbourhood of the target population [MATH] . In such cases it is practical to perform contrastive estimation
(Smith and Eisner, 2005 , which aims at concentrating probability mass distributed by the grammar from the neighbourhood of the of sample [MATH] to the sample itself [MATH] , such that:
[EQUATION] Consider two interesting neighbourhoods. First, assume that contact map [MATH] is known and conserved in the target population and hence in the sample: [MATH] . This implies the same length [MATH] of all sequences. Then [MATH] is a reasonable neighbourhood of the target population, so
[EQUATION] Second, assume that sequence [MATH] is known to be yielded by the target population and the goal is to maximize likelihood that shapes of parse trees generated with [MATH] are consistent with contact map [MATH] . Then [MATH] is a reasonable neighbourhood of the sample [MATH] , so
[EQUATION] 2.2 Simple(r) instance 2.2.1 Definitions Let [MATH] be a probabilistic context-free grammar such that [MATH] [MATH] , and
[EQUATION] Subsets [MATH] [MATH] and [MATH] are referred to as lexical branching , and contact rules, respectively. Joint subset [MATH] is referred to as structural rules.
Let [MATH] be a contact matrix compatible with the context-free grammar, i.e. no pair of positions in contact overlaps nor crosses boundaries of other pairs in contact (though pairs can be nested one in another):
[EQUATION] where [MATH] denotes the exclusive disjunction, and positions in contact are separated from each other by at least 2:
[EQUATION] Let distance threshold in tree [MATH] . Then a complete parse tree [MATH] [MATH] is consistent with [MATH] only if for all [MATH] derivation
[EQUATION] is performed with a string of production rules [EQUATION] where [MATH] [MATH] and [MATH] 2.2.2 Parsing Given an input sequence [MATH] of length [MATH] and a grammar [MATH] [MATH] can be calculated in [MATH] by a slightly modified probabilistic Cocke-Kasami-Younger bottom-up chart parser (Cocke, 1969 ; Kasami...
New extended version of the algorithm (Fig. ) computes [MATH] , i.e. it considers only parse trees [MATH] which are consistent with [MATH] . To this goal it uses an additional table [MATH] of dimensions [MATH] . After completing [MATH] (lines 10-12), probabilities of assigning lexical non-terminals [MATH] at positions ...
2.2.3 Calculating [MATH] This section shows effective computing [MATH] , which is denominator for the contrastive estimation of [MATH] (cf. section 2.1.3 ). Given a sequence [MATH] of length [MATH] , a corresponding matrix [MATH] of size [MATH] and a grammar [MATH] the probability of a set of trees consistent with [MAT...
[EQUATION] Given grammar [MATH] , any complete derivation [MATH] is a composition [MATH] , where [MATH] and [MATH] . Let [MATH] be a parse tree corresponding to derivation [MATH] , and let [MATH] be an incomplete parse tree corresponding to derivation [MATH] . Note that for any [MATH] corresponding to [MATH] there exis...
[EQUATION] Note that value of the expression will not change if the second summation is over [MATH] since [MATH] . Combining with observation that [MATH] does not depend on [MATH] , the expression can be therefore rewritten as:
[EQUATION] However, if [MATH] is proper , then [MATH] , as: [EQUATION] [EQUATION] where [MATH] . Since [MATH] is proper then [MATH] and therefore the entire formula evaluates to 1, which can be easily shown by iterative regrouping. This leads to the final formula:
[EQUATION] Technically, [MATH] can be readily calculated by the bottom-up chart parser by setting [MATH] 2.3 Evaluation 2.3.1 Learning
The present PCFG-CM approach was evaluated in practice for grammatical models [MATH] and [MATH] (the same grammar but without the contact rules) using an on-site framework for learning rule probabilities (Dyrka and Nebel, 2009 ; Dyrka et al., 2013 . Given an underlying CFG [MATH] , the framework estimates rule probabil...
The input non-probabilistic grammar [MATH] consisted of an alphabet of twenty terminal symbols representing amino acid species [EQUATION]
a set of non-terminals symbols [MATH] , where [MATH] and [MATH] , and a set of rules [MATH] , which consisted of all possible allowed combinations of symbols, hence [MATH] . The set of non-contact rules was identical to the standard grammar in (Dyrka and Nebel, 2009 . The number of non-terminal symbols was limited to a...
2.3.2 Performance measures Performance of grammars was evaluated using a variant of the [MATH] -‐fold Cross‐-Validation scheme in which [MATH] parts are used for training, [MATH] part is used for validation and parameter selection, and [MATH] part is used for the final testing and reporting results. Negative set was no...
In order to avoid composition bias, proteins in the test sample were scored against the null model (encoded as a unigram), which assumed global average frequencies of amino acids, no contact information, and the sequence length of the protein. The amino acid frequencies were obtained using the online ProtScale tool for...
Discriminative performance Grammars were assessed on the basis of the average precision (AP) in the recall-precision curve (RPC). The advantage of RPC over the more common Receiver Operating Characteristic (ROC) is robustness to unbalanced samples where negative data is much more numerous than positive data (Davis and ...