Skip to main content
Log in

A Dynamic Trading Model for Use with a One Step Ahead Optimal Strategy

  • Published:
Computational Economics Aims and scope Submit manuscript

Abstract

This paper proposes a discrete-time model for dynamic trading, interconnecting cash and asset stocks. The trading action or control is based on the evolution of the asset prices, and any suitable asset price predictor can be used. Based on the model introduced, a one step ahead optimal control strategy, based on linear programming, is proposed. This leads to a trading algorithm which specfies a rule to buy or sell assets in a given portfolio. The addition of trade trigger logic to the basic scheme is also proposed, in order to allow return and risk to be traded off in the dynamic one step ahead trading scheme. The proposed one step ahead optimal policy is independent of the predictor of prices and their variances, chosen in this paper as the moving average, but replaceable by any desired estimator. Numerical examples are given to show that the proposed strategy performs reasonably well, with and without risk reduction, over datasets relating to different portfolios (banks, computers, ETFs and stocks).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20
Fig. 21
Fig. 22
Fig. 23
Fig. 24
Fig. 25
Fig. 26
Fig. 27
Fig. 28
Fig. 29
Fig. 30
Fig. 31

Similar content being viewed by others

References

  • (2022) Alpha vantage API. https://rapidapi.com/alphavantage/api/alpha-vantage

  • Andrada-Félix, J., & Fernández-Rodríguez, F. (2008). Improving moving average trading rules with boosting and statistical learning methods. Journal of Forecasting, 27(5), 433–449. https://doi.org/10.1002/for.1068

    Article  Google Scholar 

  • Bemporad, A., Bellucci, L., & Gabbriellini, T. (2014). Dynamic option hedging via stochastic model predictive control based on scenario simulation. Quantitative Finance, 14(10), 1739–1751.

    Article  Google Scholar 

  • Boyd, S., Busseti, E., Diamond, S., et al. (2017). Multi-period trading via convex optimization. Foundations and Trends in Optimization, 3(1), 1–76. https://doi.org/10.1561/2400000023www.nowpublishers.com/article/Details/OPT-023.

    Article  Google Scholar 

  • Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of stock returns. The Journal of Finance, 47(5), 1731–1764. https://doi.org/10.1111/j.1540-6261.1992.tb04681.x

    Article  Google Scholar 

  • Campbell, JY., & Viceira, LM. (2002) Strategic asset allocation: Portfolio choice for long-term investors. Oxford University Press, New York, Clarendon Lectures in Economics

  • Cartea, Á., & Jaimungal, S. (2013). Modeling asset prices for algorithmic and high-frequency trading. Applied Mathematical Finance, 20, 512–547.

    Article  Google Scholar 

  • Cartea, Á., Jaimungal, S., & Ricci, J. (2014). Buy low, sell high: A high frequency trading perspective. SIAM Journal on Financial Mathematics, 5, 415–444.

    Article  Google Scholar 

  • Cartea, Á., Jaimungal, S., & Penalva, J. (2015). Algorithmic and high-frequency trading. Cambridge University Press.

    Google Scholar 

  • Chan, E. P. (2013). Algorithmic trading: winning strategies and their rationale. Wiley.

    Book  Google Scholar 

  • Ellis, C. A., & Parbery, S. A. (2005). Is smarter better? a comparison of adaptive, and simple moving average trading strategies. Research in International Business and Finance, 19(3), 399–411. https://doi.org/10.1016/j.ribaf.2004.12.009

    Article  Google Scholar 

  • Fabozzi, F. J., Kolm, P. N., Pachamanova, D. A., et al. (2007). Robust portfolio optimization and management. Wiley.

    Google Scholar 

  • Fama, E. F. (1965). The behavior of stock-market prices. The Journal of Business, 38(1), 34–105.

    Article  Google Scholar 

  • Gentle, J. E., & Härdle, W. K. (2012). Modeling asset prices (pp. 15–33). Springer.

    Google Scholar 

  • Goldfarb, D., & Iyengar, G. (2003). Robust portfolio selection problems. Mathematics of Operations Research, 28(1), 1–38.

    Article  Google Scholar 

  • Kolm, P. N., Tütüncü, R., & Fabozzi, F. J. (2014). 60 years of portfolio optimization: Practical challenges and current trends. European Journal of Operational Research, 234, 356–371.

    Article  Google Scholar 

  • Liberzon, D. (2012). Calculus of variations and optimal control theory: A concise introduction. Princeton University Press.

    Book  Google Scholar 

  • Luenberger, D. G. (1998). Investment science. Oxford University Press.

    Google Scholar 

  • Mansini, R., Ogryczak, W., & Speranza, M. G. (2014). Twenty years of linear programming based portfolio optimization. European Journal of Operational Research, 234(2), 518–535.

    Article  Google Scholar 

  • Markowitz, H. (1952). Portfolio selection. The Journal of Finance, 7(1), 77–91.

    Google Scholar 

  • Mei, X., DeMiguel, V., & Nogales, F. J. (2016). Multiperiod portfolio optimization with multiple risky assets and general transaction costs. Journal of Banking and Finance, 69, 108–120.

    Article  Google Scholar 

  • Merton, R. C. (1969). Lifetime portfolio selection under uncertainty: The continuous-time case. The Review of Economics and Statistics, 51(3), 247–257.

    Article  Google Scholar 

  • Merton, R. C. (1990). Continuous-time finance. Basil Blackwell.

    Google Scholar 

  • Miner, R. C. (2002). Dynamic trading: dynamic concepts in time. Price and pattern analysis with practical strategies for traders and investors: Traders Press, Tucson, Arizona.

  • Praekhaow, P. (2010) Determination of trading points using the moving average methods. In: International Conference for a Sustainable Greater Mekong Subregion (GMSTEC 10), pp 1–6

  • Provenzano, D. (2002) An artificial stock market in a system dynamics approach. In: Proceedings of the 20th International Conference of the System Dynamics Society. System Dynamics Society, pp 1–26

  • Samuelson, P. A. (1969). Lifetime portfolio selection by dynamic stochastic programming. The Review of Economics and Statistics, 51(3), 239–246.

    Article  Google Scholar 

  • Weitert, C. (2007). Analysis of investor behavior in an artificial stock market. The 2007 International Conference of the System Dynamics Society (pp. 1–33). System Dynamics Society.

  • Zhu, Y., & Zhou, G. (2009). Technical analysis: An asset allocation perspective on the use of moving averages. Journal of Financial Economics, 92(3), 519–544. https://doi.org/10.1016/j.jfineco.2008.07.002

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior—Brasil (CAPES) Finance Code 001. The research of the first and third authors was supported by the Grant Bolsa PVE E-26/201.972/2016 from the Rio de Janeiro state agency Fundação Carlos Chagas Filho de Amparo á Pesquisa do Estado do Rio de Janeiro (FAPERJ). The second author was partially supported by the research grants (BPP/PQ 310646/2016-2) & Universal (406106/2016-9) from the Brazilian Government agency Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq). We thank the reviewers for their helpful comments and suggestions.

Author information

Authors and Affiliations

Authors

Contributions

The authors AB and EK conceived and wrote the manuscript and the LVF coded and performed the numerical experiments. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Amit Bhaya.

Ethics declarations

Conflict of interest

The authors have no relevant financial or non-financial interests to disclose.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Bhaya, A., Kaszkurewicz, E. & Ferreira, L.V. A Dynamic Trading Model for Use with a One Step Ahead Optimal Strategy. Comput Econ 63, 1575–1608 (2024). https://doi.org/10.1007/s10614-023-10375-6

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10614-023-10375-6

Keywords

Navigation