diff --git a/docs/Project.toml b/docs/Project.toml index d0bfe0f4..26929ddd 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,4 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" OnlinePortfolioSelection = "038f9fe3-14bd-47ca-b081-2e00e8c46dfa" diff --git a/docs/make.jl b/docs/make.jl index d79b6a98..09e752bc 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,16 +1,26 @@ using OnlinePortfolioSelection using Documenter +using DocumenterCitations +using Pkg DocMeta.setdocmeta!(OnlinePortfolioSelection, :DocTestSetup, :(using OnlinePortfolioSelection); recursive=true) +bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib")) +PROJECT_TOML = Pkg.TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml")) +VERSION_ = PROJECT_TOML["version"] +NAME = PROJECT_TOML["name"] +GITHUB = "https://github.com/shayandavoodii/OnlinePortfolioSelection.jl" makedocs(; modules=[OnlinePortfolioSelection], authors="Shayan Davoodi ", sitename="OnlinePortfolioSelection.jl", checkdocs=:exports, + plugins=[bib], format=Documenter.HTML(; canonical="https://shayandavoodii.github.io/OnlinePortfolioSelection.jl", - prettyurls = get(ENV, "CI", nothing) == "true" + prettyurls = get(ENV, "CI", nothing) == "true", + assets=String["assets/citations.css"], + footer="[$NAME.jl]($GITHUB) v$VERSION_ docs powered by [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl).", ), pages=Any[ "Home" => "index.md", @@ -26,6 +36,7 @@ makedocs(; ], "Performance Evaluation" => "performance_eval.md", "Functions" => "funcs.md", + "References" => "refs.md", ], ) diff --git a/docs/src/Combined.md b/docs/src/Combined.md index 8b3566e0..d66ef7b4 100644 --- a/docs/src/Combined.md +++ b/docs/src/Combined.md @@ -5,7 +5,7 @@ Nowadays researchers are trying to take advantage of each strategy and propose n 2. MRvol ## LOcal ADaptive learning system (LOAD) -[Guan & An (2019)](https://doi.org/10.1016/j.knosys.2019.104958) proposed a new OPS method, named LOcal ADaptive learning system (LOAD), which is a combination of the Follow the Winner (FW) and Follow the Loser principles. They tried to find the stocks that have a positive trend in the most recent time window by fitting a linear regression on the price data of the stocks against time. They used momentum principle to predict the next price of assets in this case. On the other hand, for the stocks that does not have a satisfactory trend in the most recent time window, they used the mean reversion principle to predict the next price of assets. They claim that through this fusion, the overall system can be more adaptive and effective than systems based on single strategies. After predicting the next prices, the next relative prices are predicted and used in the portfolio optimization. +[GUAN2019104958](@citet) proposed a new OPS method, named LOcal ADaptive learning system (LOAD), which is a combination of the Follow the Winner (FW) and Follow the Loser principles. They tried to find the stocks that have a positive trend in the most recent time window by fitting a linear regression on the price data of the stocks against time. They used momentum principle to predict the next price of assets in this case. On the other hand, for the stocks that does not have a satisfactory trend in the most recent time window, they used the mean reversion principle to predict the next price of assets. They claim that through this fusion, the overall system can be more adaptive and effective than systems based on single strategies. After predicting the next prices, the next relative prices are predicted and used in the portfolio optimization. ### Run LOAD @@ -64,7 +64,7 @@ It is worht mentioning that each metric can be accessed individually by writing ## MRvol -Combination of meta-learning algorithms with other strategies are also investogated. For example, [Lin et al. (2023)](https://doi.org/10.1016/j.eswa.2023.121472) proposed a new OPS method, named MRvol, which is a combination of the Follow the Loser (FL) and Meta-Learning (ML) strategies. First, they try to select the stocks that have the relative price bellow than 1 as the first filter, and then search for the stock that have the most relative volume value among the filtered stocks as the second filter. Then, they apply a meta-algorithm to integrate expert opinions (i.e., expert strategies), which are obtained based on mean reversion and trading volume. Thirdly, they determine the window size of the expert strategy as W and establish an expert strategy. When the expert constructs a stock portfolio, he/she identifies an investment target asset for each period, so there are W investment target assets. As they said, in order to reduce investment risk and increase diversification of investment, this paper considers using moving window data of different sizes to construct a pool of expert strategies, which is also called a pool of expert opinions, and then applies meta-algorithm in machine learning technique to integrate expert opinions to propose an investment strategy. +Combination of meta-learning algorithms with other strategies are also investogated. For example, [LIN2024121472](@citet) proposed a new OPS method, named MRvol, which is a combination of the Follow the Loser (FL) and Meta-Learning (ML) strategies. First, they try to select the stocks that have the relative price bellow than 1 as the first filter, and then search for the stock that have the most relative volume value among the filtered stocks as the second filter. Then, they apply a meta-algorithm to integrate expert opinions (i.e., expert strategies), which are obtained based on mean reversion and trading volume. Thirdly, they determine the window size of the expert strategy as W and establish an expert strategy. When the expert constructs a stock portfolio, he/she identifies an investment target asset for each period, so there are W investment target assets. As they said, in order to reduce investment risk and increase diversification of investment, this paper considers using moving window data of different sizes to construct a pool of expert strategies, which is also called a pool of expert opinions, and then applies meta-algorithm in machine learning technique to integrate expert opinions to propose an investment strategy. ### Run MRvol @@ -133,4 +133,11 @@ julia> metrics.Sn 1.0277067897356449 ``` -The result of `metrics.Sn` indicates that if we had invested in the given period, we would have gained ~2.8% profit. It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. \ No newline at end of file +The result of `metrics.Sn` indicates that if we had invested in the given period, we would have gained ~2.8% profit. It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/FL.md b/docs/src/FL.md index 9fd0b202..88c4b114 100644 --- a/docs/src/FL.md +++ b/docs/src/FL.md @@ -1,6 +1,6 @@ # Follow the Loser (FL) -The "Follow the Loser" (FL) strategy, introduced by Borodin and [Vincent (2004)](https://proceedings.neurips.cc/paper/2003/hash/8c9f32e03aeb2e3000825c8c875c4edd-Abstract.html), involves reallocating investment weight from a stock with a superior past performance to a stock with unfavorable performance. This approach is grounded in the belief that a stock exhibiting undesirable past performance may offer a favorable return in the future. Presently, this package includes the following FL strategies: +The "Follow the Loser" (FL) strategy, introduced by [borodin2003can](@citet), involves reallocating investment weight from a stock with a superior past performance to a stock with unfavorable performance. This approach is grounded in the belief that a stock exhibiting undesirable past performance may offer a favorable return in the future. Presently, this package includes the following FL strategies: 1. Reweighted Price Relative Tracking System for Automatic Portfolio Optimization 2. Anti-Correlation (Anticor) @@ -9,7 +9,7 @@ The "Follow the Loser" (FL) strategy, introduced by Borodin and [Vincent (2004)] ## Reweighted Price Relative Tracking System for Automatic Portfolio Optimization (RPRT) -RPRT, a "Follow the Loser" (FL) strategy introduced by [Lai et al. (2018)](https://doi.org/10.1109/TSMC.2018.2852651), automatically allocates distinct weights to price relative predictions based on each asset's performance during the price prediction phase. These weights are continually adjusted. In the portfolio optimization phase, the authors introduced a novel tracking system with a flexible increasing factor to maximize future wealth in the next period. Their study resulted in the design of an efficient algorithm to address portfolio optimization objectives, suitable for large-scale and time-limited scenarios. Through extensive experiments involving six benchmark datasets from real financial markets, encompassing varied assets and time spans, RPRT demonstrated superior performance compared to other state-of-the-art systems. It showcased better cumulative wealth, mean excess return, annual percentage yield, and typical risk metrics. Additionally, RPRT exhibited resilience to substantial transaction costs and delivered swift performance, highlighting its effectiveness and efficiency as an online portfolio selection system. +RPRT, a "Follow the Loser" (FL) strategy introduced by [8411138](@citet), automatically allocates distinct weights to price relative predictions based on each asset's performance during the price prediction phase. These weights are continually adjusted. In the portfolio optimization phase, the authors introduced a novel tracking system with a flexible increasing factor to maximize future wealth in the next period. Their study resulted in the design of an efficient algorithm to address portfolio optimization objectives, suitable for large-scale and time-limited scenarios. Through extensive experiments involving six benchmark datasets from real financial markets, encompassing varied assets and time spans, RPRT demonstrated superior performance compared to other state-of-the-art systems. It showcased better cumulative wealth, mean excess return, annual percentage yield, and typical risk metrics. Additionally, RPRT exhibited resilience to substantial transaction costs and delivered swift performance, highlighting its effectiveness and efficiency as an online portfolio selection system. See [`rprt`](@ref). @@ -83,7 +83,7 @@ It is worht mentioning that each metric can be accessed individually by writing ## Anti-Correlation (Anticor) -Anticor is an FL strategy introduced by [Borodin and El-Yaniv (2004)](https://www.doi.org/10.1613/jair.1336). The strategy aims to capitalize on the mean-reversion attribute of asset prices. It transfers wealth from asset $i$ to asset $j$ within two consecutive market windows of size $w$ if the growth rate of asset $i$ exceeds that of asset $j$ in the most recent window. It is also contingent on a positive correlation between asset $i$ in the second last window and asset $j$ in the last window. The extent of wealth transferred from asset $i$ to $j$ depends on the correlation strength between the assets and the degree of "self-anti-correlations" for each asset $i$. [[1](https://rdrr.io/github/ngloe/olpsR/man/alg_Anticor.html)] +Anticor is an FL strategy introduced by [borodin2003can](@citet). The strategy aims to capitalize on the mean-reversion attribute of asset prices. It transfers wealth from asset $i$ to asset $j$ within two consecutive market windows of size $w$ if the growth rate of asset $i$ exceeds that of asset $j$ in the most recent window. It is also contingent on a positive correlation between asset $i$ in the second last window and asset $j$ in the last window. The extent of wealth transferred from asset $i$ to $j$ depends on the correlation strength between the assets and the degree of "self-anti-correlations" for each asset $i$. [[1](https://rdrr.io/github/ngloe/olpsR/man/alg_Anticor.html)] See [`anticor`](@ref). @@ -159,7 +159,7 @@ It is worht mentioning that each metric can be accessed individually by writing ## Online Moving Average Reversion (OLMAR) -The OLMAR algorithm, short for On-Line Moving Average Reversion, introduces a novel approach to online portfolio selection. It incorporates multi-period mean reversion by utilizing “Moving Average Reversion” (MAR), which predicts next price relatives through moving averages. As far as the available literature indicates, OLMAR is the initial algorithm to employ moving averages within the framework of online portfolio selection [[1](https://www.sciencedirect.com/science/article/pii/S0004370215000168)]. While relatively straightforward, OLMAR includes a reasonable updating strategy and has been empirically validated through extensive real-market experiments. +The OLMAR algorithm, short for On-Line Moving Average Reversion ([li2012online](@citet)), introduces a novel approach to online portfolio selection. It incorporates multi-period mean reversion by utilizing “Moving Average Reversion” (MAR), which predicts next price relatives through moving averages. As far as the available literature indicates, OLMAR is the initial algorithm to employ moving averages within the framework of online portfolio selection [LI2015104](@cite). While relatively straightforward, OLMAR includes a reasonable updating strategy and has been empirically validated through extensive real-market experiments. See [`olmar`](@ref). @@ -233,7 +233,7 @@ It is worht mentioning that each metric can be accessed individually by writing ## Passive Aggressive Mean Reversion (PAMR) -The Passive Aggressive Mean Reversion (PAMR) algorithm ([Li et al., 2012](https://www.doi.org/10.1007/s10994-012-5281-z)) is a machine learning model employed in the domain of quantitative finance, specifically designed for trading strategies in mean-reverting markets. PAMR employs a passive-aggressive learning approach to adjust portfolio weights in response to deviations from the mean, aiming to capitalize on mean reversion phenomena prevalent in financial markets. The algorithm's core component, the step size $\tau_t$, is determined by the ratio of the observed error $\ell_{\in}^t$ to the squared norm of the discrepancy between the current feature vector $\mathbf{x}_t$ and the mean feature vector $\bar{x}_t$ up to time $t$. The formula for the step size in PAMR is expressed as: +The Passive Aggressive Mean Reversion (PAMR) algorithm ([Li2012-ks](@citet)) is a machine learning model employed in the domain of quantitative finance, specifically designed for trading strategies in mean-reverting markets. PAMR employs a passive-aggressive learning approach to adjust portfolio weights in response to deviations from the mean, aiming to capitalize on mean reversion phenomena prevalent in financial markets. The algorithm's core component, the step size $\tau_t$, is determined by the ratio of the observed error $\ell_{\in}^t$ to the squared norm of the discrepancy between the current feature vector $\mathbf{x}_t$ and the mean feature vector $\bar{x}_t$ up to time $t$. The formula for the step size in PAMR is expressed as: ```math \tau_t = \frac{{\ell_{\in}^t}}{{\left\| {\mathbf{x}_t - \bar{x}_t \mathbf{1}} \right\|^2}} @@ -343,4 +343,11 @@ Annualized Standard Deviation: 0.2365856617445457 In this case, the algorithm has a better performance in terms of the cumulative return, annualized sharpe ratio, and calmar ratio. However, the maximum drawdown is slightly higher than the PAMR algorithm. The same procedure can be applied to the PAMR-2 algorithm (see [`PAMR2`](@ref)). -It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. \ No newline at end of file +It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/FW.md b/docs/src/FW.md index 7fcc04d1..9e930bda 100644 --- a/docs/src/FW.md +++ b/docs/src/FW.md @@ -8,7 +8,7 @@ The Follow the Winner (FW) strategies operate on the principle that assets that ## Universal Portfolio -Universal Portfolio (UP) is a Follow the Winner (FW) strategy introduced by [Cover (1991)](https://doi.org/10.1111/j.1467-9965.1991.tb00002.x). This algorithm is designed to optimize the cumulative return of a portfolio over the investment horizon. UP's approach is centered on daily stock market performance and the distribution of wealth invested in individual stocks. +Universal Portfolio (UP) is a Follow the Winner (FW) strategy introduced by [COVER451321](@citet). This algorithm is designed to optimize the cumulative return of a portfolio over the investment horizon. UP's approach is centered on daily stock market performance and the distribution of wealth invested in individual stocks. See [`up`](@ref). @@ -78,7 +78,7 @@ It is worht mentioning that each metric can be accessed individually by writing ## Exponential Gradient -Exponential Gradient (EG) is a FW strategy introduced by [Helmbold et al. (1998)](https://onlinelibrary.wiley.com/doi/10.1111/1467-9965.00058). The authors assert that EG can nearly attain the same wealth as the best constant rebalanced portfolio (BCRP), discerned retrospectively from the actual market outcomes. This algorithm is notably straightforward to implement. +Exponential Gradient (EG) is a FW strategy introduced by [https://doi.org/10.1111/1467-9965.00058](@citet). The authors assert that EG can nearly attain the same wealth as the best constant rebalanced portfolio (BCRP), discerned retrospectively from the actual market outcomes. This algorithm is notably straightforward to implement. See [`eg`](@ref). @@ -146,7 +146,7 @@ It is worht mentioning that each metric can be accessed individually by writing ## Price Peak Tracking (PPT) -The Price Peak Tracking (PPT) algorithm ([Lai et al., 2017](https://doi.org/10.1109/TNNLS.2017.2705658)) is a novel linear learning system for online portfolio selection, based on the idea of tracking control. The algorithm uses a transform function that aggressively tracks the increasing power of different assets, and allocates more investment to the better performing ones. The PPT objective can be solved by a fast backpropagation algorithm, which is suitable for large-scale and time-limited applications, such as high-frequency trading. The algorithm has been shown to outperform other state-of-the-art systems in computational time, cumulative wealth, and risk-adjusted metrics (See [`ppt`](@ref)). +The Price Peak Tracking (PPT) algorithm ([7942104](@citet)) is a novel linear learning system for online portfolio selection, based on the idea of tracking control. The algorithm uses a transform function that aggressively tracks the increasing power of different assets, and allocates more investment to the better performing ones. The PPT objective can be solved by a fast backpropagation algorithm, which is suitable for large-scale and time-limited applications, such as high-frequency trading. The algorithm has been shown to outperform other state-of-the-art systems in computational time, cumulative wealth, and risk-adjusted metrics (See [`ppt`](@ref)). Let's run the algorithm on the real market data. @@ -202,4 +202,11 @@ julia> results.MER -0.15974968844419762 ``` -It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. \ No newline at end of file +It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/ML.md b/docs/src/ML.md index fe39c1d4..d5b69aa1 100644 --- a/docs/src/ML.md +++ b/docs/src/ML.md @@ -6,7 +6,7 @@ Meta-learning strategies are employed to combine opinions from experts to formul ## Combination Weights based on Online Gradient Descent (CW-OGD) -[Zhang et al. (2021)](https://doi.org/10.1016/j.knosys.2021.107533) introduced a novel online portfolio selection algorithm leveraging a weighted learning technique and an online gradient descent algorithm. Their strategy demonstrates enhanced robustness by integrating various expert strategies and successfully addresses the challenge of complex computational time. To begin, the authors establish an expert pool encompassing numerous basic expert strategies, among which the strategy investing in a single stock is chosen as the fundamental expert strategy. Subsequently, they employ a loss function to assess the performance of each basic expert strategy and utilize the OGD algorithm to adjust the weight vector for the experts based on their losses. +[ZHANG2021107533](@citet) introduced a novel online portfolio selection algorithm leveraging a weighted learning technique and an online gradient descent algorithm. Their strategy demonstrates enhanced robustness by integrating various expert strategies and successfully addresses the challenge of complex computational time. To begin, the authors establish an expert pool encompassing numerous basic expert strategies, among which the strategy investing in a single stock is chosen as the fundamental expert strategy. Subsequently, they employ a loss function to assess the performance of each basic expert strategy and utilize the OGD algorithm to adjust the weight vector for the experts based on their losses. ### Run CW-OGD @@ -70,4 +70,9 @@ juila> metrics.Sn The result indicates that if we had invested in the given period, we would have gained ~3.2% profit. It is worht mentioning that each metric can be accessed individually by writing `results.` and pressing the `Tab` key. Note that one can individually investigate the performance of the algorithm regarding each metric. See [`sn`](@ref), [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref). See [Performance evaluation](@ref) section for more information. - \ No newline at end of file +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` diff --git a/docs/src/PM.md b/docs/src/PM.md index 10cbcf4c..9eb4ed3c 100644 --- a/docs/src/PM.md +++ b/docs/src/PM.md @@ -13,7 +13,7 @@ Pattern-matching algorithms stand among the most popular strategies in the domai ## Correlation-driven Nonparametric Learning -Correlation-driven Nonparametric Learning (CORN) is a pattern-matching algorithm introduced by [Borodin et al. (2010)](https://doi.org/10.1145/1961189.1961193). CORN employs correlation as the measure of similarity between different time windows. Within CORN, multiple experts are defined to generate portfolios. Each trading day involves a combination of expert portfolios to create the final portfolio. The distinction between CORN-K and CORN-U lies in their portfolio construction methods. CORN-K selects the K best experts, determined by their historical performance, to create the final portfolio. Conversely, CORN-U amalgamates all experts uniformly to construct the final portfolio. For further details, refer to [`cornu`](@ref) and [`cornk`](@ref). +Correlation-driven Nonparametric Learning (CORN) is a pattern-matching algorithm introduced by [10.1145/1961189.1961193](@citet). CORN employs correlation as the measure of similarity between different time windows. Within CORN, multiple experts are defined to generate portfolios. Each trading day involves a combination of expert portfolios to create the final portfolio. The distinction between CORN-K and CORN-U lies in their portfolio construction methods. CORN-K selects the K best experts, determined by their historical performance, to create the final portfolio. Conversely, CORN-U amalgamates all experts uniformly to construct the final portfolio. For further details, refer to [`cornu`](@ref) and [`cornk`](@ref). ### Run CORN-U @@ -94,7 +94,7 @@ Expectedly, CORN-K performed better than CORN-U on the same dataset. The result ## Dynamic RIsk CORrelation-driven Non-parametric -[Dynamic Risk CORrelation-driven Non-parametric (DRICORN)](https://www.doi.org/10.1007/978-3-030-66151-9_12) employs a similar principle to CORN-K. However, DRICORN incorporates the beta of the portfolio as a risk measure in the portfolio optimization. Additionally, it considers the recent market trend to capitalize on positive risks while minimizing exposure to negative risks. For further details, refer to [`dricornk`](@ref). +[Dynamic Risk CORrelation-driven Non-parametric (DRICORN)](@cite 10.1007/978-3-030-66151-9_12) employs a similar principle to CORN-K. However, DRICORN incorporates the beta of the portfolio as a risk measure in the portfolio optimization. Additionally, it considers the recent market trend to capitalize on positive risks while minimizing exposure to negative risks. For further details, refer to [`dricornk`](@ref). ### Run DRICORN-K @@ -133,7 +133,7 @@ The result indicates that the algorithm has lost ~2.6% of the initial wealth dur ## Bᴷ -Bᴷ, presented as a type of kernel-based investment strategy, is a pattern-matching algorithm introduced by Györfi et al. (2006). In essence, Bᴷ shares similarities with histogram-based strategies, albeit utilizing more flexible elementary strategies that replace rigid past market vector discretization with a "moving-window" rule. This implementation incorporates the uniform kernel function. Check [`bk`](@ref) for more information. +Bᴷ, presented as a type of kernel-based investment strategy, is a pattern-matching algorithm introduced by [https://doi.org/10.1111/j.1467-9965.2006.00274.x](@citet). In essence, Bᴷ shares similarities with histogram-based strategies, albeit utilizing more flexible elementary strategies that replace rigid past market vector discretization with a "moving-window" rule. This implementation incorporates the uniform kernel function. Check [`bk`](@ref) for more information. ### Run Bᴷ @@ -177,7 +177,7 @@ The result indicates that the algorithm has lost ~3% of the initial wealth durin ## ClusLog -ClusLog contains some variant of models proposed by [Khedmati & Azin (2020)](https://doi.org/10.1016/j.eswa.2020.113546), namely, KMNLOG and KMDLOG. The main idea behind these algorithms is to cluster the historical time windows based on their inter-correlation. Then, the algorithm uses a day after the found time windows as the potential day to occur with the same pattern for tomorrow. In order to perform the portfolio selection, the algorithm uses the semi-log optimal approach in order to maximize the expected return of the portfolio. See [`cluslog`](@ref). +ClusLog contains some variant of models proposed by [KHEDMATI2020113546](@citet), namely, KMNLOG and KMDLOG. The main idea behind these algorithms is to cluster the historical time windows based on their inter-correlation. Then, the algorithm uses a day after the found time windows as the potential day to occur with the same pattern for tomorrow. In order to perform the portfolio selection, the algorithm uses the semi-log optimal approach in order to maximize the expected return of the portfolio. See [`cluslog`](@ref). ### Run ClusLog @@ -228,4 +228,11 @@ julia> sn(model.b, rel_price) 0.9817775041346212 ``` -The result indicates that the algorithm has lost ~1.8% of the initial wealth during the investment period. Further analysis of the algorithm can be done by using the [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref) functions. See [Performance evaluation](@ref) section for more information. \ No newline at end of file +The result indicates that the algorithm has lost ~1.8% of the initial wealth during the investment period. Further analysis of the algorithm can be done by using the [`ann_std`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`mdd`](@ref), and [`calmar`](@ref) functions. See [Performance evaluation](@ref) section for more information. + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/assets/citations.css b/docs/src/assets/citations.css new file mode 100644 index 00000000..aa151035 --- /dev/null +++ b/docs/src/assets/citations.css @@ -0,0 +1,17 @@ +.citation dl { + display: grid; + grid-template-columns: max-content auto; } +.citation dt { + grid-column-start: 1; } +.citation dd { + grid-column-start: 2; + margin-bottom: 0.75em; } +.citation ul { + padding: 0 0 2.25em 0; + margin: 0; + list-style: none;} +.citation ul li { + text-indent: -2.25em; + margin: 0.33em 0.5em 0.5em 2.25em;} +.citation ol li { + padding-left:0.75em;} \ No newline at end of file diff --git a/docs/src/benchmark.md b/docs/src/benchmark.md index a3697956..825e16f1 100644 --- a/docs/src/benchmark.md +++ b/docs/src/benchmark.md @@ -6,7 +6,7 @@ In the domain of online portfolio selection, certain strategies are considered b 3. Uniform Portfolio (1/N) ## CRP -Let's run the algorithm on the real market data. Assume the data (named as `prices`) is collected as noted in the [Fetch Data](@ref) section. +Let's run the algorithm [COVER451321](@cite) on the real market data. Assume the data (named as `prices`) is collected as noted in the [Fetch Data](@ref) section. ```julia juila> using OnlinePortfolioSelection @@ -66,7 +66,7 @@ julia> results.MDD ## BS -The model is a variant of the BAH strategy that retroactively acquires the best stock. Within this package, users can select the number of days to retrospectively examine (using the `last_n` keyword argument) and identify the best stock. If `last_n` is either not provided or set to `0`, the algorithm will consider the entire dataset up to the present day for each period to identify the best stock. Conversely, if `last_n` is specified, the algorithm will only consider the performance of each stock within the last `last_n` days and then select the best-performing one. To implement the algorithm on real market data, let's assume the data is collected as detailed in the [Fetch Data](@ref) section. +The model [KBSSMOP](@cite) is a variant of the BAH strategy that retroactively acquires the best stock. Within this package, users can select the number of days to retrospectively examine (using the `last_n` keyword argument) and identify the best stock. If `last_n` is either not provided or set to `0`, the algorithm will consider the entire dataset up to the present day for each period to identify the best stock. Conversely, if `last_n` is specified, the algorithm will only consider the performance of each stock within the last `last_n` days and then select the best-performing one. To implement the algorithm on real market data, let's assume the data is collected as detailed in the [Fetch Data](@ref) section. ```julia juila> using OnlinePortfolioSelection @@ -162,4 +162,11 @@ julia> sn(m_uni.b, rel_price) The result reveals that if investment had been made during the specified period, a loss of approximately 3.9% of the capital would have been incurred. It's noteworthy that [`sn`](@ref) automatically accounts for the last 10 relative prices in this context. -Additionally, this package offers functions for assessing the algorithm's performance. For further details, refer to the [Performance evaluation](@ref) section. \ No newline at end of file +Additionally, this package offers functions for assessing the algorithm's performance. For further details, refer to the [Performance evaluation](@ref) section. + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/index.md b/docs/src/index.md index 989ffd5d..9e9a62aa 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -6,7 +6,7 @@ end # Introduction -Online Portfolio Selection (OPS) strategies represent trading algorithms that sequentially allocate capital among a pool of assets with the aim of maximizing investment returns. This forms a fundamental issue in computational finance, extensively explored across various research domains, including finance, statistics, artificial intelligence, machine learning, and data mining. Framed within an online machine learning context, OPS is defined as a sequential decision problem, providing a range of advanced approaches to tackle this challenge. These approaches categorize into benchmarks, “Follow-the-Winner” and “Follow-the-Loser” strategies, “Pattern-Matching” based methodologies, and "Meta-Learning" Algorithms [[1](https://arxiv.org/abs/1212.2129)]. +Online Portfolio Selection (OPS) strategies represent trading algorithms that sequentially allocate capital among a pool of assets with the aim of maximizing investment returns. This forms a fundamental issue in computational finance, extensively explored across various research domains, including finance, statistics, artificial intelligence, machine learning, and data mining. Framed within an online machine learning context, OPS is defined as a sequential decision problem, providing a range of advanced approaches to tackle this challenge. These approaches categorize into benchmarks, “Follow-the-Winner” and “Follow-the-Loser” strategies, “Pattern-Matching” based methodologies, and "Meta-Learning" Algorithms [li2013online](@cite). This package offers an efficient implementation of OPS algorithms in Julia, ensuring complete type stability. All algorithms yield an [`OPSAlgorithm`](@ref) object, permitting inquiries into portfolio weights, asset count, and algorithm names. Presently, eighteen algorithms are incorporated, with ongoing plans for further additions. The existing algorithms are as follows: - Constant Rebalanced Portfolio (CRP) @@ -153,4 +153,11 @@ julia> comp_algs = DataFrame( 3 │ DRICORN-K -0.248393 -1.20933 0.221934 -2.54505 0.0975985 ``` -The comparison analysis, via `comp_algs`, highlights that CORN-K outperforms the other algorithms in terms of annualized percentage yield (APY), annualized Sharpe ratio, Calmar ratio, and maximum drawdown (MDD). However, it's essential to note that the annualized standard deviation of CORN-K surpasses that of the other algorithms within this dataset. These individual metrics can be computed separately by using corresponding functions such as [`sn`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`ann_std`](@ref), [`calmar`](@ref), and [`mdd`](@ref). For further insights and details, please refer to the [Performance evaluation](@ref). \ No newline at end of file +The comparison analysis, via `comp_algs`, highlights that CORN-K outperforms the other algorithms in terms of annualized percentage yield (APY), annualized Sharpe ratio, Calmar ratio, and maximum drawdown (MDD). However, it's essential to note that the annualized standard deviation of CORN-K surpasses that of the other algorithms within this dataset. These individual metrics can be computed separately by using corresponding functions such as [`sn`](@ref), [`apy`](@ref), [`ann_sharpe`](@ref), [`ann_std`](@ref), [`calmar`](@ref), and [`mdd`](@ref). For further insights and details, please refer to the [Performance evaluation](@ref). + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/performance_eval.md b/docs/src/performance_eval.md index 49b8405d..b60ae779 100644 --- a/docs/src/performance_eval.md +++ b/docs/src/performance_eval.md @@ -25,7 +25,7 @@ MER = {1 \over n}\sum\nolimits_{t = 1}^n {{R_t} - } {1 \over n}\sum\nolimits_{t ``` where $R$ and ${R_t^*}$ represent the daily returns of a portfolio and the market strategy at the $t$th trading day, respectively. For a given OPS method, accounting for transaction costs, ${{R_t}}$ is calculated by ${R_t} = \left( {\mathbf{x}_t\mathbf{b}_t} \right) \times \left( {1 - {\nu \over 2} \times \sum\nolimits_{i = 1}^d {\left| {{b_{t,i}} - {{\tilde b}_{t,i}}} \right|} } \right) - 1$. The market strategy initially allocates capital equally among all assets and remains unchanged. ${R_t^*}$ is defined as: -$R_t^* = \mathbf{x}_t \cdot \mathbf{b}^* - 1$ and ${\mathbf{b}^*} = {\left( {{1 \over d},{1 \over d}, \ldots ,{1 \over d}} \right)^ \top }$, where $d$ is the number of assets, and $n$ is the number of trading days. This metric can be calculated using the [`mer`](@ref) function. (see [[1](https://doi.org/10.1016/j.patcog.2023.109872)] for more details.) +$R_t^* = \mathbf{x}_t \cdot \mathbf{b}^* - 1$ and ${\mathbf{b}^*} = {\left( {{1 \over d},{1 \over d}, \ldots ,{1 \over d}} \right)^ \top }$, where $d$ is the number of assets, and $n$ is the number of trading days. This metric can be calculated using the [`mer`](@ref) function. (see [XI2023109872](@cite) for more details.) - Annualized Return (APY) @@ -203,4 +203,11 @@ Annualized Standard Deviation: 0.312367085936459 Calmar Ratio: 11.026402121997583 ``` -As shown, the results are consistent with the results obtained using the [`OPSMetrics`](@ref) function. \ No newline at end of file +As shown, the results are consistent with the results obtained using the [`OPSMetrics`](@ref) function. + +## References + +```@bibliography +Pages = [@__FILE__] +Canonical = false +``` \ No newline at end of file diff --git a/docs/src/python.md b/docs/src/python.md index d269a114..e0a92872 100644 --- a/docs/src/python.md +++ b/docs/src/python.md @@ -12,7 +12,7 @@ Generally, Julia packages can be used in a Python environment with ease by emplo >>> from julia import OnlinePortfolioSelection as OPS ``` -# Run [MRvol](@ref) Algorithm +# Run [MRvol](@ref) Algorithm In this instance, I'm demonstrating the execution of the [MRvol](@ref) algorithm. ```python diff --git a/docs/src/refs.bib b/docs/src/refs.bib new file mode 100644 index 00000000..04f3766b --- /dev/null +++ b/docs/src/refs.bib @@ -0,0 +1,237 @@ +@article{borodin2003can, +title={Can we learn to beat the best stock}, +author={Borodin, Allan and El-Yaniv, Ran and Gogan, Vincent}, +journal={Advances in Neural Information Processing Systems}, +volume={16}, +year={2003} +} + +@article{https://doi.org/10.1111/j.1467-9965.2006.00274.x, +author = {Györfi, László and Lugosi, Gábor and Udina, Frederic}, +title = {NONPARAMETRIC KERNEL-BASED SEQUENTIAL INVESTMENT STRATEGIES}, +journal = {Mathematical Finance}, +volume = {16}, +number = {2}, +pages = {337-357}, +keywords = {sequential investment, universal portfolios, kernel estimation}, +doi = {https://doi.org/10.1111/j.1467-9965.2006.00274.x}, +url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1467-9965.2006.00274.x}, +eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.1467-9965.2006.00274.x}, +abstract = {The purpose of this paper is to introduce sequential investment strategies that guarantee an optimal rate of growth of the capital, under minimal assumptions on the behavior of the market. The new strategies are analyzed both theoretically and empirically. The theoretical results show that the asymptotic rate of growth matches the optimal one that one could achieve with a full knowledge of the statistical properties of the underlying process generating the market, under the only assumption that the market is stationary and ergodic. The empirical results show that the performance of the proposed investment strategies measured on past nyse and currency exchange data is solid, and sometimes even spectacular.}, +year = {2006} +} + +@article{KBSSMOP, +author = {GY\"{O}RFI, L\'{A}SZL\'{O} and URB\'{A}N, ANDR\'{A}S and VAJDA, ISTV\'{A}N}, +title = {KERNEL-BASED SEMI-LOG-OPTIMAL EMPIRICAL PORTFOLIO SELECTION STRATEGIES}, +journal = {International Journal of Theoretical and Applied Finance}, +volume = {10}, +number = {03}, +pages = {505-516}, +year = {2007}, +doi = {10.1142/S0219024907004251}, +URL = {https://doi.org/10.1142/S0219024907004251}, +eprint = {https://doi.org/10.1142/S0219024907004251}, +abstract = { The purpose of this paper is to introduce an approximation of the kernel-based log-optimal investment strategy that guarantees an almost optimal rate of growth of the capital under minimal assumptions on the behavior of the market. The new strategy uses much less knowledge on the distribution of the market process. It is analyzed both theoretically and empirically. The theoretical results show that the asymptotic rate of growth well approximates the optimal one that one could achieve with a full knowledge of the statistical properties of the underlying process generating the market, under the only assumption that the market is stationary and ergodic. The empirical results show that the proposed semi-log-optimal and the log-optimal strategies have essentially the same performance measured on past NYSE data.} +} + +@article{KHEDMATI2020113546, +title = {An online portfolio selection algorithm using clustering approaches and considering transaction costs}, +journal = {Expert Systems with Applications}, +volume = {159}, +pages = {113546}, +year = {2020}, +issn = {0957-4174}, +doi = {https://doi.org/10.1016/j.eswa.2020.113546}, +url = {https://www.sciencedirect.com/science/article/pii/S0957417420303705}, +author = {Majid Khedmati and Pejman Azin}, +keywords = {Online portfolio selection, Algorithmic trading, Pattern-matching, Data mining, Clustering}, +abstract = {This paper presents an online portfolio selection algorithm based on pattern matching principle where it makes a decision on the optimal portfolio in each period and updates the optimal portfolio at the beginning of each period. The proposed method consists of two steps: i) sample selection, ii) portfolio optimization. First, in the sample selection, clustering algorithms including k-means, k-medoids, spectral and hierarchical clustering are applied to discover time windows (TW) similar to the recent time window. Then, after finding the similar time windows and predicting the market behavior of the next day, the optimum function along with the transaction cost is used in the portfolio optimization step in which, four algorithms including KMNLOG, KMDLOG, SPCLOG and HRCLOG are proposed for this purpose. The presented algorithms are applied on 5 different datasets with different characteristics including different markets, stocks, and time periods, and their performance has been evaluated. The results show that the provided algorithms in this paper, have better performance in terms of efficiency compared to the algorithms provided in the literature.} +} + +@article{10.1145/1961189.1961193, +author = {Li, Bin and Hoi, Steven C.H. and Gopalkrishnan, Vivekanand}, +title = {CORN: Correlation-Driven Nonparametric Learning Approach for Portfolio Selection}, +year = {2011}, +issue_date = {April 2011}, +publisher = {Association for Computing Machinery}, +address = {New York, NY, USA}, +volume = {2}, +number = {3}, +issn = {2157-6904}, +url = {https://doi.org/10.1145/1961189.1961193}, +doi = {10.1145/1961189.1961193}, +abstract = {Machine learning techniques have been adopted to select portfolios from financial markets in some emerging intelligent business applications. In this article, we propose a novel learning-to-trade algorithm termed CORrelation-driven Nonparametric learning strategy (CORN) for actively trading stocks. CORN effectively exploits statistical relations between stock market windows via a nonparametric learning approach. We evaluate the empirical performance of our algorithm extensively on several large historical and latest real stock markets, and show that it can easily beat both the market index and the best stock in the market substantially (without or with small transaction costs), and also surpass a variety of state-of-the-art techniques significantly.}, +journal = {ACM Trans. Intell. Syst. Technol.}, +month = {may}, +articleno = {21}, +numpages = {29}, +keywords = {nonparametric learning, Correlation coefficient, online portfolio selection} +} + +@article{ZHANG2021107533, +title = {Combining expert weights for online portfolio selection based on the gradient descent algorithm}, +journal = {Knowledge-Based Systems}, +volume = {234}, +pages = {107533}, +year = {2021}, +issn = {0950-7051}, +doi = {https://doi.org/10.1016/j.knosys.2021.107533}, +url = {https://www.sciencedirect.com/science/article/pii/S0950705121007954}, +author = {Yong Zhang and Hong Lin and Xingyu Yang and Wanrong Long}, +keywords = {Online portfolio selection, Gradient descent algorithm, Combining weights, Expert strategy}, +abstract = {In this paper, we propose a new online portfolio selection strategy based on a weighted learning technique and an online gradient descent algorithm. Our strategy, named combination weights based on online gradient descent (CW-OGD), achieves improved robustness by integrating different expert strategies and overcomes the difficult problem of complex computational time. First, an expert system including many basic expert strategies, in which we choose the strategy that invests in a single stock as the basic expert strategy, is established. Second, we exploit the loss function to evaluate the performance of different basic expert strategies and use the OGD algorithm to update the weight vector for the experts based on their losses. In addition, we theoretically prove that the proposed strategy has a regret bound. Finally, extensive experiments conducted on four stock combinations and seven benchmark datasets show that our strategy can outperform some state-of-the-art strategies in terms of the return, risk and computational time metrics. Furthermore, our strategy can achieve higher returns even at certain transaction cost rates, which illustrates its effectiveness in the actual stock market.} +} + +@InProceedings{10.1007/978-3-030-66151-9_12, +author="Sooklal, Shivaar +and van Zyl, Terence L. +and Paskaramoorthy, Andrew", +editor="Gerber, Aurona", +title="DRICORN-K: A Dynamic RIsk CORrelation-driven Non-parametric Algorithm for Online Portfolio Selection", +booktitle="Artificial Intelligence Research", +year="2020", +publisher="Springer International Publishing", +address="Cham", +pages="183--196", +abstract="Online Portfolio Selection is regarded as a fundamental problem in Computational Finance. Pattern-Matching methods, and the CORN-K algorithm in particular, have provided promising results. Despite making notable progress, there exists a gap in the current state of the art -- systematic risk is not considered. The lack of attention to systematic risk could lead to poor investment returns, especially in volatile markets. In response to this, we extend the CORN-K algorithm to present DRICORN-K -- a Dynamic RIsk CORrelation-driven Non-parametric algorithm. DRICORN-K continuously adjusts a portfolio's market sensitivity based on the current market conditions. We measure market sensitivity using the {\$}{\$}{\backslash}beta {\$}{\$}$\beta$measure. DRICORN-K aims to take advantage of upward market trends and protect portfolios against downward market trends. To this end, we implement a number of market classification methods. We find that an exponentially weighted moving linear regression method provides the best classification of current market conditions. We further conducted an empirical analysis on five real world stock indices: the JSE Top 40, Bovespa, DAX, DJIA and Nikkei 225 against twelve state of the art algorithms. The results show that DRICORN-K can deliver improved performance over the current state of the art, as measured by cumulative return, Sharpe ratio and maximum drawdown. The experimental results lead us to conclude that the addition of dynamic systematic risk adjustments to CORN-K can result in improved portfolio performance.", +isbn="978-3-030-66151-9" +} + +@article{https://doi.org/10.1111/1467-9965.00058, +author = {Helmbold, David P. and Schapire, Robert E. and Singer, Yoram and Warmuth, Manfred K.}, +title = {On-Line Portfolio Selection Using Multiplicative Updates}, +journal = {Mathematical Finance}, +volume = {8}, +number = {4}, +pages = {325-347}, +keywords = {portfolio selection, rebalancing, machine learning algorithms}, +doi = {https://doi.org/10.1111/1467-9965.00058}, +url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/1467-9965.00058}, +eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/1467-9965.00058}, +abstract = {We present an on-line investment algorithm that achieves almost the same wealth as the best constant-rebalanced portfolio determined in hindsight from the actual market outcomes. The algorithm employs a multiplicative update rule derived using a framework introduced by Kivinen and Warmuth. Our algorithm is very simple to implement and requires only constant storage and computing time per stock in each trading period. We tested the performance of our algorithm on real stock data from the New York Stock Exchange accumulated during a 22-year period. On these data, our algorithm clearly outperforms the best single stock as well as Cover's universal portfolio selection algorithm. We also present results for the situation in which the investor has access to additional “side information.”}, +year = {1998} +} + +@article{GUAN2019104958, +title = {A local adaptive learning system for online portfolio selection}, +journal = {Knowledge-Based Systems}, +volume = {186}, +pages = {104958}, +year = {2019}, +issn = {0950-7051}, +doi = {https://doi.org/10.1016/j.knosys.2019.104958}, +url = {https://www.sciencedirect.com/science/article/pii/S0950705119303922}, +author = {Hao Guan and Zhiyong An}, +keywords = {Portfolio selection, Online learning, Intelligent decision system, Quantitative finance}, +abstract = {Online portfolio selection is an important problem in financial trading which has attracted increasing interests from the machine learning and data mining community. Most existing state-of-the-art systems, however, rely on the defensive strategies, which lack adaptivity to some extent and may lose investment opportunities in the real financial market. In this paper, we propose a novel local adaptive learning model which seamlessly integrates both defensive and aggressive strategies to enhance the adaptivity and profitability of the whole portfolio system. Different from some popular portfolio selection systems that assume a predefined price tendency, we set up an evaluation function to predict the tendency and activate the corresponding selection strategies. The total capital is allocated according to the value expectations of different assets. Through taking the bests of the complementary strategies, it can make a good balance between wealth returns and risks. In addition, our system is capable of dealing with financial data in linear time, which is suitable for real-time trading applications. Experimental results on several benchmark datasets show that our model outperforms some state-of-the-art ones both in effectiveness and efficiency.} +} + +@article{LIN2024121472, +title = {Online portfolio selection of integrating expert strategies based on mean reversion and trading volume}, +journal = {Expert Systems with Applications}, +volume = {238}, +pages = {121472}, +year = {2024}, +issn = {0957-4174}, +doi = {https://doi.org/10.1016/j.eswa.2023.121472}, +url = {https://www.sciencedirect.com/science/article/pii/S0957417423019747}, +author = {Hong Lin and Yong Zhang and Xingyu Yang}, +keywords = {Online portfolio selection, Online gradient update, Mean reversion, Trading volume, Regret bound}, +abstract = {In this paper, we propose an effective online portfolio selection strategy by integrating expert opinions, which are obtained based on mean reversion and trading volume. Existing studies have found that mean reversion and high volume premium exist in the stock market in the short term. Some online portfolio strategies have been proposed that rely upon mean reversion, but it is rare to consider both mean reversion and high volume premium, which is what we will do in this paper. First, a portfolio based on mean reversion and high volume premium is constructed using recent window data. Second, a pool of portfolios, also known as a pool of expert strategies or expert opinions, is established by changing the window size. Finally, the online gradient update algorithm is adopted to integrate a pool of expert strategies, and the MRvol strategy in this paper is proposed. Theoretically, we prove that the regret of MRvol is bounded. Empirically, we use the actual stock price and trading volume data from different markets to test the performance of MRvol. The results show that MRvol performs better than other online strategies in terms of final cumulative wealth and risk-adjusted return metrics in most cases, among which the annualized percentage yield on all datasets is 16%–37%, and the average values of Sharpe ratio, Calmar ratio and Information ratio are 1.113, 0.9216 and 0.0299, respectively. Additionally, MRvol has linear computational time complexity, and the running time of test results is all less than 1 s. Furthermore, it maintains strong robustness under different parameters and can bear reasonable transaction costs.} +} + +@misc{li2012online, +title={On-Line Portfolio Selection with Moving Average Reversion}, +author={Bin Li and Steven C. H. Hoi}, +year={2012}, +eprint={1206.4626}, +archivePrefix={arXiv}, +primaryClass={cs.CE} +} + +@article{LI2015104, +title = {Moving average reversion strategy for on-line portfolio selection}, +journal = {Artificial Intelligence}, +volume = {222}, +pages = {104-123}, +year = {2015}, +issn = {0004-3702}, +doi = {https://doi.org/10.1016/j.artint.2015.01.006}, +url = {https://www.sciencedirect.com/science/article/pii/S0004370215000168}, +author = {Bin Li and Steven C.H. Hoi and Doyen Sahoo and Zhi-Yong Liu}, +keywords = {Portfolio selection, On-line learning, Mean reversion, Moving average reversion}, +abstract = {On-line portfolio selection, a fundamental problem in computational finance, has attracted increasing interest from artificial intelligence and machine learning communities in recent years. Empirical evidence shows that stock's high and low prices are temporary and stock prices are likely to follow the mean reversion phenomenon. While existing mean reversion strategies are shown to achieve good empirical performance on many real datasets, they often make the single-period mean reversion assumption, which is not always satisfied, leading to poor performance in certain real datasets. To overcome this limitation, this article proposes a multiple-period mean reversion, or so-called “Moving Average Reversion” (MAR), and a new on-line portfolio selection strategy named “On-Line Moving Average Reversion” (OLMAR), which exploits MAR via efficient and scalable online machine learning techniques. From our empirical results on real markets, we found that OLMAR can overcome the drawbacks of existing mean reversion algorithms and achieve significantly better results, especially on the datasets where existing mean reversion algorithms failed. In addition to its superior empirical performance, OLMAR also runs extremely fast, further supporting its practical applicability to a wide range of applications. Finally, we have made all the datasets and source codes of this work publicly available at our project website: http://OLPS.stevenhoi.org/.} +} + +@ARTICLE{Li2012-ks, +title= "{PAMR}: Passive aggressive mean reversion strategy for portfolio selection", +author= "Li, Bin and Zhao, Peilin and Hoi, Steven C H and Gopalkrishnan, Vivekanand", +abstract = "This article proposes a novel online portfolio selection strategy named ``Passive Aggressive Mean Reversion'' (PAMR). Unlike traditional trend following approaches, the proposed approach relies upon the mean reversion relation of financial markets. Equipped with online passive aggressive learning technique from machine learning, the proposed portfolio selection strategy can effectively exploit the mean reversion property of markets. By analyzing PAMR's update scheme, we find that it nicely trades off between portfolio return and volatility risk and reflects the mean reversion trading principle. We also present several variants of PAMR algorithm, including a mixture algorithm which mixes PAMR and other strategies. We conduct extensive numerical experiments to evaluate the empirical performance of the proposed algorithms on various real datasets. The encouraging results show that in most cases the proposed PAMR strategy outperforms all benchmarks and almost all state-of-the-art portfolio selection strategies under various performance metrics. In addition to its superior performance, the proposed PAMR runs extremely fast and thus is very suitable for real-life online trading applications. The experimental testbed including source codes and data sets is available at http://www.cais.ntu.edu.sg/~chhoi/PAMR/.", +journal = "Machine Learning", +volume = 87, +number = 2, +pages = "221--258", +month = may, +year = 2012 +} + +@ARTICLE{7942104, +author={Lai, Zhao-Rong and Dai, Dao-Qing and Ren, Chuan-Xian and Huang, Ke-Kun}, +journal={IEEE Transactions on Neural Networks and Learning Systems}, +title={A Peak Price Tracking-Based Learning System for Portfolio Selection}, +year={2018}, +volume={29}, +number={7}, +pages={2823-2832}, +doi={10.1109/TNNLS.2017.2705658} +} + +@ARTICLE{8411138, +author={Lai, Zhao-Rong and Yang, Pei-Yi and Fang, Liangda and Wu, Xiaotian}, +journal={IEEE Transactions on Systems, Man, and Cybernetics: Systems}, +title={Reweighted Price Relative Tracking System for Automatic Portfolio Optimization}, +year={2020}, +volume={50}, +number={11}, +pages={4349-4361}, +doi={10.1109/TSMC.2018.2852651} +} + +@article{COVER451321, +author = {Cover, Thomas M.}, +title = {Universal Portfolios}, +journal = {Mathematical Finance}, +volume = {1}, +number = {1}, +pages = {1-29}, +keywords = {portfolio selection, robust trading strategies, performance weighting, rebalancing}, +doi = {https://doi.org/10.1111/j.1467-9965.1991.tb00002.x}, +url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1467-9965.1991.tb00002.x}, +eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.1467-9965.1991.tb00002.x}, +abstract = {We exhibit an algorithm for portfolio selection that asymptotically outperforms the best stock in the market. Let xi= (xi, xi2,…, xim)t denote the performance of the stock market on day i, where xii is the factor by which the jth stock increases on day i. Let bi= (bi1 bi2, bim)t, b;ij≫ 0, bij= 1, denote the proportion bij of wealth invested in the j th stock on day i. Then Sn= IIin= bitxi is the factor by which wealth is increased in n trading days. Consider as a goal the wealth Sn*= maxb IIin=1 btxi that can be achieved by the best constant rebalanced portfolio chosen after the stock outcomes are revealed. It can be shown that Sn * exceeds the best stock, the Dow Jones average, and the value line index at time n. In fact, Sn* usually exceeds these quantities by an exponential factor. Let x1, x2, be an arbitrary sequence of market vectors. It will be shown that the nonanticipating sequence of portfolios db yields wealth such that , for every bounded sequence x1, x2…, and, under mild conditions, achieve where J, is an (m - 1) x (m - I) sensitivity matrix. Thus this portfolio strategy has the same exponential rate of growth as the apparently unachievable S*n.}, +year = {1991} +} + +@misc{li2013online, + title={Online Portfolio Selection: A Survey}, + author={Bin Li and Steven C. H. Hoi}, + year={2013}, + eprint={1212.2129}, + archivePrefix={arXiv}, + primaryClass={q-fin.CP} +} + +@article{XI2023109872, +title = {Online portfolio selection with predictive instantaneous risk assessment}, +journal = {Pattern Recognition}, +volume = {144}, +pages = {109872}, +year = {2023}, +issn = {0031-3203}, +doi = {https://doi.org/10.1016/j.patcog.2023.109872}, +url = {https://www.sciencedirect.com/science/article/pii/S0031320323005708}, +author = {Wenzhi Xi and Zhanfeng Li and Xinyuan Song and Hanwen Ning}, +keywords = {Portfolio optimization, Online learning, High-dimensional covariance matrix, Ensemble learning, High-dimensional short-term data}, +abstract = {Online portfolio selection (OPS) has received increasing attention from machine learning and quantitative finance communities. Despite their effectiveness, the pioneering OPS methods have several key limitations. First, price predictions are usually based on predetermined trends, which is inadequate for a fast-changing market patterns. Second, each asset is treated individually, ignoring the pervading relevance among the assets. Third, the risk terms are usually missing or inappropriate in optimizations. This paper proposes a novel OPS method, namely, the online low-dimension ensemble method, to overcome the limitations. Motivated by the stylized facts for the co-movements of assets, the financial market is regarded as a high-dimensional dynamical system (HDS), and a large number of low-dimensional subsystems (LDSs) are randomly generated from the HDS to extract the correlation information among the assets. The assets’ price predictions are first made using these LDSs and then aggregated to formulate the final prediction using ensemble learning techniques. Thanks to the particular merits brought by our predicting scheme, we also develop a novel high-dimensional covariance matrix estimation/prediction method for short-term data, efficiently assessing the instantaneous risk of the projected portfolios. Compared with state-of-the-art methods, our approach obtains more accurate predictions as the correlation information is fully exploited. With the predictive instantaneous risk assessment, a more appropriate optimization problem is proposed, substantially improving the OPS setting and leading to significantly better investment performance. Therefore, this study develops a flexible and promising approach to learning fast-changing market patterns and demonstrates that the high-dimensional feature of the market is a crucial information source for financial modeling with short-term data rather than a barrier in the conventional sense. Extensive experiments on real-world datasets are conducted to illustrate our method further.} +} \ No newline at end of file diff --git a/docs/src/refs.md b/docs/src/refs.md new file mode 100644 index 00000000..c37522a2 --- /dev/null +++ b/docs/src/refs.md @@ -0,0 +1,5 @@ +# References + +```@bibliography + +``` \ No newline at end of file