# The Features of Building a Portfolio of Trading Strategies Using the SAS OPTMODEL Procedure

^{1}

^{2}

^{3}

^{4}

^{*}

Previous Article in Journal

Department of Applied Informatics, Institute of Telecommunications and Global Information Space of the National Academy of Sciences of Ukraine, 03186 Kyiv, Ukraine

Institute for Applied System Analysis, National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute”, 03056 Kyiv, Ukraine

Department of Computer Systems and Networks, Faculty of Information Technologies, National University of Life and Environmental Sciences of Ukraine, 03041 Kyiv, Ukraine

Department of Computer Science, Information and Communication Technologies, Faculty of Physics, Mathematics and Informatics, Pavlo Tychyna Uman State Pedagogical University, 20301 Uman, Ukraine

Author to whom correspondence should be addressed.

Academic Editors: Demos T. Tsahalis and Ali Cemal Benim

Received: 26 April 2021
/
Revised: 28 June 2021
/
Accepted: 2 July 2021
/
Published: 6 July 2021

(This article belongs to the Section Computational Engineering)

The article describes the original information technology of the algorithmic trading, designed to solve the problem of forming the optimal portfolio of trade strategies. The methodology of robust optimization, using the Ledoit–Wolf shrinkage method for obtaining stable estimates of the covariance matrix of algorithmic strategies, was used for the formation of a portfolio of trade strategies. The corresponding software was implemented by SAS OPTMODEL Procedure. The paper deals with a portfolio of trade strategies built for highly-profitable, but also highly risky financial tools—cryptocurrencies. Available bitcoin assets were divided into a corresponding proportion for each of the recommended portfolio strategies, and during the selected period (one calendar month) were used for this research. The portfolio of trade strategies is rebuilt at the end of the period (every month) based on the results of trade during the period, in accordance with the conditions of risk minimizing or income maximizing. Trading strategies work in parallel, being in a state of waiting for a relevant trading signal. Strategies can be changed by moving the parameters in accordance with the current state of the financial market, removed if ineffective, and replaced where necessary. The efficiency of using a robust decision-making method in the context of uncertainty regarding cryptocurrency trading was confirmed by the results of real trading for the Bitcoin/Dollar pair. Implementation of the offered information technology in electronic trading systems will allow risk reduction as a result of making incorrect decisions or delays in making decisions in a systemic trading.

Prospects for the use of cryptocurrencies as tools of the financial market today are irrefutable [1,2,3,4,5,6,7]. Scientists at the Singapore University [6] focus particular attention to the investment opportunities of cryptocurrencies, studying historical data sets of bitcoin prices and the profitability and riskiness of a diversified portfolio, which also includes cryptocurrency [7,8,9,10]. They believe that the inclusion of cryptocurrencies in the traditional asset portfolio does not significantly increase its profitability, and it is important for the investor to estimate the riskiness (risk factors) and profitability of investing before making investment commitments. Cryptocurrency volatility, to their mind [11,12], is more related to the attitude of the potential investors than to fundamental indexes. Perhaps it is logical that cryptocurrencies with a high attitude of investors [13], as a rule, tend to have an inflated price, so the rational investors will buy cryptocurrency to earn extra income in the future. However, the issue is how long the process of correcting the strategy will be, and how much time should be spent on processing transactions. Therefore, it is also necessary to study the change in the attitudes of the rational investors towards buying and selling, and subsequent investment policy in relation to different cryptocurrencies, to determine how quickly they will be able to correct pricing [14,15,16,17,18,19].

It is necessary to support the opinion of experts [12,17,18,19,20] that the intensification of cryptocurrency trading is directly related to the problems of price dynamics [11,12], pricing, and behavioral aspects of the participants of the financial market regarding investing in cryptocurrencies [21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40], which researchers should study, identify, and try to predict risks [41,42] and reduce their negative consequences.

The theory of the Markowitz portfolio [43,44,45] does not lose relevance for the cryptocurrency market. However, significant volatility of the cryptocurrency market during long periods of time limits the usage of Markowitz’s theory of forming the optimal portfolio based on the historical data sets of the cryptocurrency rate. As [46] notes, the increase in standard deviation may be connected with the appearance of “bubbles”. Therefore, some researchers [46] focus on the detection of cryptocurrency “bubbles”, which is of fundamental importance. However, research related to the problem of investment risks hedging, taking into account the current situation in the cryptocurrency market, has become more demanding. The problem of forming an optimal portfolio takes on a new significance [44,45,46,47,48].

Thus, Greek scientists [2] note that cryptocurrencies should be effectively used in the composition of the investment portfolio. Such an approach significantly reduces the risk of investing.

Researchers [10] consider the formation of the investment portfolio exclusively from cryptocurrencies, others [9] suggest using cryptocurrency as a hedging asset. However, active introduction of algorithmic trade in the financial market changes approaches to the use of portfolio theory.

Algorithmic strategies [47,48,49,50] are actively used in the cryptocurrency market, operated, not by portfolios consisting of separate financial tools, but portfolios of trading strategies. Such systems are widely described in the literature. As [43,45] note, the advantage of such an approach is that it avoids the influence of the human factor, in particular, due to the fact that decision-making regarding buying and selling in such systems is based on a certain set of rules. Sets of such rules are mainly based on the basis of technical analysis [25]. Unfortunately, such trading systems have a significant default: the algorithm must generate a significant number of trading strategies to be able to be the first to identify the emergence of new tendencies in the market and to be ahead of other participants. The problem of efficient management of the investment strategies portfolio arises at this stage. Considerably high requirements concerning the possibilities of constant improvement, riskiness, and profitability to the formation of such portfolios designed for cryptocurrency trading are imposed [43,44,45,46,47,48,49,50,51,52,53,54,55,56,57]. Taking into account that high-frequency trading (HFT) [58] trading systems become the most common variant of algorithmic trading in the cryptocurrency market, there are specific risks which should be taken into account when forming portfolios of trading strategies. These are operational risks, risks of a sharp leap of volatility, liquidity outflow, possibilities of pricing manipulation, reduction in market predictability, etc.

Therefore, traditional approaches to the formation of an investment portfolio may not be effective [43,56,57]; in addition, most common traders are not able to compete with powerful trading robots used in algorithmic trading by large market participants. Under such conditions, the development and adaptation to the practical application of the methods for forming and optimizing portfolios of trading strategies and portfolios of financial tools adapted to the conditions of the modern market is an urgent issue.

The novelty of this research is to optimize the methods for modeling a portfolio of trading strategies based on income and risk indicators in the conditions of the limited investment resources. The advantages of the offered method are the building of a robust portfolio of trading strategies, which works effectively in the cryptocurrency market, and developed software can be used both separately and in the structure of the trading system. The offered method allows ensuring flexibility in the formation of a portfolio of trading strategies, in particular, the variants of building a portfolio are considered: profitability maximization at a fixed risk value and risk minimization at a fixed profitability value. It should be noted that such an approach provides the best decision in terms of ensuring the profitability of a strategies portfolio. In addition, according to the offered approach, it is assumed that input data may have gaps, discharges, errors, etc.

Therefore, the study of the necessity for preliminary data processing was performed, and the method of gaps processing was proposed. SAS Institute software, including the OPTMODEL [51] procedure, allows us to solve the tasks of linear and nonlinear programming, to build models and produce a suitable algorithm, and to perform multithreading and parallel calculations that creates prerequisites for further improvement of the developed software to implement the algorithm for building a robust portfolio of strategies being used. Approbation of the developed method in trading systems intended for cryptocurrency trading showed acceptable profitability and risk results—the profitability of the portfolio of trading strategies for the BTC-USD pair was provided to 5.3% per month.

Information technology which implements the concept of the formation of a portfolio of algorithmic strategies in the cryptocurrency market characterizing by the use of robust optimization and use of the Ledoit-Wolf shrinkage method for obtaining stable estimates of the covariance matrix of algorithmic strategies is presented in this paper. Implementation of the offered information technology in electronic trading systems will reduce the risks of losses from making incorrect decisions or/and investment decisions making out-of-time in the cryptocurrency market. SAS Institute software, including OPTMODEL procedure, to implement the algorithm for building a portfolio of strategies was used.

