A Novel Momentum-Based Measure for Online Portfolio Algorithm

Abstract

In recent years, digital investment portfolios have become a significant area of interest in the field of machine learning. To tackle the issue of neglecting the momentum effect in risk asset prices within the follow-the-winner strategy and to evaluate the significance of this effect, a novel measure of risk asset price momentum trend is introduced for online investment portfolio research. Firstly, a novel approach is introduced to quantify the momentum trend effect, which is determined by the product of the slope of the linear regression model and the absolute value of the linear correlation coefficient. Secondly, a new investment portfolio optimization problem is established based on the prediction of future returns. Thirdly, the Lagrange multiplier method is used to obtain the analytical solution of the optimization model, and the soft projection optimization algorithm is used to map the analytical solution to obtain the investment portfolio of the model. Finally, experiments are conducted on five benchmark datasets and compared with popular investment portfolio algorithms. The empirical findings indicate that the algorithm we are introduced is capable of generating higher investment returns, thereby establishing its efficacy for the management of the online investment portfolios.

Share and Cite:

Lv, X. , Huang, C. and Dai, H. (2024) A Novel Momentum-Based Measure for Online Portfolio Algorithm. Journal of Computer and Communications, 12, 1-21. doi: 10.4236/jcc.2024.129001.

1. Introduction

Investment fund allocation in portfolio selection aims to seek excess returns by investing in a variety of risky assets [1]-[3]. In 1993, Jegadeesh and Titman observed that investor buys winner portfolios with high returns in the past can achieve significant excess returns in the future [4]. Subsequently, researchers conducted research on financial markets and found that momentum strategies can achieve significant positive returns. Momentum strategy refers to analyzing the historical prices of risky assets, establishing momentum indicators that can measure price changes, and then selecting a portfolio of risky assets with good historical performance, known as the winner portfolios [5]. Some typical algorithms based on the follow-the-winner strategy include the Universal Portfolios (UP) algorithm [6] and the Exponential Gradient (EG) algorithm [7]. The advantage of both algorithms lies in their ability to make decisions based on historical price analysis of risky assets, without necessitating stringent statistical assumptions. Nevertheless, the investment returns yielded by these two algorithms are not satisfactory [8]. In 2018, Lai et al. analyzed the prices of risk assets and proposed the concept of the relative peak price of risk assets as the potential maximum value that a risk asset may reach in the future period. Tracking the relative peak price can yield significant excess returns, and they developed a Peak Price Tracking (PPT) algorithm for online investment portfolio management [9]. In 2022, Dai et al. analyzed financial anomalies and identified three price trend states of risk assets: momentum, persistence, and reversal. They established an indicator to identify price momentum and reversal of risk assets and used the indicator to judge future performance. They proposed the Trend Promote Price Tracing (TPPT) algorithm for risk asset investment decision-making [10]. Manujakshi et al. use moving average indicators to identify upward trends in stock prices [11].

Overall, these momentum trends are based on price information of risk assets. However, these algorithms ignore the significance of momentum trend during window period. When we use relative peak prices or moving averages to measure the price trend of risk assets, it is not judged whether the measurement effect is significant. Therefore, in this study, we explore this issue, and propose a novel price momentum measurement indicator β corr for pricing momentum trends of risk assets, which is calculated as the product of the slope β obtained from the linear regression model of a given risk assets price and time over a specific window period, times the absolute value of the linear correlation coefficient between the price of the risk asset and trading window period. By optimizing the momentum indicator β corr , we propose an online portfolio investment algorithm based on momentum strategy called OLM- β corr . Our approach differs from prior research in that our momentum indicator β corr is affected by the return and periods series in past. The primary innovative contributions can be outlined as follows:

  • A novel price momentum metric β corr has been designed. We use the magnitude of the beta coefficient from a linear regression model to represent the linear momentum trend of risky assets’ prices and use the absolute value of the linear correlation coefficient to measure the linear trend effect. In contrast to previous studies, our momentum metric takes into account both historical prices and trading period.

  • A new portfolio optimization model has been constructed. We set thresholds for expected returns and beta and aim to minimize the adjustment between the current and next-period portfolios, optimizing the current portfolio to obtain the next-period portfolio.

  • A new online portfolio OLM- β corr algorithm has been proposed. We use the Lagrangian multiplier method to obtain an analytical solution to the portfolio optimization model and the soft projection optimization algorithm to map the analytical solution onto the simplex, obtaining the portfolio for each period. Compared to classical portfolio algorithms, the proposed algorithm provides competitive experimental results on benchmark datasets.

The subsequent sections of this paper are structured as follows: Section 2 offers a comprehensive review of pertinent literature. Section 3 describes the issues of online investment portfolios, introducing our novel online portfolio selection algorithm. Within this segment, we elucidate the proposed model for online portfolio optimization and delineate the methodology for deriving its analytical solution. Section 4 assesses the performance of the algorithm using real-world data sets. Conclusively, Section 5 encapsulates the study’s conclusions, acknowledges its limitations, and suggests avenues for future inquiry.

2. Literature Review

2.1. Portfolio Selection

The research on investment portfolios focuses on how to distribute funds among different asset classes to achieve lower investment risk and higher returns [12]. An effective investment portfolio should consider the price fluctuation trends of risky assets [13], the number of risky assets [14], the trading periods [15], and investment risk management [16]. Markowitz proposed the mean-variance portfolio model, which was the first to quantify the returns and investment risks of risky assets and has been widely applied in research [17]. However, the mean-variance model assumes that the return rate of risk assets follows a normal distribution, which may not always be applicable in actual securities markets [18]. Kelly proposed the theory of capital growth. Researchers have extended this theory and combined it with machine learning techniques to propose online portfolio research [19].

