« View all new features in
Mathematica
9
◄
previous
|
next
►
New in
Mathematica
9
›
Time Series and Stochastic Differential Equations
Forecast Exchange Rates
The daily exchange rates of euro to dollar from May 2012 through September 2012.
In[1]:=
X
data = TemporalData[ FinancialData["EUR/USD", {{2012, 5, 1}, {2012, 9, 30}}]]["Part", All, {{2012, 5, 1}, {2012, 9, 30}}];
In[2]:=
X
DateListPlot[data["Path"], Joined -> True, Filling -> Bottom, ImageSize -> 350]
Out[2]=
Find parameters for an
ARIMAProcess
model.
In[3]:=
X
eproc = EstimatedProcess[data, ARIMAProcess[40, 2, 0]]
Out[3]=
Forecast for 20 business days ahead.
In[4]:=
X
forecast = TimeSeriesForecast[eproc, data, {20}]
Out[4]=
Plot the forecast with the original data.
In[5]:=
X
DateListPlot[{data["Path"], forecast["Path"]}, Joined -> True, Filling -> Axis, PlotLabel -> "EUR/USD", ImageSize -> 350]
Out[5]=