Effacer les filtres
Effacer les filtres

Backtest Strategy class Error

2 vues (au cours des 30 derniers jours)
Metin Akyol
Metin Akyol le 11 Mar 2022
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.

Réponses (1)

Brendan
Brendan le 31 Mar 2022
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.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by