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일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Portfolio Optimization and Asset Allocation에 대해 자세히 알아보기

제품

릴리스

R2021a

태그

질문:

2022년 3월 11일

답변:

2022년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by