A thorough literature review devoted to the problems of constructing cryptocurrency portfolios, developing the trade strategies for cryptocurrency trading, and forming the portfolio strategies for algorithmic trading, is given in [54,55]. This is why this study considers only some special features of modern instruments’ applications in automatizing the portfolio strategies constructing directed to cryptocurrency trading in the algorithmic trading systems.

In spite of the fact that there exists an active discussion regarding the possibility of application the Markowitz portfolio in the cryptocurrency market, it should be agreed that it can be used, though with adaptation to this specific segment of the financial market. As it is noted in [59], taking into consideration the fact that the cryptocurrency market is nonstationary and unbalanced, with preserving its general structure, the problem of portfolio optimization takes another sense due to the fact that its parameters acquire new meaning.

That is, the optimization problem statement is performed using the information concept. With such approach, an investor who is constructing the portfolio (regarding trading strategies or separate financial instruments) at the cryptocurrency market solves the following optimization problem [59]:
where ${\widehat{R}}_{t}^{T}$—is effectiveness forecast with known information y(t), V_{e}—is covariance matrix, x—is expected vector of capital distribution between the portfolio components, y(t)—is a set of information, for the moment t, I—is a unity column-matrix, and t ≤ T—denotes the time restrictions.

$$\underset{x}{\mathrm{max}}\left\{{\widehat{R}}_{t}^{T}x-\lambda {x}^{T}{V}_{e}x/{I}^{T}x=1,x\ge 0\right\},$$

Thus, in conditions of nonstationary and unbalanced markets, the information about supply and demand for the market players should be taken into consideration, as far as each of them possesses definite information regarding the factors that would influence the decisions regarding buying or selling the cryptocurrency.

Agreeing with [52,59] it should be noted that the optimization problem statement formally completely corresponds to the classic statement, but acquires new content. In contrast to the classic approach, instead of fixed values of mathematical expectation the forecast is considered to depend on the coming information that replaces the effectiveness of the covariance matrix-covariance matrix of forecasting errors. This approach corresponds better to the speculative game at the cryptocurrency market. The comparative characteristic of the portfolio optimization technologies is given in [52].

Thus, it is possible to state that the problem can be also solved as the problem of “naïve” diversification of the trading strategies when the capital is distributed uniformly between all the strategies, as well as in the Markowitz problem when the strategies portfolio structure is formed with the condition of risk minimization for a given level of expected return. The problem of forming the portfolio is considered for a one time period only, and for each of the following periods the problem is solved anew, and the portfolio is reconstructed. The income of the Markowitz optimal portfolio is sensitive to the return estimate errors, especially to the errors that exhibit “heavy tail” distributions and errors in data. That is why an important problem to be solved when constructing the portfolio is providing high quality input data, their appropriate preliminary processing.

The study proposes the use of a robust optimal portfolio. An advantage of the approach is that even in the “worst” case of portfolio return realization and its covariance matrix, the portfolio still satisfies the investor restrictions. That is, the robust portfolio provides for maximum return when risk is restricted, and it is less sensitive to input data and influence of the random factors. Thus, the acceptable robust portfolio is formed first. There can be several such portfolios, and at the next stage the best one is selected from them exhibiting the best value of the goal function. It means that at the definite moment it will be necessary to form the trading strategies portfolio that will be effective within the time interval [t, ts]. This is the interval of time between trading signals generated by the technical analysis means at the financial market. To optimize the portfolio trading strategy choice, the following approaches can be used.

The first approach to optimizing portfolio selection is to maximize profitability at a fixed risk value. The main goal is to increase profitability. The measure of risk is understood and used as a measure of dispersion and covariance of profitability of trading strategies on the Bitfinex [60] exchange, at which the maximum profit is achieved.

The function of profit maximization, in this formulation of the problem, has the form of (2):
where x_{j}—is a proportion of asset j, r_{j}—is the expected profitability of the asset j, and n—is the number of types of financial assets in the portfolio.

$$\sum _{j=1}^{n}{r}_{j}\cdot {x}_{j}\to}maximize\text{}(\_),$$

Limitation:

- Fixed amount of risk-admissible losses of the strategies portfolio:$$\sum _{i=1}^{n}{\displaystyle \sum _{j=1}^{n}{x}_{i}\cdot {\sigma}_{ij}\cdot {x}_{j}=Risk}},$$
_{j}—is a proportion of asset j, x_{i}—is a proportion of asset j, σ_{ij}—is a value of covariance between assets i and j, and n is the number of types of financial assets in the portfolio. - The sum of all proportions of investments in strategies does not exceed one (i.e., 100%).$$\sum _{j=1}^{n}{x}_{j}=1},$$
_{j}—is a proportion of asset j, r_{j}—is the expected profitability of the asset j, and n—is the number of types of financial assets in the portfolio. - The proportion of investments in each portfolio strategy cannot be negative:$${x}_{1}\ge 0,\text{}\dots ,\text{}{x}_{n}\ge 0$$

In this case, the problem to be solved belongs to the class of nonlinear programming problems as the constraint function is a polynomial of the second degree.

The second approach to optimizing portfolio selection is to minimize risk at a fixed rate of profitability. The main goal is to minimize the risk, and at the same time to achieve the preliminarily expected profit R.

The function of risk minimization, in this problem statement, has the form of:
where x_{j}—is a proportion of asset j, r_{j}—is the expected profitability of the asset j, σ_{ij}—is a value of covariance between assets i and j, and n—is the number of types of financial assets in the portfolio.

$$\sum _{i=1}^{n}{\displaystyle \sum _{j=1}^{n}{x}_{i}\cdot {\sigma}_{ij}\cdot {x}_{j}\to}}minimize,$$

Limitation:

- Fixed amount of profitability by the strategies portfolio must be not less than the profit R.$$\sum _{j=1}^{n}{r}_{j}\cdot {x}_{j}\ge R$$
_{j}—is a proportion of asset j, r_{j}—is the expected profitability of the asset j, and n—is the number of types of financial assets in the portfolio. - The sum of all proportions of investments in strategies does not exceed one (i.e., 100%).$$\sum _{j=1}^{n}{x}_{j}=1$$
_{j}—is a proportion of asset j and n is the number of types of financial assets in the portfolio. - The proportion of investments in each portfolio strategy cannot be negative:$${x}_{1}\ge 0,\text{}\dots ,\text{}{x}_{n}\ge 0$$

In this case, the problem to be solved belongs to the class of quadratic programming problems as the target function is a polynomial of the second degree.

The strategies of algorithmic trade are functioning under control of the alpha-factors that process trading signals, forecast future cost of stocks, estimate possible return (risk of return), and generate “input–output” signals that result in deploying orders for buying or selling. At the same time, the diversity of a trading strategies portfolio can be rather high, up to several thousand. In such a portfolio, the return risks for separate strategies are interacting with one another so as to provide an appropriate profile of risk (return) for the whole portfolio of trading strategies. In turn, some strategies can be used by several trading algorithms, including their recursive constructions.

It should be noted that systemic trade at the cryptomarket requires and actively uses new automatized trading systems. Additionally, such innovation process is taking place practically without interruption. The primary reason for this is the rather fast adaptation of the market to the new trading strategies. The information effectiveness of the market is substantially decreasing, and it loses its capability to generate income. That is why an urgent problem is to create the methodologies providing possibilities for adaptation of the trading strategies and accept new rules.

To solve the problem of creating new trading strategy portfolios for cryptocurrencies, this study proposes the implementation of the robust portfolio using the procedure of SAS OPTMODEL. The OPTMODEL procedure supports the language of optimization modeling which contains special syntax; the language constructions allow for representing the problems clearly and effectively. This approach simplifies initial model constructing, and their subsequent modification and use with changing data. This is an especially important feature for solving the problem stated in this study, as it is proposes disseminating the methods of models constructing to solve similar problems, including alternative scenarios. The advantages of the OPTMODEL procedure that, in its turn, provide for advantages of portfolio constructing are as follows [49,51]:

