5.0

5.0 | 2 ratings Rate this file 122 downloads (last 30 days) File Size: 35.32 KB File ID: #17564

Estimation and Simulation of ACD models in MatLab

by Marcelo Perlin

 

16 Nov 2007 (Updated 22 May 2009)

Code covered by BSD License  

Functions and Scripts for Simulation and Estimation of ACD models

Download Now | Watch this File

File Information
Description

This submission includes functions and scripts for the estimation and simulation of ACD (autoregressive conditional duration) models.
 
The zip file includes:
 
- Scripts and functions for Estimation of an ACD(q,p) model with exponential or weibull distribution
- Scripts and functions for Simulation of an ACD(q,p) model with exponential or weibull distribution
- Scripts for cool plots/movies of weibull, burr and generalized gamma distributions.
- Scripts and functions for visualizing the log likelihood space of the model (the figure showed at file submission)
 
References:
 
ENGLE, R, RUSSEL. Autoregressive Conditional Duration: A New Model for Irregularly Spaced Transaction Data. Econometrica, Vol. 66, N. 5, pp 1127-1162, 1998.
 
DUFOUR, A., ENGLE, R. The ACD Model: Predictability of the Time between Consecutive Trades. ICMA – Discussion Papers in Finance, n. 5, 2000.
 

Acknowledgements
This submission has inspired the following:
Simulate a Hawkes process
Required Products Statistics Toolbox
Optimization Toolbox
MATLAB release MATLAB 7.2 (R2006a)
Zip File Content  
Other Files
ACD_Models_FEX/ACD Estimation and Simulation/data.txt,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Data.mat,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_1_1_Fit.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_1_1_Fit_with_Indep.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_1_1_Simul.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_1_1_Simul_and_Fit.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_2_2_Fit.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_2_2_Simul.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_2_2_Simul_and_Fit.m,
ACD_Models_FEX/ACD Estimation and Simulation/Example_Script_ACD_Likelihood_Plot.m,
ACD_Models_FEX/ACD Estimation and Simulation/mFiles_ACD/ACD_Fit.m,
ACD_Models_FEX/ACD Estimation and Simulation/mFiles_ACD/ACD_Lik.m,
ACD_Models_FEX/ACD Estimation and Simulation/mFiles_ACD/ACD_Simul.m,
ACD_Models_FEX/ACD Estimation and Simulation/mFiles_ACD/confuneq.m,
ACD_Models_FEX/ACD Estimation and Simulation/mFiles_ACD/getvarMatrix_ACD.m,
ACD_Models_FEX/ACD Estimation and Simulation/mFiles_ACD/plotLikelihoodFunct.m,
ACD_Models_FEX/Cool Plots/Distribution Plots/Plot_Dist3d_BURR_MOVIE.m,
ACD_Models_FEX/Cool Plots/Distribution Plots/Plot_Dist3d_GGAMMA_MOVIE.m,
ACD_Models_FEX/Cool Plots/Distribution Plots/Plot_Dist3d_WEIBULL.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
20 Nov 2007 si pal

Very useful. Thanks for sharing the codes.

26 Nov 2007 Zahid Khan

Thank you Marcelo! It was indeed very helpful in understanding those papers.

Please login to add a comment or rating.
Updates
19 Nov 2007

* Added error checking lines and also a few other things

06 Dec 2007

*Fixed a bug at ACD_Fit when p~=q

10 Dec 2007

Vectorization of likelihood function. In my tests I got speed improvement over 80% when comparing to unvectorized version, which is quite impressive...

10 Dec 2007

Changed subject of code (from "general" to "financial modeling")

11 Aug 2008

Added standard error calculation

15 Aug 2008

Added the possibility of adding independent variables in the model.

22 May 2009

Fixed bug in screen output

Tag Activity for this File
Tag Applied By Date/Time
finance Marcelo Perlin 22 Oct 2008 09:35:39
modeling Marcelo Perlin 22 Oct 2008 09:35:39
analysis Marcelo Perlin 22 Oct 2008 09:35:39
acd models Marcelo Perlin 22 Oct 2008 09:35:39
point process Marcelo Perlin 22 Oct 2008 09:35:39
duration Marcelo Perlin 22 Oct 2008 09:35:39
financial econometrics Marcelo Perlin 22 Oct 2008 09:35:39
finance Greg Bacon 22 May 2009 10:57:46
acd models Daniel Cuervo 23 Sep 2009 02:54:35
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com