Management of investment portfolios employing reinforcement learning

View article
PeerJ Computer Science

Main article text

 

Introduction

Theoretical Aspects

Portfolio management

Reinforcement learning

Literature pertaining to portfolio management via RL

Methods

  • RSI (Relative Strength Index): RSI=1001001+RS Wherein: RS=Average gain over the last 14 daysAverage loss over the last 14 days.

  • Stochastic Oscillator: %K=100CL14H14L14 Wherein: C represents the current closing price; L14 denotes the lowest price in the last 14 days; H14 signifies the highest price in the last 14 days.

  • MACD (Moving Average Convergence Divergence): MACD=EMA12(C)EMA26(C) Signal Line=EMA9(MACD) Wherein: C denotes the time series of closing data; EMAn signifies the n-day exponential moving average; H14 represents the highest price in the last 14 days.

  • ROC (Rate of Change): PROC(t)=C(t)C(tn)C(tn) Wherein: PROC(t) denotes the rate of change of the price at time t; C(t) represents the closing price at time t.

  • OBV (On Balance Volume): OBV(t)={OBV(t1)+Vol(t),ifC(t)>C(t1)OBV(t1)Vol(t),ifC(t)<C(t1)OBV(t1),ifC(t)=C(t1) Wherein: OBV(t) denotes the on balance volume indicator at time t; Vol(t) signifies the trading volume at time t; C(t) represents the closing price at time t.

Analysis procedure

  • S denotes the Sharpe Ratio; Rp is the expected return of the investment portfolio; Rf is the risk-free rate; and σp denotes the standard deviation of the investment portfolio.

  • βi denotes the beta coefficient of asset i; Cov(rirm) represents the covariance between the returns of asset i and the market; and Var(rm) signifies the variance of market returns.

Results

Portfolios without transaction costs

Portfolios incurring transaction costs

Statistical tests

Portfolio composition analysis

Conclusions

Additional Information and Declarations

Competing Interests

The authors declare there are no competing interests. Gustavo Carvalho Santos is one of the cofounders of Sapiens Agro (Sapiens Inteligênciaa Ltda).

Author Contributions

Gustavo Carvalho Santos conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Daniel Garruti conceived and designed the experiments, analyzed the data, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Flavio Barboza conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Kamyr Gomes de Souza conceived and designed the experiments, analyzed the data, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Jean Carlos Domingos conceived and designed the experiments, performed the experiments, analyzed the data, performed the computation work, prepared figures and/or tables, authored or reviewed drafts of the article, and approved the final draft.

Antônio Veiga conceived and designed the experiments, analyzed the data, authored or reviewed drafts of the article, and approved the final draft.

Data Availability

The following information was supplied regarding data availability:

The code and raw data are available at Harvard Dataverse: Barboza, Flavio, 2023, ”Replication Data and Code for: Management of Investment Portfolios Employing Reinforcement Learning”, https://doi.org/10.7910/DVN/JEKGJ8, Harvard Dataverse, V4, UNF:6:pzIxOUBN9tI9/z6n71pDHQ== [fileUNF].

Funding

The authors received no funding for this work. Sapiens Agro (Sapiens Inteligência Ltda) provided funding for the APC. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

2 Citations 1,889 Views 108 Downloads

Your institution may have Open Access funds available for qualifying authors. See if you qualify

Publish for free

Comment on Articles or Preprints and we'll waive your author fee
Learn more

Five new journals in Chemistry

Free to publish • Peer-reviewed • From PeerJ
Find out more