At present, online portfolio algorithm strategies can be categorized to a certain degree into several types [20], including benchmark strategies [21], follow-the-winner strategies [22], follow-the-loser strategies [23], pattern-matching strategies [24], and meta-learning algorithms [25]. The typical algorithms for benchmark strategies include Uniform Buy-and-Hold strategy (UBAH), Best Constant Rebalanced Portfolios (BCRP) and Uniform Constant Rebalanced Portfolios (UCRP) [26]. These algorithms are commonly utilized to compare the favorable and unfavorable scenarios with respect to new algorithms [21]. The meta-learning algorithm, considered a new research area in investment portfolio, shares similarities with ensemble learning algorithms [27]. The strategy in question integrates various fundamental algorithms to synthesize a novel approach [28]. The remaining three strategies emerges from the field of behavioral finance research, which has uncovered a multitude of financial occurrences in the securities market that defy the efficient market hypothesis. Furthermore, it has shown that the future performance of risky assets is not entirely without predictability. The follow-the-winner strategy contends that the prices of risky assets exhibit momentum effects, with well-performing assets in the past continuing to show good value in the future. Conversely, the follow-the-loser strategy claims that investors can increase the proportion of investment in under-performing risky assets to attain excess returns in the future. The pattern-matching strategy posits that momentum and reversal effects can coexist in the price of risky assets, with the core algorithm focusing on identifying price patterns. Evidently, this approach better exploits historical price information for risky assets. However, it also comes with high time complexity, making it unsuitable for application in actual markets.

2.2. Momentum Effect

The momentum effect describes a market phenomenon: assets which have exhibited positive performance historically are inclined to sustain their upward trajectory in subsequent periods; if the assets have demonstrated subpar results, the expectation is that their downward movement will carry on. This reflects investors’ tendency to follow market trends, known as “buying high and selling low”. In the field of behavioral finance, the BSV model [29] and the DHS model [30] provide psychological and behavioral theoretical support for the momentum effect. The BSV model highlights the irrational processing biases of investors when facing new information, such as representative heuristics and conservatism biases, which lead to a slow reaction to new information. The DHS model further explores the process of information dissemination and belief updating, explaining the phenomenon of market trends continuing excessively. In investment practice, one application of the momentum effect is the “follow the winner” strategy. This strategy is based on the momentum effect, identifying and investing in assets that show strong price growth, aiming to achieve excess market returns.

The Universal Portfolios (UP) algorithm and Exponential Gradient (EG) algorithm are the most typical online portfolio algorithms that follow the winner strategy. Cover first proposed the UP algorithm in 1991, which aims to boost the investment share of high-yield assets with positive past performance for future periods. In contrast to traditional mean-variance portfolio algorithms, the most notable feature of the UP algorithm is the absence of strict statistical assumptions [31]. In 1996, Helmbold investigated the UP algorithm and discovered that it frequently requires adjustments to the portfolio proportions, resulting in redundant computational complexity and high transaction expenses. As a remedy, Helmbold introduced the EG algorithm which introduces a regularization term during the calculation of new investment decisions. The objective is to align the new investment decisions with those made in the previous period, thereby decreasing the flow rate of funds across various risk assets and reducing transaction costs [7].

2.3. Price Tracking

The research core of online portfolio investment algorithm based on the follow-the-winner strategy is how to quantify the momentum trend of risk assets. The phenomenon of momentum trend in financial markets was observed and studied in the early 1990s, commonly through Relative Strength Index (RSI) [32] and Moving Average (MA) [33] based on stock prices. These momentum methods have become widely used tools in portfolio investment research. Researchers have tried to quantify the momentum effect of risk assets from different perspectives in the past [34]. In 2021, Sini et al. analyzed the decaying factor of the moving average and proposed the Adaptive Online Moving Average method (AOLMA) to measure the future of risk assets [35]. In 2022, Manujakshi et al. use moving average indicators to identify upward trends in stock prices [11]. Nazir combined the dynamic moving model and benchmark index to propose an online investment portfolio algorithm and achieved superior results on benchmark datasets [36]. Dai et al. analyzed the complex securities market environment and pointed out that the market not only includes various price trends such as momentum, but also constructed a new identifiable pricing momentum trend indicator for securities markets and proposed the Trend Promote Price Tracing (TPPT) algorithm [10]. In 2023, Cheoljun and Jong analyzed the common features of cross-sectional momentum, moving-average momentum, and time-series momentum, and proposed the principal component momentum (PMOM) [37]. In 2024, Lai et al. designed an online adaptive asset tracking algorithm (OAAT). The algorithm not only utilizes relative peak prices to asset the momentum trend of risk asset but also considers additional asset information, effectively adjusting the role of these asset details through online learning methods [38].

3. A Momentum-Based Online Portfolio Algorithm

3.1. Problem Formulation

The objective of online portfolio research is to maximize the profitability of investments and to manage risk by developing and implementing effective investment models and strategies. Using advanced data analysis methods and models, online portfolio research can help investors understand market dynamics and trends to make better investment decisions.

We assume the presence of s investment assets within the market. Simultaneously, there are p trading periods throughout the portfolio process. The investment strategy pertains to the proportion of investors’ funds allocated to risky assets during each period. In the kth period, it is represented by the vector u k = ( u k 1 , u k 2 , u k 3 ,, u k s ) T , where u k l corresponds to the proportion of the portfolio allocated to the lth asset, l=1,2,3,,s , and k=1,2,3,,p . The relative price of all risky assets is expressed as vectors q k =( q k 1 , q k 2 , q k 3 ,, q k s ) , which is

derived from the formula q k = v k v k1 , where v k =( v k 1 , v k 2 , v k 3 ,, v k s ) represents

the closing prices of the risky assets for the kth period, and v k l represents the closing price of the lth asset during that period. The return on the asset allocation for kth period is given by the product q k u k . Ultimately, without taking into account transaction costs, the total wealth accumulated from the beginning of the investment to the end of period can be represented as follows:

C W p = k=1 p l=1 s q k l u k l = k=1 p q k u k , (1)

It is evident that transaction fees must be taken into account for real-world trades. Additionally, the strategy of short selling is prohibited throughout the investment process. Consequently, the portfolio vector can be delineated as:

u k 1 + u k 2 + u k 3 ++ u k s =1,k=1,2,3,,p, (2)