When solving the problem of constructing the portfolio of strategies for algorithmic trade with cryptocurrency, the following possibilities of the OPTMODEL language were used: constructing forecasting models for cryptocurrency price, and call of appropriate trading algorithm while reformatting the strategy portfolio. It is supposed that, during trading sessions, several alternative trading algorithms that are available in the portfolio are functioning, and are responsible for the implementation of different trading strategies, the number of which can reach several thousand.

Thanks to implementing the shrinkage estimator of Ledoit and Wolf [61,62] into the OPTMODEL procedure, the robust portfolio was created for a substantial number of algorithmic trading strategies.

Aside from the other potential possibilities of the OPTMODEL procedure, the “Multistart” is significant. It provides multiple solutions of nonlinear optimization problems, using various initial conditions, to find the global extreme, which is used for the operative re-forming of the portfolio strategies, to select the best one for a current situation and to follow the market signals that are generated by the technical analysis indicators. The development supposes the forecasting of currency prices that are contained in the portfolio using a multi-model approach, as well as the methods of structural and parametric adaptation presented in the studies [52,53,54,55,56,57,58,63].

The development presented is also distinguished with the possibility of forming the portfolio of trading strategies by making use of the Multistart model. PROC OPTMODEL has a Multistart model that is designed to solve nonlinear programming problems with multiple local maxima or minima.

In addition, the proposed approach to forming the trading strategy portfolio for cryptocurrency implements the following advantages of the PROC OPTMODEL:

- the possibility for formulating the models in intuitively understandable way;
- support of explicit usage of the standard SAS functions;
- direct call of linear, nonlinear, quadratic, and mixed-integer-number algorithms for the solution search algorithms;
- support of fast prototyping for the user optimization algorithms including authorized problems;
- the possibility for executing other SAS codes inside of PROC OPTMODEL using the SUBMIT block;
- the algorithms for solving nonlinear optimization problems, including the method of inner point with confidence region and linear search, the method of active set, and the possibility for Multistart;
- quadratic nonlinear optimization with a new solution algorithm for specific large-scale optimization;
- multiflow execution of the process being used;
- conditional optimization with support of planning and resource distribution.

Software implementation of the offered method was performed in the environment of SAS Enterprise Guide 7.1 using the SAS Base programming language and a specialized language of optimization modeling of OPTMODEL, designed to build models and use appropriate algorithms for solving optimization problems.

The task of forming a portfolio of cryptocurrency trading strategies can be formulated as follows: to make a decision regarding the implementation of a particular trading strategy, which is part of a portfolio, at a moment of time determined on the basis of analysis of trading signals, estimating the profitability of various strategies, and forecasting cryptocurrency behavior.

Taking into account the complexity of this task, its solution involves the implementation of several steps. Accordingly, the software implementation provides a multi-module architecture of application.

The first step is to forecast the cryptocurrency behavior. At this stage, a system of data collection from exchanges (mainly Bitfinex, Bitstamp, Huobi, Binance, and others) based on the API interface is used. Databases implemented on different platforms, such as MySQL, PostgreSQL, and others, are used to store the collected structured data. Data obtained from exchanges require pre-processing, in particular detection of anomalous values or gaps, etc. Preliminary analysis and processing of such data is performed in a dialog mode, as is required. Filling in the missing values is one of the problematic issues to be solved at this stage. Missing values are obligatorily present in the data series obtained from the exchange. This is due to the specifics of the computer systems. Observations show that many of the situations where in a considerable part of the data has a gap occur when the intensity of trading on the stock exchange is very high. In such cases, the reason for the information loss is that the main focus during the operation of the exchange is focused on servicing applications for buying and selling, rather than storing information about the issued orders. There are also failures in the accumulation of information on the part of the trader, which is especially true for companies that create their own databases for storing information from different exchanges by their own efforts. Another reason for data gaps may be system failures caused by various attacks on elements of the exchange, including cyberattacks. The problem of changing the API should be mentioned separately, about which users usually find out only after it happens, i.e., after some time, when it becomes known that the information about orders and transactions has not been received.

All factors mentioned had different effects on the number and frequency of gap formation in the time series of exchange data on bitcoin trading [64]. In the case of cryptocurrencies, the gap was the percentage of minutes for which there was no information within the corresponding hourly, or daily, session, or sometimes the interval of another specified duration.

In this research, missing data was analyzed for various time intervals and for various percentages of their availability in the time series for bitcoin prices.

The study of the efficiency of the developed system was performed using a set of data on transactions concerning buying and selling of cryptocurrency consisting of 957,510 lines, each of which contained aggregated information for every 15 s of the exchange work for the period from 24 June 2018 to 18 December 2018.

Aggregated information contained such elements as a timestamp in the format of day-month-year-hour-minute-second (DateTime), a planned offer price of one bitcoin (Bid), the total turnover on the exchange for 15 s (Aggregated_tick_volume), and the number of transactions on the exchange for every 15 s of its work (Trades_count).

The mentioned data sets are updated, if possible, every 15 s automatically, as the exchange receives transaction data on transactions (if there are no technical problems in the information sharing with the exchange). A 15 s time frame is defined as optimal for the study as:

- information sharing between the trading robot and the exchange takes place with a certain delay, the duration of which is determined by many technical parameters of the computer network, but not exceeding 15 s; the time that, as shown by our experiments in 2015–2018, experiments are sufficient to process agreements on the buying and selling of cryptocurrency;
- storing of aggregate indicators, in contrast to transactional agreements, allows us to speed up the performing of necessary calculations, which in turn saves computing resources, as well as the time required for decision making.

The data set, built on 15 s time intervals, can be aggregated to the analytical table of any other time frame, for example, 5, 10, 15, or 30 min, or 1, 4, 6, or 8 h, etc. Taking into account the results of numerical experiments on models developing and testing the work of trading strategy conducted at 15, 30, and 60 min time intervals, the results obtained using a data set based on aggregated to a 4 h frame of 15 s aggregate sets of exchange data were revealed optimal. Another advantage of using data aggregated on a 4 h frame in the forecasting modeling was the ability to track the work of a trading robot, not every minute, but once every few hours.

The formation of gaps was studied at different time intervals and for different percentages of their presence in the time series of the bitcoin price.

A numerical experiment to substantiate the method of filling in the gaps was conducted; its essence is as follows. For example, there were 30 unfilled minute values out of 60, corresponding to 50% of time frame gaps for the hour interval from 15:00 to 16:00 on 1 July 2018, and there were 144 unfilled minute frames out of 1440, corresponding to 10% of the gaps of the daily frame on the same time interval on 15 July 2018. The results of the study of the periodicity of the data gaps formation are presented in Table 1. The values indicated in the table show the percentage of time intervals of the corresponding time frame, during which incomplete data were obtained (Table 1).

As can be seen from Table 1, 7.23% of time intervals contained from 80 to 100% of gaps on the hour frame, and 4.99% of time intervals contained from 50 to 80% of gaps. However, the percentage of gaps was 5.74% and 4.92%, respectively, at daily intervals.

Despite the fact that the problem of filling in the gaps is one of the most studied, and there are many methods of filling in the gaps in time series of indicators, of different natures, with different number of gaps, etc., each method is focused on solving a certain group of problems and has its own specific application.

In particular, gaps in the tasks of forecasting the price or trading volume of financial tools can be filled with data on the price of the same asset in the same period of time obtained from another exchange. Another fairly common method is to fill in the gaps with averages calculated as the arithmetic mean of the known previous and next missing values. Such methods should be used with a small number of missing values, when there are no serial data gaps in the time series. If there are series of gaps, the method of filling them by forecasting the missing values using mathematical modeling is used. After conducting a series of experiments using a large number of different methods, we concluded that it is best to use exponential smoothing methods to fill in the gaps in the time series of data concerning cryptocurrency trading.

