Backtest Strategy class Error

When I try to replicate this tutorial;
I am getting an error when trying to run this line (and the subsequent ones):
equalWeight_initial = equalWeightFcn(current_weights,warmupTT);
telling me that the function is not recognized. Do I need to create the backtestStrategy as an instance? The example did not do that.

Respuestas (1)

Brendan
Brendan el 31 de Mzo. de 2022

0 votos

The equalWeightFcn is a function defined at the bottom of that file, in the Local Functions section. Are you perhaps highlighting the code and evaluating it? If so, I think you need to run the file from the top in order for it to "see" the local functions defined at the bottom of the demo.

Categorías

Más información sobre Portfolio Optimization and Asset Allocation en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 11 de Mzo. de 2022

Respondida:

el 31 de Mzo. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by