where 0 u k l 1 , u k = ( u k 1 , u k 2 , u k 3 ,, u k s ) T , u k Δ s .

At the onset of each trading phase, the portfolio vector is realigned to reflect market price movements. Therefore, u k1 develops into u k1 at the end of phase k1 , where

u k1 l = q k1 l u k1 l q k1 u k1 ,l=1,2,3,,s. (3)

Consequently, assuming that there is the transaction rate (c), after p periods, the cumulative wealth is computed by the following formula:

C W p = k=1 p ( q k u k c 2 l=1 s | u k l u k1 l | ). (4)

Algorithm 1 describes the process of the online portfolio in detail. Initially, the portfolio algorithm learns the estimated proportions of the portfolio for the current period using historical data. Later, at the end of each p period, the investor calculates the relative price vector. Ultimately, the strategy incorporates real market conditions and estimated portfolio vector to assess the performance of accumulated wealth, thereby evaluating the strategy’s effectiveness. In this article, the following assumptions are made:

1) Transaction costs: Taxes are not considered;

2) Market liquidity: It is presumed that assets can be freely traded at the closing price without restriction;

3) Market impact: Any OLPS model cannot influence market behavior.

3.2. Establishment and Solution of Portfolio Optimization

3.2.1. Expected Relative Price

The expected relative price q ^ k refers to the expected performance of assets. It reflects future price movements with the following expression:

f( v 1 , v 2 , v 3 ,, v k1 )= q ^ k (5)

We used the Simple Moving Average (SAM) over ω periods to calculate the relative price q ^ k , as shown below:

v ^ k = 1 ω t=1 ω v kt , q ^ k = v ^ k v k1 . (6)

3.2.2. Momentum Measure

Based on a new perspective, this paper measures the momentum trend of risk asset prices and refers to it as β corr , as shown below:

β corr r k1 =f( { v kt } t=1 ω , { kt } t=1 ω )= β k1 × ρ k1 . (7)

Here,

β k1 = t=1 ω ( v kt t=1 ω v kt ω )( t ( 1+ω )×ω 2 ) t=1 ω ( v kt t=1 ω v kt ω ) 2 , (8)

ρ k1 =| t=1 ω ( v kt t=1 ω v kt ω )( t ( 1+ω )×ω 2 ) t=1 ω ( v kt t=1 ω v kt ω ) 2 t=1 ω ( t ( 1+ω )×ω 2 ) 2 |. (9)

Specifically, r k1 is the trend effect at the end of the ( k1 ) th period, which is calculated as follows: first, at the end of ( k1 ) th period, we calculate the slope β of the least-squares linear regression model to represent the linear momentum trend of risky assets’ prices, using ω periods of relative prices and time, denoted as β k1 =( β k1 1 , β k1 2 ,, β k1 s ) ; second, we calculate the absolute value of the linear correlation coefficient between relative prices and time over ω periods to measure the linear trend effect, denoted as ρ k1 , where ρ k1 =( ρ k1 1 , ρ k1 2 ,, ρ k1 s ) ; finally, we calculate their element-wise product: r k1 = β k1 × ρ k1 . The symbol “×” denotes the element-wise product of two vectors.

3.2.3. Optimization Model

Assume that the investor needs to make investment decisions in a total of p periods with s risky assets. To effectively monitor the price trend of risky asset and map it to the investment portfolio rationally, the following optimization model is established:

u ˜ k =arg min u 1 2 u u k1 2 , (10)

subject to u q ^ k ε, (11)

u r k1 ζ, (12)

u1=1. (13)

The objective of the optimization model (10)-(13) is to obtain the portfolio vector u k in period k. Here, q ^ k is the predicted relative price in period k; r k1 represents the trend effect of the risky asset; ε and ζ are the threshold for investment return and the threshold for trend effect. The optimization problem is constrained by the L 2 norm, in order to drive similarity of portfolio vector between adjacent periods and reduce transaction costs. Under the constraint u r k1 ζ , the portfolio vector tends to increase the proportion of risky assets with larger trend effects.

3.2.4. Solving Optimization Model

We use the Lagrange multiplier method to solve optimization models with constraints, by introducing Lagrange multipliers λ , μ , and ν , where λ and μ are non-negative. We construct the Lagrangian auxiliary function ( u;λ,μ,ν ) as follows:

( u;λ,μ,ν )= 1 2 u u k1 2 +λ( εu q ^ k )+μ( ζu r k1 )+ν( u11 ), (14)

Taking the partial derivative of ( u;λ,μ,ν ) with respect to u and setting it to zero yields:

u =u u k1 λ q ^ k μ r k1 +ν1=0, (15)

We have,

u= u k1 +λ q ^ k +μ r k1 ν1, (16)

Multiplying both sides of the equation by 1 T , we obtain the following dot product:

1=1+λ q ^ k 1+μ r k1 1νs, (17)

We have,

ν=λ q ^ k 1 s +μ r k1 1 s , (18)

Combining Equations (16) and (18), we obtain:

u= u k1 +λ( q ^ k 1 T q ^ k s 1 )+μ( r k1 1 T r k1 s 1 ). (19)

Substituting (19) into (14), we obtain:

( λ,μ )= 1 2 λ( q ^ k 1 T q ^ k s 1 )+μ( r k1 1 T r k1 s 1 ) 2 +λ( ε( u k1 +λ( q ^ k 1 T q ^ k s 1 )+μ( r k1 1 T r k1 s 1 ) ) q ^ k ) +μ( ζ( u k1 +λ( q ^ k 1 T q ^ k s 1 )+μ( r k1 1 T r k1 s 1 ) ) r k1 ). (20)

Taking partial derivatives of the equation with respect to λ,μ and setting them equal to zero, we obtain:

( λ,μ ) λ =( ε u k1 q ^ k )λμA=0, (21)

( λ,μ ) μ =( u k1 r k1 ζ )λCμA=0, (22)

Hence,

A= q ^ k r k1 1 T q ^ k s ( r k1 1 ), (23)