Table 2 presents comparison of the forecasting results of the trading volumes of the currency pair of BTC-USD after applying different methods of exponential smoothing for filling in the gaps in the time series. The value of root-mean-square deviation (RMSE) on hourly and daily frames as a criterion for comparing the results of forecasting modeling was used.

According to Table 2, the best result was obtained by applying exponential smoothing with a dump trend for filling in the gaps in the time series of these models.

Taking into account the obtained results, the following approach for the forecasting of the volumes of the cryptocurrency trading within the relevant time interval, on the basis of time series containing data gaps, is offered:

(1) to calculate the number of minutes for the period of time in which there is data on the forecasting financial tool by the formula of (10):
where I(t) = 1, if the value of the series is filled for the corresponding t-minute frame, otherwise I(t) = 0.

$$Indicator\text{}60={\sum}_{t=1}^{60}I(t),$$

(2) to calculate the total value of the studied indicator for the hourly time frame based on the available minute frames (11):
where Volume (t) is a value of the indicator of the minute frame t.

$$Volume\text{}60={\sum}_{t=1}^{60}Volume\text{}(t)$$

(3) to calculate the adjusted value of the studied indicator for the corresponding time frame (12):

$$Volume\_bias\_60=Volume\text{}60\cdot \frac{60}{Indicator60},$$

A similar approach was used for other time frames, only the basis for calculations was used not equal to 60, but to the actual value. For example, it was 240 for four-hour frames.

Numerical experiments according to the method offered in this study were performed for a long time—in the period from 1 January 2015 to 31 December 2018. The method was adjusted at each stage of the study, so the examples showed only the final results obtained in 2018.

The analytical table for the construction of mathematical models included the following indicators (13):
where Price (t − k) is the value of Price in the previous k, i.e., moment of time.

Price_{k} = Price (t − k),

In general terms, the formula for predicting the price of bitcoin four hours ahead can be represented as a regression Equation (14):
where a_{0}—is the intercept parameter, which corresponds to the value of the response variable when the all predictors is 0; a_{k} —is the slope parameter, which corresponds to the magnitude of change in the response variable given a one unit change in the predictor variable Price(t − k); b_{m}—is the slope parameter, which corresponds to the magnitude of change in the response variable given a one unit change in the predictor variable Amount_{k}; c_{m}—is the slope parameter, which corresponds to the magnitude of change in the response variable given a one unit change in the predictor variable Volume_{k}, k = 1,…, 12; Amount_{k}—is the total turnover on the stock exchange for the previous k hours, where k = 16, 32, 48, 64, 72, 80, and 96 USD; Volume_{k}—is the total turnover on the stock exchange for the previous k hours, where k = 16, 32, 48, 64, 72, 80, and 96 bitcoins; and m = {16, 32, 48, 64, 72, 80, 96}.

$$Price(t+4)={a}_{0}+{\displaystyle \sum _{k=1}^{12}{a}_{k}}\cdot Price(t-k)+{\displaystyle \sum _{m\in M}{b}_{m}}\cdot Amoun{t}_{k}+{\displaystyle \sum _{m\in M}{c}_{m}\cdot volum{e}_{k}}$$

The following method to forecast the bitcoin rate was offered by the following steps:

Step 1. The size of the training sample (training_window_size), which would be used to build the model, was determined by an automatic search from the minimum, 32 points, to a value of 480 points.

Step 2. The size of the window (sample_size) was specified; it would be used to check the quality of the forecast model. The values of 320 points were used in this study;

Step 3. The forecast on 320 points forward was built for the volume of the training sample (training_window_size) equal to 32 points. Then, the training sample from the elements of Price (t = 1),…, Price (t = 32) was formed; after this, the estimates of the model coefficients were calculated and the forecast on one point forward Price_forecast (t = 33) was built. Then, a training sample from the elements of Price (t = 2),…, Price (t = 33) was created, the estimates of the model coefficients were calculated, and the forecast for the next point forward Price_forecast (t = 34) was built, etc. The process of forming a training sample was performed 320 times, until a forecast of 320 points forward Price (t = 352), on the basis of a training sample of the elements of Price (t = 320),…, Price (t = 351) was obtained.

Step 4. The following was calculated to estimate the quality of each built model:

Root mean square error (RMSE) calculating by the formula of (15) [65]:
where price_forecast (t = n) is the forecast values of the model; price (t = n) is the actual value; and n is the number of observations. Additionally, the Misclassification Rate is the percentage of cases of incorrect forecasting of changes in price direction for estimating the quality of the built models was calculated.

$$RMSE=\sqrt{\frac{1}{n}\cdot {\displaystyle \sum _{i=1}^{n}{(price\_forecast(t=n)-price(t=n))}^{2}}}$$

Step 5. The value of training_window_size was increased by one; Step 3 and Step 4 were repeated until the entire training sample was processed (determined by automatic search from the minimum, 32 points, to a value of 480 points).

Step 6. The best model, which would be used for the forecasting based on the comparison of the calculated indicators of estimation of the models quality, was chosen.

It should be noted that the best forecasts were obtained using different regression models, mainly those taking into account seasonality.

Technical analysis [25] with its figures, oscillators, and indicators also allowed usto analyze and forecast general tendencies in the bitcoin market. Indicators such as MACD (Moving Average Convergence Divergence), RSI (Relative Strength Index), SMA (Simple Moving Averages), and others were often used.

The results of 37 trade agreements, 12 of which were aimed at increasing and 25 at decreasing of the exchange rate in a numerical experiment using the Order Indicator, which acquired the values of (1) trend up, flat (0), and (−1) trend down. The total profitability of cryptocurrency trading was USD 3460, while the average profitability of one transaction was USD 93.

However, trend definition does not solve the problem of confirming or rejecting the hypothesis concerning the choice of trading strategy. In the process of strategy building, there may be situations where there are discrepancies between the trend and the forecasting values. For example, the direction of the upward trend could be determined correctly, but the forecasting rate is higher than the real one. In this case, the trader may lose money if he does not place stop orders below. In the case when the direction of the trend-upward is determined correctly, but the forecasting rate is lower than the real one, the trader will not lose money if he places a stop order at the forecast level, but he also does not receive the expected income. The situation is similar for cases when the direction of the trend is downwards, and the forecasting rate is higher or lower than the real one.

The percentage of erroneous classification for the forecasted trend direction was chosen as the criterion of strategy selection (16):
where SS3_{MISC} is the number of cases of correctly forecasted upward trend; SS3_TP is the upward trend, correctly forecasted; SS3_FN is a forecasted downward trend which turned out to be the upward one; SS3_FP is a forecasted upward trend which turned out to be a downward one; SS3_TN is the downward trend, correctly forecasted; and SS3_MISC is the percentage of erroneous classification, i.e., the percentage of incorrectly forecasted direction of a trend.

$$SS{3}_{MISC}=100-\frac{SS\_3\_TP+SS\_3\_TN}{SS\_3\_TP+SS\_3\_TN+SS\_3\_FP+SS\_3\_FN}\cdot 100$$

The formation of a portfolio of strategies was implemented in four stages.

Stage 1. It should be calculated on the basis of available statistical historical data on the implementation of selected strategies during the month, including:

- the vector of profitability of each of the strategies during the month;
- covariance matrix of profitability change of all strategies.

Stage 2. Strategies with a positive profitability for further analysis should be chosen.

Stage 3. An appropriate investment policy, applying linear constraints of the form, ensuring the sum of the proportions of strategies does not exceed 100% and that each proportion of the strategies should be greater than zero using optimization methods based on the vector of profitability of strategies and covariance matrix, should be formed.

Stage 4. After the formation of investment policy, the available assets are distributed in a certain proportion for each of the recommended strategies, and are used for a month for exchange transactions. At the end of the month, all operations of stages 1–3 are repeated, and recommendations are formed on the optimal investment policy for the next month. The efficiency of the proposed method was tested experimentally.

