Plotting a simulated forecast?!

Hey,
I am pretty new to Matlab and therefore, I am still struggling with some basic stuff. Anyway, I am working on a forecast of a FTS, and want to plot the simulated forecast. Actually, I'd like to combine the forecasted data with the original dataset.
Here's my forecast and simulation function. How can I plot them? the dataset is called "price".
% Forecasting
horizon = 100
[sigmaForecast,meanForecast,sigmaTotal,meanRMSE] = ...
garchpred(coeff,price,horizon);
% Monte Carlo Simulation
nPaths = 100;
[eSim,sSim,ySim] = garchsim(coeff,horizon,nPaths, ...
[],[],[],eFit,sFit,price);
Many thanks Patrick

 採用された回答

Oleg Komarov
Oleg Komarov 2011 年 5 月 30 日

0 投票

You can plot the price against the forecast:
plot(1:100,price)
hold on
plot(1:100,meanForecast,'or')
Or you can plot the average of the simulations against the price:
plot(1:100,price)
hold on
plot(1:100,mean(ySim,2),'or')
All of that assuming price is a single vector.

1 件のコメント

Patrick
Patrick 2011 年 5 月 31 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by