I have been working on this. I found this resource on matlab website:
I am following the closed-loop forecasting logic. I followed the steps they listed but I am getting an error. Is someone able to help me?
Code:
numPredictionTimeSteps = 10;
net = resetState(net);
offset = size(CIV.COMPOSITE_IMPLIED_VOLATILITY,1);
[Z,state] = predict(net,CIV.COMPOSITE_IMPLIED_VOLATILITY(1:offset,:));
net.State = state;
Y = zeroes(numPredictionTimeSteps);
Y(1,:) = Z(end,:);
for t = 2:numPredictionTimeSteps
[Y(t,:),state] = predict(net,Y(t-1,:));
net.State = state;
end
Error:
Error using SeriesNetwork/predict
Too many output arguments.
Error in ForecastVolatilityLSTMv1 (line 103)
[Z,state] = predict(net,CIV.COMPOSITE_IMPLIED_VOLATILITY(1:offset,:));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thank you