= q ^ k 1 T q ^ k s 1 2 , (24)

C= r k1 1 T r k1 s 1 2 , (25)

Since λ and μ are non-negative, we have:

λ=max{ 0, C( ε u k1 q ^ k )A( u k1 r k1 ζ ) C A 2 }, (26)

μ=max{ 0, A( u k1 r k1 ζ )( ε u k1 q ^ k ) C A 2 }, (27)

Therefore, we obtain the analytical solution as follows:

u ˜ k = u k1 +λ( q ^ k 1 T q ^ k s 1 )+μ( r k1 1 T r k1 s 1 ). (28)

u ˜ k is the analytical solution of the optimization model. Then, we use a soft projection optimization method to map u ˜ k to Δ s to obtain u k .

Figure 1 shows the procedure of the proposed algorithm. Input the historical

Figure 1. OLM- β corr system.

price of each risk asset { v kt l } t=1 w , w=6 . Firstly, based on the input, the momentum measure β corr (i.e. r k1 ) and the predicted relative price q ^ k are calculated. Then, an analytical solution u ˜ k is obtained by Lagrange auxiliary function. Finally, u ˜ k is mapped to the Simplex, and the investment portfolio vector u k is gained.

Algorithm 2 details the calculation process of the OLM- β corr algorithm, explicitly computing the steps to obtain its analytical solution.

3.3. Complexity Analysis

The cost of computation is a vital matter that must be taken into account when implementing a learning system in practical scenarios. With an upsurge in the duration of investment periods and the diversity of assets, some learning systems demand an extensive computational workload. Table 1 presents the time complexity of the OLM- β corr algorithm alongside other online portfolio algorithms. Observing the results, it is evident that the OLM- β corr algorithm exhibits a time complexity characterized by o( sp ) . The algorithm’s time complexity is straightforward, underscoring its suitability for large-scale applications [20].

Table 1. Datasets overview from securities firms.

Strategy

Algorithm

Complexity

Benchmark [35]

Market

o( s+p )

Benchmark [35]

UCRP (Uniform Constant Rebalanced Portfolios)

o( sp )

Benchmark [35]

BCRP (Best Constant Rebalanced Portfolios)

o( sp )

Aggressive [6]

UP (Universal Portfolios)

o( p s )

Aggressive [7]

EG (Exponential Gradient)

o( sp )

Aggressive

OLM- β corr

o( sp )

4. Experimental Results

To verify the effectiveness of the OLM- β corr algorithm, we evaluate its performance across five benchmark datasets. We compare the OLM- β corr algorithm with benchmark strategy algorithms Market, UCRP and BCRP, as well as the follow-the-winner strategies UP and EG, by conducting experiments with appropriate parameters. Additionally, we compute and analyze several performance metrics including cumulative wealth, mean excess return, Sharpe ratio, and Calmar ratio for each algorithm. Statistical verification is performed specifically on cumulative wealth and the Calmar ratio to further substantiate our findings.

4.1. Datasets

We have chosen five distinct benchmark datasets, namely MSCI, TSE, SP500, NYSE-O, and NYSE-N, as shown in Table 2. These datasets are designed to ensure comprehensive coverage of various market environments and investment conditions. They are classic data sets for online portfolio algorithms and are widely used in multiple academic studies. These datasets span from 1962 to 2010 and encompass key financial episodes such as the Internet bubble of 1995-2000 and the global financial crisis of 2007-2009. Such time spans and event coverage allow us to analyze in depth how strategies perform under different market pressures. To be specific, the MSCI dataset comprises the MSCI World Index, which includes data from various global equity indices. On the other hand, the TSE dataset is gathered from the Canadian stock market and consists of data from 88 stocks. Lastly, the remaining three datasets are all derived from the U.S. stock market, reflecting the historical returns of the stocks. The stock data we have selected primarily focuses on those with larger market capitalizations to meet the requirements of the research hypotheses [20].

Table 2. Datasets overview from securities firms.

Dataset

Region

Time Frame

Periods

Assets

MSCI

Global

04/01/2006-03/31/2010

1043

24

TSE

CA

01/04/1994-12/31/1998

1259

88

SP500

US

01/01/1998-01/31/2003

1276

25

NYSE-O

US

07/03/1962-12/31/1984

5651

36

NYSE-N

US

01/01/1985-06/30/2010

6431

23

4.2. Parameter Setting

The window period ω is set to 5, the threshold value of expected return ε is set to 5, and the threshold value of the trend effect ζ is set to 0.5 [9] [10]. Except for the transaction cost α which is set to 0.001, the parameters of these algorithms used for comparison are set to default values [20] [35]. Within this controlled setting, the efficacy and potency of the OLM- β corr can be precisely assessed and compared with those of other prevailing algorithms within the domain of algorithmic trading.

4.3. Evaluation

4.3.1. Cumulative Wealth (CW)

Cumulative Wealth serves as a metric for measuring the overall capital appreciation realized by a trading strategy throughout its duration. It is derived by dividing the final total capital by the initial total capital and can be described as:

S n = i=1 n ( b t x t ) b 0 x 0 = i=1 n ( b t x t ) (29)

The cumulative wealth of six online portfolio algorithms on five datasets is shown in Figure 2 and Table 3. This orange curve is the cumulative wealth trend chart of the proposed algorithm. Obviously, apart from the dataset SP500, the proposed algorithm has the most advantageous cumulative wealth trend.

Figure 2. CWs on five datasets.

Compared with Market, UCRP, and BCRP, the OLM- β corr algorithm achieve the highest cumulative wealth values except for the SP500 dataset. Compared with the follow-the-winner strategies UP and EG algorithm, the OLM- β corr algorithm achieve the highest cumulative wealth values. Notably, the proposed algorithm achieves significantly higher cumulative wealth values on the MSCI, TSE, NYSE-O, and NYSE-N datasets with values of 6.05, 814.88, 7.76 × 1013, and 1.76 × 103, respectively. This is significantly higher than the optimal values obtained by the comparison algorithms, which are 1.50, 6.28, 235.07, and 115.66, respectively. Therefore, the OLM- β corr algorithm is an effective online portfolio investment algorithm with significant advantages in terms of cumulative wealth values on the MSCI, TSE, NYSE-O, and NYSE-N datasets.

