Hot answers tagged

5

In terms of interpretation, an $MA$ model simply means that the time series is a function of the error from previous periods. You might find it informative to consider plotting simple $AR(1)$ models alongside various $ARMA(1,1)$ to develop a more intuitive understanding. For instance, the $AR(1)$ model (chosen as it is common for financial time series) $$x_{...


5

SOLUTION: Let $r_t$ be the log-return at time $t$, and $\hat{r}_t$ be the predicted log-return from the regression model. Initialize $loglik(0:T)=0$,$\epsilon_1=0$, $\sigma_1 = 0$, $\mu=U(0,1)*0.0001,\phi=U(0,1)*0.01$, $\alpha_0=U(0,1)*0.00002,\alpha_1=U(0,1)*0.01,\beta_1=0.9 + U(0,1)* 0.01$, $B=10,000$ For $b$ = 1 to $B$ $\quad$ For $t$ = 2 to $T$: $ \...


4

Even though it's a straightforward extension, it took me a while (a year? yikes!); but now you can easily incorporate Bayesian ar(1) (or more generally, Bayesian regression) in joint estimation by using designmatrix = "ar(1)" as an argument to svsample. It's not well documented yet (except in the help files), but I nevertheless hope easy to use. From the ...


4

The logic of your code is all right. However, the variance of the parameters is high because nobs=250 is relatively low. Increase nobs and your parameters will converge toward the parameters you specified eventually. import statsmodels.api as sm import numpy as np # Parameters. ar = np.array([.75, -.25]) ma = np.array([.65, .35]) # Simulate an ARMA ...


4

There is no guarantee that the optimization method always converges! In an introduction the author of the package recommends using the "hybrid" solver, which starts out with the "solnp" and goes through the other solvers, if it doesn't converge. According to him, this should at least guarantee convergence in 90 % of the cases. http://unstarched.net/r-...


3

You want to compute the BIC (Bayessian Information Criterion) or the AIC (Akaike information criterion) for different (p,q) pairs. Here is a wikipedia article with information on how to interpret those criteria in practice. Here is a mathworks page with detailed instructions on how to perform this task within Matlab. Keep in mind that in practice and ...


3

I know only that Jurik's JMA is good causal filter, better than Kalman and Volterra filters, but I don't know for sure what algorithm inside - it's black box. Does anybody know better causal filter?


2

1.Is it correct, that the coefficients are now different to the coefficients of the arima output? It seems right that the ARMA coefficients are different. Indeed, in the second model, the GARCH component will capture fluctuations that the ARMA component will not have to capture, resulting in different ARMA parameter estimates. 2.This is the acf of the ...


2

Use acf and pacf as to determine AR and MA parts. Use the position of last significant value for the two tests as the AR and MA terms respectively. or use autoarima if matlab has one with AIC or BIC coefficients. AIC returns a more general model (all possible values) while BIC results in a more constrained one (simpler).


2

Another possible solution is the EACF of Tsay and Tiao (1984) where the idea is that if the order of the AR process is known the MA can be inferred. The output is a table where the first left corner 0 is taken to be the order of the ARMA(p, q) model.


2

Some models do use ln(r_t), like Black–Derman–Toy and the Black–Karasinski models. Mainly to avoid negative interest rates in low rates / high volatility environments through the use of the log-normal distribution. Negative rates can wreak havoc in option premiums for example. They are interest rates indeed, that we call short rates, not yield on treasuries....


2

It is just a problem of how you pass times series to yuima. Just one more thing, if you want to estimate a CARMA driven by a Brownian motion, it is better to work with log-prices instead of prices. Indeed, in the considered model, we have a non zero probability assigned to negative values of the process. Try the following code require(yuima) library(xts) ...


2

There is no particular issue with your polynomials. However if you really want them to both start with a 1, you can apply a change of variable by defining : \begin{equation}Y_t = -\frac{1}{4}X_t\end{equation} Then your polynomials $\Phi_y(B)$ and $\Theta(B)$ such that : \begin{equation}\Phi_y(B)Y_t=\Theta(B)Z_t\end{equation} will both start with a $1$. It ...


2

To get it out the way: you cannot ask 'what model is better' without a reference to what its use is. Do you want to test for the mean or the AR parameter to trade it? Do you want to calculate VaR? Do you want to forecast volatility over one period? Or over 1000 periods? Or higher moments? Do you want to simulate volatility over one period? Or longer? For ...


2

Normally distributed and that's why the two first moments are sufficient to infer their statistical significance. Proof are rather technical (and sometimes are not specific to time-series models) and mainly depends of: The estimation method employed ( QMLE, Least Squares, Moment, Whittle...) The parameter space Moment restrictions ... These proofs ...


2

It is a classical misunderstanding, your model is right, you always have a acf equal to one at lag zero (and not one) since if there is no lag acf = covariance(x , x_lag 0) / variance x = variance x / variance x = 1. So you need to pay attention to the x axis , some software displays ACF starting at lag zero and some others from 1 (which make better ...


1

You are confusing the cond. mean process and cond. variance process : the autocorrelation plot of the squared returns gives you information about the cond. variance process (not the ARMA part !) . So you can't draw conclusion on the mean process. The squared returns are almost always autocorrelated since volatility is know to be time-varying. You need to ...


1

You might be interested in this ARTICLE (published in Quantitative Finance 2016) and citations therein. The authors consider different distributions to model tails in financial time series and in particular focus on EVT/GPDs. GPDs are used to specifically model tails and hence are fitted after some threshold that separates the tail from the central region ...


1

For ARIMA(2,1,4) you would need to use the ARIMA model, as described here. You would call with something like this ARIMA(endog, order = (2, 1, 4)) where endog is your endogenous variable and the tuple given for order follows the convention AR, Differencing, MA. For ARMA(1, 1) you could just use ARMA(endog, order = (1, 1)).


1

The Autocorrelation Function (ACF) $\rho_k=Corr(y_t,y_{t-k})$ expresses the strength of linear dependency between the $k$-lagged realizations and hence represents an important tool for identification of the lag orders of ARMA and GARCH processes: $$\rho_k:=Corr(y_t,y_{t-k})=\frac{\gamma_k}{\gamma_0},\,\,k\in\mathbb{Z}$$ where the Autocovariance $\gamma_k$ is ...


1

The code is correct regarding your question (and only for an AR(1) ), you made a mistake because the last observation of the data set is $t-1$ and not $t$ since you are forecasting the point at time $t$. In the code : MF(i,1) is the current point forecast ($t$) and lag one observation ( MF(i-1,1) which is $t-1$ ) is correctly related to the AR part. ...


1

To improve your model I would recommend you to take into acount the intraday periodicity : ie the fluctuation of the exchange rate over the daily cycle. For instance we observe strong increase on the volatility around 07:00 GMT (opening of European Market.) The following image taken from Andersen, T. G., & Bollerslev, T. (1997) illustrates it. It ...


1

Your summarize statistics are really strange ( median = 0.0000 , max 431 ...). Compute the returns as follow : $log(p_{t+1}/p_{t}) *100 $ and run the Arma-Garch on it. Edit : As explanation : you need to use a stationnary time serie : see @Neeraj comment


1

A good rule of thumb is to "test" your models by doing forecasts and to choose the best one. Note however that your choice will be based upon the loss function you selected. If you are concerned about outliers you should (for instance) use Median Squared Errors, if you don't you can use Mean Square Errors. In your particular case the Information Criteria ...


1

These are not yield. They are instantaneous short rates which are not directly observable in the market.


Only top voted, non community-wiki answers of a minimum length are eligible