The covariance matrix, the profitability vector, and the constraints on the expected risk were used in the capacity of the input parameters.

There is an example of the code in OPTMODEL for finding the optimal portfolio of strategies (Algorithm 1).

The represented macro program could work in two regimes: (1) select a portfolio that maximizes expected return while not exceeding a specified risk, or (2) minimizes risk (measured by variance) and achieves a target expected return.

Algorithm 1: MACRO OPT_MODEL. |

MACRO OPT_MODEL; %let LAST=LAST_&&&CURRENCY_PAIR_&i_pair.; %letResult=Result_&&&CURRENCY_PAIR_&i_pair.; %let OUTCORR=OUTCORR_&&&CURRENCY_PAIR_&i_pair.; %let EXPECTED_RETURNS=EXPECTED_RETURNS_&&&CURRENCY_PAIR_&i_pair.; %letCovariance_Matrix=Covariance_Matrix_&&&CURRENCY_PAIR_&i_pair.; %letcode=; data&EXPECTED_RETURNS. (KEEP=NameReturn); set&LAST.; LengthName $18. Return 8; IF profit0 > 0 THEN DO; callsymput(“code”,symget(“code”) !!”diff_”!!TRIM(LEFT(strategy_id))!!” “); Name=“diff_”!!TRIM(LEFT(strategy_id)); Return=profit0; output; END; run; proccorrdata=&Result. noproboutp=&OUTCORR./** storeresults **/ nomiss/** listwisedeletionofmissingvalues **/ cov NOPRINT; /** includecovariances **/ var&code.; run; data&Covariance_Matrix.; set&OutCorr. (rename = (_NAME_=Name) where = (_TYPE_=‘COV’)); keepName &code.; run; /* ------- OPT MODEL ------- */ /* --------- TYPE = 0 ----------------------- */ %IF &TYPE = 0 %THEN %DO; procoptmodel; /* declaresetsandparameters */ set<str> ASSETS; numreturn {ASSETS}; numcovariance {ASSETS, ASSETS}; /* readdatafrom SAS datasets */ readdata&EXPECTED_RETURNS. into ASSETS=[Name] return; readdata&Covariance_Matrix. into [Name] {j in ASSETS} < covariance[Name,j] = col(j)>; /* declarevariables */ varProp {ASSETS} >= 0; /* declareconstraints */ conMy {j in ASSETS}: Prop[j] <= &max_share.; conPortfolio: sum {j in ASSETS} Prop[j] = 1; conVariance: sum {i in ASSETS, j in ASSETS} covariance[i,j] * Prop[i] * Prop[j] <= &expected_risk; /* declareobjective */ maxExpectedReturn = sum {j in ASSETS} return[j] * Prop[j]; solve; print {j in ASSETS: Prop[j] > 1 × 10 ^{−4}} Prop{j in ASSETS: Prop[j] > 1 × 10 ^{−4}} return;printVariance.ubVariance.dual; /* writedatato SAS datasets */ createdatapie_datafrom [Name] = {j in ASSETS: Prop[j] > 1 × 10 ^{−4}}Amount = Prop; quit; run; %END; /* --------- TYPE = 1 ----------------------- */ %IF &TYPE = 1%THEN %DO; procoptmodel; /* declaresetsandparameters */ Set < str > ASSETS; numreturn {ASSETS}; numcovariance {ASSETS, ASSETS}; /* readdatafrom SAS datasets */ readdata&EXPECTED_RETURNS. into ASSETS = [Name] return; readdata&Covariance_Matrix. into [Name] {j in ASSETS} < covariance[Name,j] = col(j)>; /* declarevariables */ varProp {ASSETS} >= 0; /* declareconstraints */ conPortfolio: sum {j in ASSETS} Prop[j] = 1; conMinimum_return: sum {j in ASSETS} return[j] * Prop[j] >= &min_return; /* declareobjective */ minExpectedRisk = sum {i in ASSETS, j in ASSETS} covariance[i,j] * Prop[i] * Prop[j]; solve; print {j in ASSETS: Prop[j] > 1 × 10 ^{−4}} Prop{j in ASSETS: Prop[j] > 1 × 10 ^{−4}} return;printMinimum_return.dual; /* writedatato SAS datasets */ createdatapie_datafrom [Name] = {j in ASSETS: Prop[j] > 1 × 10 ^{−4}}Amount = Prop; quit; run; %END; /* --------- Normalizationresult ----------- */ /* chooseonlystrategieswithappropriateshare */ procsql; createtable pie_data_2 AS selectName, Amount/(sum(Amount)) AsAmountfrom WORK.PIE_DATA; quit; run; data pie_data_3; set pie_data_2; IF Amount >= symgetn(“MIN_SHARE”); RUN; procsql; createtableAmount_Prop_&&&CURRENCY_PAIR_&i_pair. AS selectName, Amount/(sum(Amount)) AsPropformat=Percent8.2 from WORK.pie_data_3; quit; run; dataAmount_Prop_&&&CURRENCY_PAIR_&i_pair.; Formatcurrency_pair $CHAR10.; setAmount_Prop_&&&CURRENCY_PAIR_&i_pair. (Rename = (Name = strategy_id)); currency_pair = “&&&CURRENCY_PAIR_&i_pair.”; run; procprintdata = Amount_Prop_&&&CURRENCY_PAIR_&i_pair.; run; %MEND OPT_MODEL; |

The efficiency of the offered method was tested by an experimental method. The task of developing a method for forming a portfolio of investment strategies for cryptocurrency trading, taking into account its riskiness, and the profitability of individual strategies of which it should consist, was examined. This method was used during the trading of cryptocurrency bitcoin in a pair with US dollars (BTC–USD) on the Bitfinex exchange in the period from 1 July 2018 to 1 April 2019, using 12 strategies which differed by indicators used, their combinations, indexes, and signals from exchanges (Table 3).

Table 4 shows the portfolios which were obtained on the basis of the offered method for each of the studied months.

The use of the offered method allowed getting almost 43 cents of profit per 1 dollar invested in bitcoin after eight months (Table 5).

Table 6 presents the statistical characteristics of the price of bitcoin for the period from July 2018 to April 2019.

Following this strategy, the profitability of “buying and selling” agreements was USD 4900. The net profit after deducting the commission of the exchange for transactions was taken into account when calculating the profitability. In total, during the experiment, 139 trading operations were performed, 57 of which focused on increasing the rate of bitcoin, and 82 on its decreasing; the average profitability of each transaction was USD 35. Additionally, the application of a universal method for the formation of investment strategy for the management of the cryptocurrency portfolio allowed us to ensure the portfolio profitability up to 43% during the eight months.

Thus, the study showed that the offered methods of building the robust portfolio of the trading strategies was universal, flexible and adaptive. The usage of a method of the building the robust portfolio, the multi-model approach in the prognostic modelling of the prices of cryptocurrency, and the preliminary preparation of data allowed us to obtain much better results of profit in the algorithmic trading system. The use of powerful tools such as SAS Enterprise Guide 7.1 make it possible to implement the offered approaches.

This is primarily due to the fact that the cryptocurrency market is characterized by a significant volatility, the presence of uncertainties of various types, nonlinearity, and unsteadiness; however, it attracts investors with the opportunity to receive great incomes. Therefore, the goal of developing a scientifically sound method of forming an effective trading strategy or/and portfolio of the strategies, and its automation, is particularly relevant and has practical significance. Various methods and sets of tools are used to forecast the cryptocurrency rate and to gain income from cryptocurrency trading.

Thus, the performed research showed that the offered method of forming a portfolio of strategies for cryptocurrency trading provided income, even in conditions of risk and uncertainty, and was universal, flexible, and adaptive. The use of a multi-model approach, including for the preliminary preparation of data, allowed us to receive forecasting results better than in many automated trading systems.