Table 3. CWs of six algorithms on five datasets.

Algorithm

MSCI

TSE

SP500

NYSE-O

NYSE-N

Market

0.9059

1.6121

1.341

14.4901

18.0475

UCRP

0.9224

1.5803

1.6317

26.1898

30.334

BCRP

1.5033

6.2761

4.0344

235.0688

115.6646

UP

0.9111

1.5587

1.6183

25.0305

29.1177

EG

0.9218

1.5793

1.6172

26.2398

29.8672

OLM- β corr

6.0518

814.8839

3.7321

7.7551× 1013

1.7606×103

4.3.2. Mean Excess Returns (MER)

Mean excess returns (MER) refer to the daily average return obtained from investing in risk assets under a specific strategy, which exceeds the level of daily average market return. Here, market return specifically denotes the returns achieved through the UBAH strategy, and UBAH is also referred to as the market strategy in this article. MER can be expressed as:

MER= k=1 p Q k Q k * p = Q ¯ Q ¯ * . (30)

Table 4 presents the mean excess returns of these algorithms on five datasets. The table shows that the OLM- β corr algorithm achieves the highest mean excess returns on all datasets. These results demonstrate that the OLM- β corr algorithm performs well in terms of daily returns.

Table 4. MERs of six algorithms on five datasets.

Algorithm

MSCI

TSE

SP500

NYSE-O

NYSE-N

UCRP

0.00002

−0.00002

0.00013

0.00010

0.00009

BCRP

0.00044

0.00169

0.00110

0.00063

0.00035

UP

0.00001

−0.00003

0.00013

0.00009

0.00008

EG

0.00002

−0.00002

0.00013

0.00010

0.00009

OLM- β corr

0.00200

0.00605

0.00126

0.00577

0.00116

4.3.3. Sharpe Ratio (SR)

In portfolio optimization, it is essential to take into account both risk and return in a holistic manner. The Sharpe Ratio (SR) quantifies the excess return for the per unit of risk undertaken and can be formulated as follows:

SR= Q ¯ q f σ , (31)

Here, q f is the risk-free rate, which we have set at 0.04, and σ is the standard deviation of the portfolio’s excess returns. A higher SR indicates the portfolio yields a greater excess return for each unit of risk taken on above the risk-free asset.

The SR of the six algorithms is presented in Table 5, and the OLM- β corr algorithm gain the peak performance on MSCI, TSE and NYSE-O datasets. The OLM- β corr algorithm obtains the second highest Sharpe of 0.58763 on the NYSE-N dataset, which is very close to the first-ranked value of 0.65584. This means that the OLM- β corr algorithm exhibits a relative advantage in terms of Sharpe ratios across the five datasets, underscoring its proficiency in effectively diversifying investment risks.

Table 5. SRs of six algorithms on five datasets.

Algorithm

MSCI

TSE

SP500

NYSE-O

NYSE-N

Market

−0.25840

0.46424

0.08115

0.58261

0.44824

UCRP

−0.23584

0.42982

0.27930

0.86882

0.53866

BCRP

0.32669

0.73059

0.65431

0.76929

0.65584

UP

−0.24752

0.40630

0.27122

0.85159

0.52913

EG

−0.23678

0.42928

0.26945

0.86459

0.53777

OLM- β corr

1.29661

3.65237

0.47415

5.54938

0.58763

4.3.4. Calmar Ratio (CR)

The Calmar Ratio emphasizes the importance of downside risk to fund investors, distinguishing itself from the Sharpe Ratio by focusing on the maximum drawdown as a metric for downside risk. CR can be formulated as follows:

CR= Q ¯ net MDD , (32)

where Q ¯ net is defined as the daily average net profit margin [35]. MDD is defined as the maximum drawdown of return and it can be expressed: MDD= 1 p k=1 p min { Q k 1,0 } 2 .

The Calmar ratios of all algorithms on the five datasets are shown in Table 6. Except for the SP500 dataset, the OLM- β corr algorithm achieves the highest values of Calmar ratios on all datasets. On the SP500 dataset, this algorithm achieves the Calmar ratios of 0.47, securing the second position in performance, just behind the BCRP algorithm which has the Calmar ratios of 0.65. This indicates that the OLM- β corr algorithm achieves superior excess returns and volatility control.

4.4. Statistical Comparison of Results and Analysis

The experimental results present earlier demonstrate that the cumulative wealth, mean excess returns, and Calmar ratios of the OLM- β corr algorithm does not

Table 6. Calmar ratios of six algorithms across five datasets.

Algorithm

MSCI

TSE

SP500

NYSE-O

NYSE-N

Market

−0.03916

0.32014

0.12765

0.30239

0.22498

UCRP

−0.03274

0.27443

0.32006

0.42410

0.22229

BCRP

0.24899

0.64827

0.62185

0.40952

0.42115

UP

−0.03713

0.26441

0.31291

0.41557

0.21926

EG

−0.03298

0.27524

0.30932

0.42335

0.22344

OLM- β corr

0.86640

4.17662

0.47826

6.53230

0.43299

achieve the highest values among the six algorithms tested on five datasets. To further assess its overall performance, we conduct Friedman tests and Bonferroni-Dunn tests for cumulative wealth and Calmar ratios [39] [40]. Initially, the Friedman test is employed to individually rank all algorithms across each dataset. Let z x y be the ranking of the yth algorithm in the xth data set. The test then assesses the Average Ranks (Ave.R) of each algorithm, calculated as Z y = 1 X x=1 X z x y .

We assume that the variations in the average ranks ( Z y ) among the algorithms are random, as all algorithms are considered to be equivalent. Under the null hypothesis, the Friedman test statistic is given by the following formula:

F F = ( X1 ) χ F 2 X( Y1 ) χ F 2 , (33)

