how to estimate LOT measure using RATS

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
shewon
Posts: 5
Joined: Thu Mar 05, 2009 1:31 am

how to estimate LOT measure using RATS

Unread post by shewon »

I need your help on the following MLE problem used by Lesmond et al.(1999)

This is the log likelihood function of LOT measure.

lnf=sum(if R_m< 0) [ln(1/(2*pi*(sigma_j^2)))-(1/(2*(sigma_j^2))*(R_j+al_j-b_j*R_m))^2] +
sum(if R_m> 0) [ln(1/(2*pi*(sigma_j^2)))-(1/(2*(sigma_j^2))*(R_j+au_j-b_j*R_m))^2] +
sum(if R_m= 0) [ln(%CDF((au_j-b_j*R_m)/sigma_j)- %CDF((al_j-b_j*R_m)/sigma_j)].

The R_j and R_m represents the dependent(each stock return:R_j) and independent variables(market return R_m), respectively and
%CDF stands for normal cumulative density function. The parameters are al_j, au_j, b_j , and sigma_j need to be estimate.

http://rfs.oxfordjournals.org/cgi/conte ... /12/5/1113-original paper.
A new estimate of transaction costs DA Lesmond0,z, JP Ogden1 and CA Trzcinka2


Can you help me how to estmate LOT measure using RATS?

thank you
Attachments
exampledata.xls
exampels_1
(294.5 KiB) Downloaded 1014 times
Last edited by shewon on Mon Jan 25, 2010 12:23 pm, edited 2 times in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: how to estimate LOT measure using RATS

Unread post by TomDoan »

shewon wrote:I need your help on the following MLE problem used by Lesmond et al.(1999)

This is the log likelihood function of LOT measure.

lnf=sum(if y_j< 0) [ln(1/(2*pi*(sigma_j^2)))-(1/(2*(sigma_j^2))*(R_j+al_j-b_j*R_m))^2] +
sum(if y_j> 0) [ln(1/(2*pi*(sigma_j^2)))-(1/(2*(sigma_j^2))*(R_j+au_j-b_j*R_m))^2] +
sum(if y_j= 0) [ln(%CDF((-au_j-b_j*R_m)/sigma_j)- %CDF((-al_j-b_j*R_m)/sigma_j)].

The R_j and R_m represents the dependent(each stock return:R_j) and independent variables(market return R_m), respectively and
%CDF stands for normal cumulative density function. The parameters are al_j, au_j, b_j , and sigma_j need to be estimate.
When you use MAXIMIZE, it automatically does the sum across entries, so you just need a formula which evaluates the various branches. This has some similarities to doing the probit or similar model using MAXIMIZE: see, for instance, page 530 of the v7 User's Guide. The first two lines can be simplified by using %logdensity(variance,x). By the way, I think you might have a sign error in your A coefficients in both of those.

Code: Select all

frml lot = %if(y_j<0,%logdensity(sigma_j^2,R_j+al_j-b_j*R_m),$
           %if(y_j>0,%logdensity(sigma_j^2,R_j+au_j-b_j*R_m),$
                log(%cdf((-au_j-b_j*R_m)/sigma_j)-%cdf((-al_j-b_j*R_m)/sigma_j))))
maximize lot
shewon
Posts: 5
Joined: Thu Mar 05, 2009 1:31 am

Re: how to estimate LOT measure using RATS

Unread post by shewon »

Thank you. Tom....
Post Reply