The novelty of this research is to optimize the methods for modeling a portfolio of trading strategies based on income and risk indicators in the conditions of the limited investment resources. The advantages of the offered method are the building of a robust portfolio of trading strategies, which works effectively in the cryptocurrency market, and developed software can be used both separately and in the structure of the trading system. The methodology of robust optimization using the Ledoit–Wolf shrinkage method for obtaining stable estimates of the covariance matrix of algorithmic strategies was used for the formation of a portfolio of trade strategies. The corresponding software was implemented by SAS OPTMODEL Procedure. Additionally, the use of powerful instruments of SAS Enterprise Guide 7.1 allowed us to implement the different methods of prognostic modeling and intellectual analysis.

The offered information technology, models, and methods could be useful in a decision making support system designed for use by different groups of potential investors in cryptocurrency. Such a software application will provide use on mobile platforms. In addition, it is expected that the application will be aimed, not only at professional participants of the financial market, but also at investors who do not have the appropriate training and skills in decision making in the conditions of a rapid change in situation in the financial market, when making considered reasonable decisions using only the tools of technical analysis and information from the Internet and the media is virtually impossible.

Therefore, developing the proposed system, that would be flexible and universal and could be used to solve the problems of forecasting the price of various financial tools, not just cryptocurrencies, remains as very important goal. In the future, the offered information technology can be supplemented by the use of the tools of data mining, text analytics, and elements of expert systems.

Conceptualization, O.T. and T.P.-Z.; methodology, O.T. and T.P.-Z.; software, O.T. and V.S.; validation, O.T., T.P.-Z. and V.L.; formal analysis, O.T. and T.P.-Z.; investigation, O.T. and V.S.; resources, O.T.; data curation, V.K.; writing—original draft, T.P.-Z.; writing—review and editing, T.P.-Z. and V.L.; visualization, O.T.; supervision, O.T. and T.P.-Z.; project administration, T.P.-Z.; funding acquisition, O.T., T.P.-Z., V.S., V.L. and V.K. All authors have read and agreed to the published version of the manuscript.

This research received no external funding.

We are extremely grateful to the editor Afra Wang, Academic Editors and anonymous reviewers. Their comments and suggestions signicantly improved the paper. Also, we would like to thank Petro Bidiuk and Harry Richardson for valuable comments, which have resulted in an improved exposition of this paper.

The authors declare no conflict of interest.