which is distributed according to the F-distribution with Y1 and ( Y1 )( X1 ) degrees of freedom [41], χ F 2 = 12X Y( Y+1 ) ( y=1 Y Z y 2 Y ( Y+1 ) 2 4 ) .

Currently, we are comparing the outcomes of the proposed OLM- β corr algorithm against those of established online portfolio algorithms. According to the results from Table 7 and based on Equation (33), the F statistic with respect to cumulative wealth is calculated as 19.65. Since the probability p( F( 5,20 )>19.65 )<0.05 , it shows that the values of cumulative wealth for the six algorithms on the five datasets are significantly different at the level of significance of 0.05.

Table 7. Results of the cumulative wealth statistical test.

Algorithm

MSCI

TSE

SP500

NYSE-O

NYSE-N

Ave.R

Difference

Market

6

3

6

6

6

5.4

4.2

UCRP

3

4

3

4

3

3.4

2.2

BCRP

2

2

1

2

2

1.8

0.6

UP

5

6

4

5

5

5

3.8

EG

4

5

5

3

4

4.2

3

OLM- β corr

1

1

2

1

1

1.2

-

Similarly, according to the results from Table 8 and based on equation (33), the F statistic with respect to Calmar ratio is calculated as 6.29. Since the probability p( F( 5,20 )>6.29 )<0.05 , it shows that the values of Calmar ratio for the six algorithms on the five datasets are significantly different at the level of significance of 0.05.

Table 8. Results of the Calmar ratio statistical test.

Algorithm

MSCI

TSE

SP500

NYSE-O

NYSE-N

Ave.R

Difference

Market

6

3

6

6

3

4.8

3.6

UCRP

3

5

3

2

5

3.6

2.4

BCRP

2

2

1

5

2

2.4

1.2

UP

5

6

4

4

6

5

3.8

EG

4

4

5

3

4

4

2.8

OLM- β corr

1

1

2

1

1

1.2

-

Furthermore, a Bonferroni-Dunn test is carried out on the cumulative wealth and Calmar Ratio. The critical difference is 3.05. Table 7 and Table 8 show that the differences in the metrics of cumulative wealth and Calmar Ratio between the Market, UP algorithms and the OLM- β corr algorithm are greater than 3.05. This indicates that these algorithms perform slightly worse than the OLM- β corr algorithm. Although the differences for the UCRP, BCRP, and EG algorithms are smaller than 3.05, their average rankings are not superior to that of the OLM- β corr algorithm.

Overall, this suggests that the OLM- β corr algorithm is an effective and robust online investment strategy, striking a balance between returns and risk effectively.

4.5. Parameter Sensitivity

Parameter sensitivity design refers to the process of analyzing how changes in one or more input parameters affect the output of a system or model [42]. This is an important step in the development and evaluation of models, as it helps to identify which parameters are most critical to the performance of the model or system [43]. In parameter sensitivity design, different values are assigned to the input parameters, and the resulting outputs are observed and compared. This can be particularly useful in the design of experiments, optimization, and decision-making processes.

The OLM- β corr algorithm has five parameters that affect the results, and in order to enhance the applicability and robustness, we need to examine its sensitivity to these parameters. We demonstrate the performance of accumulated wealth across varying parameters, as depicted in Figure 3. Specifically, we evaluate the stability concerning the following parameters: transaction cost α , momentum threshold ζ , profit threshold ε , momentum calculation window β ω , and profit calculation window R ω .

Figure 3. CWs of OLM- β corr with respect to parameters.

Initially, we evaluate the stability concerning the transaction cost α . We set ζ=0.5 , ε=5 , β ω =5 , R ω =5 , and observe the changes in cumulative wealth for α ranging from 0 to 0.87. Specifically, we set α to be 0, 0.001, 0.005, 0.006, 0.012, 0.023, 0.041, 0.076, 0.14, 0.257, 0.473, and 0.87, and record the changes in cumulative wealth. Secondly, we evaluate the stability concerning the momentum threshold ζ . We set α=0.001 , ε=5 , β ω =5 , R ω =5 , and observe the changes in cumulative wealth for ζ ranging from 0 to 1.1. Specifically, we set ζ to be 0, 0.1, 0.2 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, and 1.1, and record the changes in cumulative wealth. Thirdly, we evaluate the stability concerning the profit threshold ε . We set α=0.001 , ζ=0.5 , β ω =5 , and R ω =5 , and observe the changes in cumulative wealth for ε ranging from 0 to 144. Specifically, we set ε to be 0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, and 144, and record the changes in cumulative wealth. Fourthly, we evaluate the stability concerning the momentum calculation window β ω . We set α=0.001 , ζ=0.5 , ε=5 , R ω =5 , and observe the changes in cumulative wealth for β ω ranging from 5 to 115. Specifically, we set β ω to be 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, and 115, and record the changes in cumulative wealth. Finally, we evaluate the stability concerning the profit calculation window R ω . We set α=0.001 , ζ=0.5 , ε=5 , β ω =5 , and observe the changes in cumulative wealth for R ω ranging from 5 to 115. Specifically, we set R ω to be 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, and 115, and record the changes in cumulative wealth.

The cumulative wealth with α=0 in datasets NYSE-O and NYSE-N significantly exceed that with α=0.001 , which is not shown for convenience. The cumulative wealth diminished as the α increased. Clearly, the cumulative wealth of all datasets approached 0 when the α increased to 0.023. The curve of ζ remained almost flat across all datasets. Similarly, ε initially shows a trend of increasing or decreasing before flattening across all datasets. For β ω , a clear upward trend emerges beyond β ω =65 in dataset NYSE-N. For R ω , both upward and downward trends are slight transformations on MSCI, SP500, and NYSE-N, while a downward trend is observed in datasets TSE and NYSE-O. These parameter tests indicate that using ζ=0.5 , ε=5 , β ω =5 , and R ω =5 is sub-optimal, and better performance can be achieved by further adjusting parameters.

5. Conclusion and Prospects

