Backtest Strategy class Error

1 回表示 (過去 30 日間)
Metin Akyol
Metin Akyol 2022 年 3 月 11 日
回答済み: Brendan 2022 年 3 月 31 日
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.

回答 (1 件)

Brendan
Brendan 2022 年 3 月 31 日
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.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by