- Cryptocurrency: Growth Trends & Industry Performance. Available online: https://investmentbank.com/crypto-growth/ (accessed on 4 July 2021).
- Anyfantaki, S.; Arvanitis, S.; Topaloglou, N. Diversification, Integration and Cryptocurrency Market; Working Paper 244; Bank of Greece: Athens, Greece, 2018; Available online: https://ideas.repec.org/p/bog/wpaper/244.html (accessed on 4 July 2021).
- Budish, E. The Economic Limits of Bitcoin and the Blockchain. Econ. Limits Bitcoin Blockchain
**2018**, 6, 1–22. [Google Scholar] - Wójcik, D.; Ioannou, S. COVID-19 and finance: Market developments so far and potential impacts on the finan-cial sector and centres. J. Econ. Hum. Geogr.
**2020**, 111, 387–400. [Google Scholar] [CrossRef] - Gandal, N.; Hamrick, J.; Moore, T.; Oberman, T. Price manipulation in the Bitcoin ecosystem. J. Monet. Econ.
**2018**, 95, 86–96. [Google Scholar] [CrossRef] - Chuen, D.L.K.; Guo, L.; Wang, Y. Cryptocurrency: A New Investment Opportunity? J. Altern. Investig.
**2017**, 20, 16–40. [Google Scholar] [CrossRef] - Exploring the Diversification Benefits with Bitcoin. Available online: https://research.binance.com/en/analysis/bitcoin-diversification-benefits (accessed on 20 December 2020).
- Kajtazi, A.; Moro, A. Bitcoin, portfolio diversification and Chinese financial markets. SSRN Electron. J.
**2017**, 11, 1–41. [Google Scholar] [CrossRef] - Carpenter, A. Portfolio diversification with bitcoin. J. Undergrad. Res. Financ.
**2016**, 6, 1–27. Available online: https://jurf.org/wp-content/uploads/2017/01/carpenter-andrew-2016.pdf (accessed on 4 July 2021). - Andrianto, Y. The Effect of Cryptocurrency on Investment Portfolio Effectiveness. J. Financ. Account.
**2017**, 5, 229. [Google Scholar] [CrossRef] - Estrada, J.C.S. Analyzing Bitcoin Price Volatility; University of California: Berkeley, CA, USA, 2017; Available online: https://www.econ.berkeley.edu/sites/default/files/Thesis_Julio_Soldevilla.pdf (accessed on 15 October 2020).
- Lee, G.; Joe, D.Y.; Jeong, J. An Investigation of Dynamic Price Movements of the Cryptocurrency Coin in Korea. Asian Rev. Financ. Res.
**2019**, 32, 383–400. [Google Scholar] [CrossRef] - Matzutt, R.; Hiller, J.; Henze, M.; Ziegeldorf, J.H.; Müllmann, D.; Hohlfeld, O.; Wehrle, K. A Quantitative Analysis of the Impact of Arbitrary Blockchain Content on Bitcoin. In Proceedings of the 22nd International Conference, FC 2018, Nieuwpoort, Curaçao, 26 February–2 March 2018; pp. 420–438. [Google Scholar] [CrossRef]
- Kodama, O.; Pichl, L.; Kaizoji, T.; Pichl, L. Regime change and trend prediction for bitcoin time series data. In Proceedings of the CBU International Conference on Innovations in Science and Education, Prague, Czech Republic, 22–24 March 2017; pp. 384–388. [Google Scholar]
- Kaufman, P.J. Trading Systems and Methods, 6th ed.; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2019; 1168p. [Google Scholar]
- Fedotova, G.; Ermakova, A.; Kurazova, D. Setting up an algorithm for stock market trading strategies. Dig. Financ.
**2019**, 24, 180–190. [Google Scholar] [CrossRef] - Jang, H.; Lee, J. An Empirical Study on Modeling and Prediction of Bitcoin Prices With Bayesian Neural Networks Based on Blockchain Information. IEEE Access
**2018**, 6, 5427–5437. [Google Scholar] [CrossRef] - Bohte, R.; Rossini, L. Comparing the Forecasting of Cryptocurrencies by Bayesian Time-Varying Volatility Models. J. Risk Financ. Manag.
**2019**, 12, 150. [Google Scholar] [CrossRef] - Valencia, F.; Gómez-Espinosa, A.; Valdés-Aguirre, B. Price Movement Prediction of Cryptocurrencies Using Sentiment Analysis and Machine Learning. Entropy
**2019**, 21, 589. [Google Scholar] [CrossRef] - Athey, S.; Parashkevov, I.; Sarukkai, V.; Xia, J. Bitcoin Pricing, Adoption, and Usage: Theory and Evidence; Stanford University Graduate School of Business Research Paper; Stanford University Graduate School: Stanford, CA, USA, 2016; pp. 16–42. Available online: https://ssrn.com/abstract=2826674 (accessed on 1 November 2020).
- Catania, L.; Grassi, S.; Ravazzolo, F. Forecasting Cryptocurrencies Financial Time Series; Working Papers No 5/2018; Centre for Applied Macro- and Petroleum Economics (CAMP), BI Norwegian Business School: Oslo, Norway, 2018; Available online: https://ideas.repec.org/p/bny/wpaper/0063.html (accessed on 10 May 2021).
- Elendner, H. F5: Optimized Crypto-Currency Investment Strategies. Whitepaper. 2018. Available online: https://f5crypto.com/wp-content/uploads/2019/09/F5_Crypto_Index_Whitepaper.pdf (accessed on 20 December 2020).
- Amja, M.J.; Shah, D. Trading Bitcoin and Online Time Series Prediction. Proc. Time Ser. Workshop
**2017**, 55, 1–15. Available online: http://proceedings.mlr.press/v55/amjad16.pdf (accessed on 10 May 2021). - Chu, J.; Nadarajah, S.; Chan, S. Statistical Analysis of the Exchange Rate of Bitcoin. PLoS ONE
**2015**, 10, e0133678. [Google Scholar] [CrossRef] - Akcora, C.G.; Dey, A.K.; Gel, Y.R.; Kantarcioglu, M. Forecasting Bitcoin Price with Graph Chainlets. In PAKDD 2018: Advances in Knowledge Discovery and Data Mining; Phung, D., Tseng, V., Webb, G., Ho, B., Ganji, M., Rashidi, L., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2018; Volume 10939. [Google Scholar] [CrossRef]
- Abu Bakar, N.; Rosbi, S. Autoregressive Integrated Moving Average (ARIMA) Model for Forecasting Cryptocurrency Exchange Rate in High Volatility Environment: A New Insight of Bitcoin Transaction. Int. J. Adv. Eng. Res. Sci.
**2017**, 4, 130–137. [Google Scholar] [CrossRef] - Sutiksno, D.U.; Ahmar, A.S.; Kurniasih, N.; Susanto, E.; Leiwakabessy, A. Forecasting Historical Data of Bitcoin using ARIMA and α-Sutte Indicator. J. Phys. Conf. Ser.
**2018**, 1028, 012194. [Google Scholar] [CrossRef] - Katsiampa, P. Volatility estimation for Bitcoin: A comparison of GARCH models. Econ. Lett.
**2017**, 158, 3–6. [Google Scholar] [CrossRef] - Jain, R.; Rosie, N.; Tang, L.; Miller, T. Bitcoin Price Forecasting using Web Search and Social Media Data. In Proceedings of the SAS Global 2018 Conference, Denver, CO, USA, 8–11 April 2018; Available online: https://www.sas.com/content/dam/SAS/support/en/sas-globalforum-proceedings/2018/3601-2018.pdf (accessed on 10 May 2021).
- Kim, Y.; Kim, J.G.; Kim, W.; Im, J.H.; Kim, T.H.; Kang, S.J.; Kim, C.H. Predicting Fluctuations in Cryptocurrency Transactions Based on User Comments and Replies. PLoS ONE
**2016**, 11, e0161197. [Google Scholar] [CrossRef] - Shah, D.; Zhang, K. Bayesian regression and Bitcoin. In Proceedings of the 2014 52nd Annual Allerton Conference on Communication, Control, and Computing (Allerton), Monticello, IL, USA, 30 September–3 October 2014; pp. 409–414. [Google Scholar] [CrossRef]
- Gong, Y.; el Huser, R. Asymmetric tail dependence modeling, with application to cryptocurrency market data. arXiv
**2019**, arXiv:1905.05056. [Google Scholar] - Guo, T.; Antulov-Fantulinan, N. An Experimental Study of Bitcoin Fluctuation Using Machine Learning Methods. Mach. Learn.
**2018**. Available online: https://www.semanticscholar.org/paper/An-experimental-study-of-Bitcoin-fluctuation-using-Guo-Antulov-Fantulin/fafafe7394e69c07493fc5746495054c432325af (accessed on 15 October 2020). - Reddy, L.S.; Sriramya, P. A research on bitcoin price prediction using machine learning algorithms. Int. J. Sci. Technol. Res.
**2020**, 9, 1600–1604. [Google Scholar] - Bouri, E.; Gkillas, K.; Gupta, R.; Pierdzioch, C. Forecasting Realized Volatility of Bitcoin: The Role of the Trade War. Comput. Econ.
**2021**, 57, 29–53. [Google Scholar] [CrossRef] - Qureshi, S.; Aftab, M.; Bouri, E.; Saeed, T. Dynamic interdependence of cryptocurrency markets: An analysis across time and frequency. Phys. A Stat. Mech. Its Appl.
**2020**, 559, 125077. [Google Scholar] [CrossRef] - Bouri, E.; Saeed, T.; Vo, X.V.; Roubaud, D. Quantile connectedness in the cryptocurrency market. J. Int. Financ. Mark. Inst. Money
**2021**, 71, 101302. [Google Scholar] [CrossRef] - Roşu, I.; Saleh, F. Evolution of Shares in a Proof-of-Stake Cryptocurrency. Manag. Sci.
**2021**, 67, 661–672. [Google Scholar] [CrossRef] - Sebastião, H.; Godinho, P. Forecasting and trading cryptocurrencies with machine learning under changing market conditions. Financ. Innov.
**2021**, 7, 1–30. [Google Scholar] [CrossRef] - Cohen, G. Forecasting Bitcoin Trends Using Algorithmic Learning Systems. Entropy
**2020**, 22, 838. [Google Scholar] [CrossRef] [PubMed] - Colucci, S. On Estimating Bitcoin Value at Risk: A comparative analysis. SSRN
**2018**. [Google Scholar] [CrossRef] - Sawik, B.T. Conditional Value-at-Risk Vs. Value-at-Risk to Multi-Objective Portfolio Optimization. Appl. Manag. Sci.
**2012**, 15, 277–305. [Google Scholar] [CrossRef] - Malinovskiy, D.A. To the question of the applicability of the Markowitz theory in the distribution of cryptocurrencies in the investment portfolio. Econ. Sci.
**2020**, 7, 188. [Google Scholar] - Petukhina, A.; Trimborn, S.; Härdle, W.K.; Elendner, H. Investing with cryptocurrencies—Evaluating their potential for portfolio allocation strategies. Quant. Financ.
**2021**, 1–29. [Google Scholar] [CrossRef] - Malykhin, E.M. Algorithmic Trading for Professionals; BHV-Petersburg: St. Petersburg, Russia, 2021; 176p. [Google Scholar]
- MacDonell, A. Popping the Bitcoin Bubble: An Application of Log-Periodic Power Law Modeling to Digital Currency; University of Notre Dame Working Paper 2014; University of Notre Dame: Notre Dame, IN, USA, 2014; pp. 1–33. Available online: https://economics.nd.edu/assets/134206/mac_donell_popping_the_biticoin_bubble_an_application_of_log_periodic_power_law_modeling_to_digital_currency.pdf (accessed on 4 July 2021).
- October 2020 Performance Review of Automated Trading Systems. Available online: https://elitecurrensea.com/forex-cfd-content/october-2020-performance-review-of-automated-trading-systems (accessed on 4 July 2021).
- Bouri, E.; Lau, C.K.M.; Saeed, T.; Wang, S.; Zhao, Y. On the intraday return curves of Bitcoin: Predictability and trading opportunities. Int. Rev. Financ. Anal.
**2021**, 76, 101784. [Google Scholar] [CrossRef] - Hartmann, M.; Chari, M.; Huang, T.; Kearney, T. Building and Solving Optimization Models with SAS/OR (CourseNotes); SAS Institute Inc.: Cary, NC, USA, 2016; p. 556. [Google Scholar]
- Kizys, R.; Juan, A.A.; Sawik, B.; Calvet, L. A Biased-Randomized Iterated Local Search Algorithm for Rich Portfolio Optimization. Appl. Sci.
**2019**, 9, 3509. [Google Scholar] [CrossRef] - SAS Institute Inc. SAS/OR 14.2 User’s Guide: Mathematical Programming; Mathematical Programming, SAS Institute Inc. SAS/OR 14.2 User’s Guide; SAS Institute Inc.: Cary, NC, USA, 2016; Available online: http://support.sas.com/thirdpartylicenses (accessed on 4 July 2021).
- Ruiz-Cruz, R. Portfolio modeling for an algorithmic trading based on control theory. In Proceedings of the 2nd IFAC Conference on Modelling, Identification and Control of Nonlinear Systems MICNON 2018 Guadalajara, Jalisco, Mexico, 20–22 June 2018; Volume 51, pp. 1–674. [Google Scholar] [CrossRef]
- Gerritsen, D.F.; Bouri, E.; Ramezanifar, E.; Roubaud, D. The profitability of technical trading rules in the Bitcoin market. Financ. Res. Lett.
**2020**, 34, 101263. [Google Scholar] [CrossRef] - Naeem, M.; Bouri, E.; Boako, G.; Roubaud, D. Tail dependence in the return-volume of leading cryptocurrencies. Financ. Res. Lett.
**2020**, 36, 101326. [Google Scholar] [CrossRef] - Ślepaczuk, R.; Zenkova, M. Robustness of Support Vector Machines in Algorithmic Trading on Cryptocurrency Market. Cent. Eur. Econ. J.
**2019**, 5, 186–205. [Google Scholar] [CrossRef] - Jiang, Z.; Liang, J. Cryptocurrency portfolio management with deep reinforcement learning. In Proceedings of the 2017 Intelligent Systems Conference (IntelliSys), London, UK, 7–8 September 2017; pp. 905–913. [Google Scholar] [CrossRef]
- Giudici, P.; Pagnottoni, P.; Polinesi, G. Network Models to Enhance Automated Cryptocurrency Portfolio Management. Front. Artif. Intell.
**2020**, 3. [Google Scholar] [CrossRef] - Gomber, P.; Björn, A.; Lutat, M.; Uhle, T. High-Frequency Trading. 2011. Available online: http://0-dx.doi.org.brum.beds.ac.uk/10.2139/ssrn.1858626 (accessed on 4 July 2021).
- Barkhatov, V. Innovative model of portfolio investment in the Russian stock market. Bull. Chelyabinsk State Univ.
**2007**, 10, 5–18. [Google Scholar] - The Home of Digital Asset Trading. Available online: https://www.bitfinex.com (accessed on 1 March 2019).
- Ledoit, O.; Wolf, M. Improved estimation of the covariance matrix of stock returns with an application to portfolio selection. J. Empir. Financ.
**2003**, 10, 603–621. [Google Scholar] [CrossRef] - Ledoit, O.; Wolf, M. Analytical nonlinear shrinkage of large-dimensional covariance matrices. Ann. Stat.
**2020**, 48, 3043–3065. [Google Scholar] [CrossRef] - Dovhiy, S.O.; Bidiuk, P.I.; Trofymchuk, O.M.; Savenkov, O.I. Forecasting Methods in Decision Support Systems; Azimuth-Ukraine: Kyiv, Ukraine, 2011. [Google Scholar]
- Bidyuk, P.I.; Terentiev, O.M.; Prosiankina-Zharova, T.I. Methods of filling data gaps in the problems of predictive modeling of socio-economic processes. In Proceedings of the Intellectual Systems for Decision Making and Problems of Computational Intelligence (ISDMCI 2017), Kherson, Ukraine, 22–26 May 2017; pp. 185–187. [Google Scholar]
- Bidyuk, P.I.; Romanenko, V.D.; Tymoshchuk, O.L. Time Series Analysis; NTUU “KPI”: Kyiv, Ukraine, 2010; 317p. [Google Scholar]