In this study, we propose a novel risk asset price momentum measure for online portfolio optimization algorithms. Our approach introduces a novel index designed to quantify momentum trend effect and construct a novel portfolio optimization model. We evaluate the performance of our approach by comparing it with popular online investment algorithms, and our findings demonstrate its effectiveness. To measure the future performance of risk asset prices, we utilize the simple moving average technique. Our algorithm is straightforward to implement and can be executed effectively at scale.

The current model relies heavily on recent closing price data, which may not fully capture the true volatility of the market. To improve the predictive accuracy of the model, future research should expand data sources to include, but not limited to, key factors such as economic indicators, policy changes, and industry news. This additional information will provide the model with a more comprehensive view of the market and thus more effectively predict market shocks.

Credit Authorship Contribution Statement

Xiao-Ting Lv: Composing an initial manuscript. Cui-Yin Huang: Writing, Editing, Software. Hong-Liang Dai: Supervision, Writing reviewing.

Acknowledgements

This study received assistance by the National Social Science Foundation Major Project of China (23&ZD127), Natural Science Foundation General Program of Guangdong Province (2024A1515010111, 2023A1515011520), Tertiary Education Scientific Research Project of Guangzhou Municipal Education Bureau (202235324).

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Li, Y., Chen, C., Zheng, X., Wang, Y. and Gong, B. (2023) REFER: Randomized Online Factor Selection Framework for Portfolio Management. Expert Systems with Applications, 223, Article 119837.
https://doi.org/10.1016/j.eswa.2023.119837
[2] Li, Y., Fu, K., Zhao, Y. and Yang, C. (2022) How to Make Machine Select Stocks Like Fund Managers? Use Scoring and Screening Model. Expert Systems with Applications, 196, Article 116629.
https://doi.org/10.1016/j.eswa.2022.116629
[3] Zhang, Y., Liu, W. and Yang, X. (2022) An Automatic Trading System for Fuzzy Portfolio Optimization Problem with Sell Orders. Expert Systems with Applications, 187, Article 115822.
https://doi.org/10.1016/j.eswa.2021.115822
[4] Jegadeesh, N. and Titman, S. (1993) Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. The Journal of Finance, 48, 65-91.
https://doi.org/10.1111/j.1540-6261.1993.tb04702.x
[5] Geczy, C.C. and Samonov, M. (2016) Two Centuries of Price-Return Momentum. Financial Analysts Journal, 72, 32-56.
https://doi.org/10.2469/faj.v72.n5.1
[6] Cover, T.M. (1991) Universal Portfolios. Mathematical Finance, 1, 1-29.
https://doi.org/10.1111/j.1467-9965.1991.tb00002.x
[7] Helmbold, D.P., Schapire, R.E., Singer, Y. and Warmuth, M.K. (1998) Online Portfolio Selection Using Multiplicative Updates. Mathematical Finance, 8, 325-347.
https://doi.org/10.1111/1467-9965.00058
[8] Yang, X., He, J., Xian, J., Lin, H. and Zhang, Y. (2019) Aggregating Expert Advice Strategy for Online Portfolio Selection with Side Information. Soft Computing, 24, 2067-2081.
https://doi.org/10.1007/s00500-019-04039-7
[9] Lai, Z.R., Dai, D.Q., Ren, C.X. and Huang, K.K. (2018) A Peak Price Tracking-Based Learning System for Portfolio Selection. IEEE Transactions on Neural Networks & Learning Systems, 29, 2823-2832.
[10] Dai, H., Liang, C., Dai, H., Huang, C. and Adnan, R.M. (2022) An Online Portfolio Strategy Based on Trend Promote Price Tracing Ensemble Learning Algorithm. Knowledge-Based Systems, 239, Article 107957.
https://doi.org/10.1016/j.knosys.2021.107957
[11] Manujakshi, B.C., Kabadi, M.G., et al. (2022) A Hybrid Stock Price Prediction Model Based on PRE and Deep Neural Network. Data, 7, Article 51.
https://doi.org/10.3390/data7050051
[12] Soleymani, F. and Paquet, E. (2020) Financial Portfolio Optimization with Online Deep Reinforcement Learning and Restricted Stacked Autoencoder—Deep-Breath. Expert Systems with Applications, 156, Article 113456.
https://doi.org/10.1016/j.eswa.2020.113456
[13] Pan, H. and Long, M. (2021) Intelligent Portfolio Theory and Application in Stock Investment with Multi-Factor Models and Trend Following Trading Strategies. Procedia Computer Science, 187, 414-419.
https://doi.org/10.1016/j.procs.2021.04.116
[14] Li, Y., Zheng, X., Chen, C., Wang, J. and Xu, S. (2022) Exponential Gradient with Momentum for Online Portfolio Selection. Expert Systems with Applications, 187, Article 115889.
https://doi.org/10.1016/j.eswa.2021.115889
[15] Xu, X. and Zhang, Y. (2023) A High-Frequency Trading Volume Prediction Model Using Neural Networks. Decision Analytics Journal, 7, Article 100235.
https://doi.org/10.1016/j.dajour.2023.100235
[16] Egging-Bratseth, R. and Siddiqui, A.S. (2023) Stochastic Equilibria with Capacity Expansion: Increasing Expected Profit with Risk Aversion. Decision Analytics Journal, 7, Article 100234.
https://doi.org/10.1016/j.dajour.2023.100234
[17] Dai, Y. and Qin, Z. (2021) Multi-Period Uncertain Portfolio Optimization Model with Minimum Transaction Lots and Dynamic Risk Preference. Applied Soft Computing, 109, Article 107519.
https://doi.org/10.1016/j.asoc.2021.107519
[18] Yang, T. and Huang, X. (2022) Two New Mean–Variance Enhanced Index Tracking Models Based on Uncertainty Theory. The North American Journal of Economics and Finance, 59, Article 101622.
https://doi.org/10.1016/j.najef.2021.101622
[19] Agbemenou, A.K.H., Motamed, R. and Talaei-Khoei, A. (2023) A Predictive Analytics Model for Designing Deep Underground Foundations Using Artificial Neural Networks. Decision Analytics Journal, 7, Article 100220.
https://doi.org/10.1016/j.dajour.2023.100220
[20] Li, B. and Hoi, S.C.H. (2015) Online Portfolio Selection: Principles and Algorithms. CRC Press.
[21] Li, B. and Hoi, S.C.H. (2014) Online Portfolio Selection. ACM Computing Surveys, 46, 1-36.
https://doi.org/10.1145/2512962
[22] Rouwenhorst, K.G. (1998) International Momentum Strategies. The Journal of Finance, 53, 267-284.
https://doi.org/10.1111/0022-1082.95722
[23] Li, B., Hoi, S.C.H., Sahoo, D. and Liu, Z. (2015) Moving Average Reversion Strategy for Online Portfolio Selection. Artificial Intelligence, 222, 104-123.
https://doi.org/10.1016/j.artint.2015.01.006
[24] Khedmati, M. and Azin, P. (2020) An Online Portfolio Selection Algorithm Using Clustering Approaches and Considering Transaction Costs. Expert Systems with Applications, 159, 113546.
https://doi.org/10.1016/j.eswa.2020.113546
[25] Zhang, Y., Lin, H., Yang, X. and Long, W. (2021) Combining Expert Weights for Online Portfolio Selection Based on the Gradient Descent Algorithm. Knowledge-Based Systems, 234, Article 107533.
https://doi.org/10.1016/j.knosys.2021.107533
[26] Agarwal, A., Hazan, E., Kale, S. and Schapire, R.E. (2006). Algorithms for Portfolio Management Based on the Newton Method. Proceedings of the 23rd International Conference on Machine Learning, New York, 9-16.
https://doi.org/10.1145/1143844.1143846
[27] Yang, X., He, J., Xian, J., Lin, H. and Zhang, Y. (2019) Aggregating Expert Advice Strategy for Online Portfolio Selection with Side Information. Soft Computing, 24, 2067-2081.
https://doi.org/10.1007/s00500-019-04039-7
[28] Yang, X. and He, J. (2020) Universal Portfolio Selection Strategy by Aggregating Online Expert Advice. Optimization and Engineering, 23, 1-25.
[29] Barberis, N., Shleifer, A. and Vishny, R. (1998) A Model of Investor Sentiment. Journal of Financial Economics, 49, 307-343.
https://doi.org/10.1016/s0304-405x(98)00027-0
[30] Daniel, K., Hirshleifer, D. and Subrahmanyam, A. (1998) Investor Psychology and Security Market under and over Reactions. The Journal of Finance, 53, 1839-1885.
https://doi.org/10.1111/0022-1082.00077
[31] Stella, F. and Ventura, A. (2011) Defensive Online Portfolio Selection. International Journal of Financial Markets and Derivatives, 2, 88-105.
https://doi.org/10.1504/ijfmd.2011.038530
[32] Syam, A., Ghani, A.D. and Natsir, M.S. (2021) Moving Average and Relative Strength Index Indicators in Determining Open and Closed Positions on the Metatrader4 Expert Advisor. 2021 3rd International Conference on Cybernetics and Intelligent System (ICORIS), Makasar, 25-26 October 2021, 1-5.
[33] Tzang, S., Tsai, Y., Chang, C. and Yang, Y. (2017) Moving Average Timing Strategy from a Volatility Perspective: Evidence of the Taiwan Stock Market. In: Barolli, L. and Enokido, T., Eds., Innovative Mobile and Internet Services in Ubiquitous Computing, Springer International Publishing, 699-707.
https://doi.org/10.1007/978-3-319-61542-4_69
[34] He, J.N. and Peng, F.P. (2022) Adaptive Moment Estimation for Universal Portfolio Selection Strategy. Optimization and Engineering, 9, 1-29.
[35] Guo, S., Gu, J. and Ching, W. (2021) Adaptive Online Portfolio Selection with Transaction Costs. European Journal of Operational Research, 295, 1074-1086.
https://doi.org/10.1016/j.ejor.2021.03.023
[36] Nazir, A. (2021) Efficient Online Portfolio Simulation Using Dynamic Moving Average Model and Benchmark Index. International Journal of Modeling, Simulation, and Scientific Computing, 13, Article 2250018.
https://doi.org/10.1142/s1793962322500180
[37] Eom, C. and Park, J.W. (2023) Price Behavior of Small-Cap Stocks and Momentum: A Study Using Principal Component Momentum. Research in International Business and Finance, 65, Article 101908.
https://doi.org/10.1016/j.ribaf.2023.101908
[38] Lai, F.T., Liang, C.X., Huang, C.Y. and Dai, H.L. (2024) Online Adaptive Asset Tracking Algorithm with Ordinal Information. Journal of Computational and Cognitive Engineering, 3, 153-165.
[39] Janez, D. and Schuurmans, D. (2006) Statistical Comparisons of Classifiers over Multiple Data Sets. Journal of Machine Learning Research, 7, 1-30.
[40] Friedman, M. (1937) The Use of Ranks to Avoid the Assumption of Normality Implicit in the Analysis of Variance. Journal of the American Statistical Association, 32, 675-701.
https://doi.org/10.1080/01621459.1937.10503522
[41] Iman, R.L. and Davenport, J.M. (1980) Approximations of the Critical Region of the Fbietkan Statistic. Communications in StatisticsTheory and Methods, 9, 571-595.
https://doi.org/10.1080/03610928008827904
[42] Jalali, H., van den Broeke, M. and van Nieuwenhuyse, I. (2022) Platform and Product Design for Markets with Quality and Feature Sensitive Customers. International Journal of Production Economics, 244, Article 108354.
https://doi.org/10.1016/j.ijpe.2021.108354
[43] Ren, Q., Mu, M., Sun, G. and Wang, Q. (2022) A New Sensitivity Analysis Approach Using Conditional Nonlinear Optimal Perturbations and Its Preliminary Application. Advances in Atmospheric Sciences, 40, 285-304.
https://doi.org/10.1007/s00376-022-1445-3

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.