Proportion of Gaps in the Time Series | Proportion of Hourly Intervals with the Appropriate Level of Gaps | Proportion of Daily Intervals with the Appropriate Level of Gaps |
---|---|---|

0–20 | 80.96 | 78.69 |

20–50 | 6.82 | 10.66 |

50–80 | 4.99 | 4.92 |

80–100 | 7.23 | 5.74 |

Name of the Model | RMSE Value | |
---|---|---|

on a 15 min Frame | on a Daily Frame | |

Seasonal Exponential Smoothing | 1.16 | 24.32 |

Winters Method—Additive Version | 1.17 | 17.01 |

Damped-Trend Linear Exponential Smoothing | 1.09 | 15.65 |

Double (Brown) Exponential Smoothing | 1.35 | 18.57 |

Linear (Holt) Exponential Smoothing | 1.11 | 16.45 |

Multiplicative Seasonal Smoothing | 1.18 | 19.75 |

Simple Exponential Smoothing | 1.09 | 16.71 |

Winters Method—Multiplicative Version | 1.21 | 21.66 |

Strategy | Month of 2018 | Month of 2019 | |||||||
---|---|---|---|---|---|---|---|---|---|

July | August | September | October | November | December | January | February | March | |

469 | 25.45 | −17.34 | 31.13 | 4.90 | 11.01 | 3.88 | 2.82 | −2.43 | −0.59 |

470 | 25.18 | −30.21 | 26.84 | 6.03 | 28.32 | 7.40 | 3.76 | −1.95 | 3.55 |

471 | 41.07 | −24.59 | 31.55 | 7.85 | 21.51 | 1.09 | 8.93 | −0.02 | 3.55 |

472 | −0.79 | 20.04 | 21.66 | 4.46 | 45.91 | 35.38 | 13.87 | 19.50 | 9.55 |

473 | −16.02 | 27.37 | 26.55 | −1.13 | 56.75 | 28.96 | 16.29 | 16.83 | 10.71 |

474 | −24.02 | 22.84 | 22.70 | −3.75 | 59.49 | 26.74 | 12.44 | 17.58 | 10.71 |

475 | 22.39 | −0.07 | 4.23 | 4.05 | −44.52 | 3.94 | 14.31 | 4.09 | −10.97 |

476 | 10.28 | 27.35 | 9.63 | −1.71 | −52.11 | −6.10 | 17.07 | 0.94 | −0.05 |

477 | 5.64 | 19.85 | 8.03 | −12.34 | −48.66 | −0.36 | 18.36 | 1.44 | −4.08 |

478 | 32.53 | −26.37 | 31.19 | 4.53 | 15.10 | 12.14 | 10.40 | −8.55 | 1.45 |

479 | 33.90 | −28.80 | 33.22 | 10.90 | −0.85 | 12.15 | 6.02 | −7.09 | 5.58 |

480 | 42.74 | −29.53 | 31.34 | 8.88 | −7.22 | −6.97 | 13.24 | −1.62 | 5.58 |

Strategy | Month of 2018 | Month of 2019 | ||||||
---|---|---|---|---|---|---|---|---|

August | September | October | November | December | January | February | March | |

469 | 17.67 | |||||||

470 | 22.19 | |||||||

471 | 19.45 | 60.81 | ||||||

472 | 19.11 | 18.98 | 31.66 | 22.11 | 68.07 | 44.9 | ||

473 | 36.82 | 6.35 | 3.69 | 27.52 | ||||

474 | ||||||||

475 | 42.81 | 24.92 | 48.89 | 31.93 | 25.31 | |||

476 | 6.06 | 29.72 | ||||||

477 | 18.25 | 38.01 | 27.64 | 72.48 | ||||

478 | 4.39 | 13.39 | ||||||

479 | 16.75 | 0.05 | ||||||

480 | ||||||||

Cyмa | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 | 100.00 |

Year | Month | Profitability by Investment Portfolio, % | Capital Increase per 1 Dollar Invested in Bitcoin, Dollars |
---|---|---|---|

2018 | August | −7.47 | −0.07 |

September | 17.56 | 0.09 | |

October | −0.56 | 0.08 | |

November | −3.06 | 0.05 | |

December | 11.18 | 0.17 | |

2019 | January | 14.01 | 0.40 |

February | 5.67 | 0.41 | |

March | 1.50 | 0.43 |

Year | Month | The Price of Bitcoin, Dollars | Standard Deviation | ||
---|---|---|---|---|---|

Average Monthly | Minimum | Maximum | |||

2018 | July | 7335.16 | 6113.2 | 8437.4 | 713.04 |

August | 6608.63 | 5960.2 | 7617 | 372.28 | |

September | 6565.78 | 6119.3 | 7410.2 | 314.27 | |

October | 6539.58 | 6226.9 | 7017.6 | 148.68 | |

November | 4800.98 | 3691.5 | 6578.4 | 930.48 | |

December | 3793.42 | 3239 | 4384 | 278.44 | |

2019 | January | 3754.63 | 3431 | 4157.5 | 187.20 |

February | 3778.44 | 3434.5 | 4219.6 | 214.75 | |

March | 3991.56 | 3776.8 | 4104.2 | 78.18 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).