Tải bản đầy đủ - 0 (trang)
MỘT SỐ KHUYẾN NGHỊ ĐỐI VỚI CÁC BÊN LIÊN QUAN

MỘT SỐ KHUYẾN NGHỊ ĐỐI VỚI CÁC BÊN LIÊN QUAN

Tải bản đầy đủ - 0trang

+ Đo lường biến dồn tích tùy ý (hành vi điều chỉnh lợi nhuận) theo mơ hình

Modified Jones (1995):

/**********************************************/

/*** Estimating earning management ************/

/**********************************************/

Libname EM "C:\Quyen\SASData";

Data Depre_RD1;

infile"C:\NCKH\Data\Depre_RD1.csv"delimiter =

','MISSOVERDSDlrecl=32767firstobs=2;

%let _EFIERR_ = 0; /* set the ERROR detection macro variable */

inFormat ticker $10.;

inFormat Listing $10.;

inFormat Industry $20.;

Format ticker $10.;

Format Listing $10.;

Format Industry $20.;

Input

ticker $ Listing $ Industry $;

if _ERROR_ thencall symputx('_EFIERR_',1); /* set ERROR detection macro

variable */

run;

/***/

Data Depre_RD2;

infile"C:\NCKH\Data\Depre_RD2.csv"delimiter =

','MISSOVERDSDlrecl=32767firstobs=2;

%let _EFIERR_ = 0; /* set the ERROR detection macro variable */

inFormat Year

best5.;

inFormat ticker $10.;

inFormat Listing $10.;

inFormat depreciation1 best17.;

inFormat depreciation2 best17.;

inFormat depreciation3 best17.;

Format Year best5.;

Format ticker $10.;

Format Listing $10.;

Format depreciation1 best17.;

Format depreciation2 best17.;

Format depreciation3 best17.;

Input

Year ticker $ Listing $ depreciation1 depreciation2 depreciation3

depreciation4;

if _ERROR_ thencall symputx('_EFIERR_',1); /* set ERROR detection macro

variable */

run;

/***/

data Depre_RD2 (keep=year ticker listing dep);

set Depre_RD2;

if missing(depreciation1) then depreciation1=0;

if missing(depreciation2) then depreciation2=0;

if missing(depreciation3) then depreciation3=0;

dep=depreciation1+depreciation2+depreciation3;

dep=abs(dep);

run;

Procsqlnoprint; createtable depr asselecta.*, b.Industry

from Depre_RD2 a leftjoin Depre_RD1 b



on a.ticker=b.ticker

orderby ticker, year;quit;

Procsql; droptable Depre_RD2; quit;

Procsql; droptable Depre_RD1; quit;

/***/

Data Quyen;

infile"C:\NCKH\Data\Quyen.csv"delimiter =

','MISSOVERDSDlrecl=32767firstobs=2;

%let _EFIERR_ = 0; /* set the ERROR detection macro variable */

inFormat Year

best5.;

inFormat ticker $10.;

inFormat Listing $10.;

inFormat rec best17.;

inFormat cost_tangasset best17.;

inFormat cost_finasset best17.;

inFormat cost_invest best17.;

inFormat ta best17.;

inFormat rev best17.;

inFormat npat best17.;

inFormat ncfoa best17.;

Format Year best5.;

Format ticker $10.;

Format Listing $10.;

Format rec best17.;

Format cost_tangasset best17.;

Format cost_finasset best17.;

Format cost_invest best17.;

Format ta best17.;

Format rev best17.;

Format npat best17.;

Format ncfoa best17.;

Input

Year ticker $ Listing $ rec

cost_tangasset cost_finasset cost_invest ta

rev npat ncfoa;

if _ERROR_ thencall symputx('_EFIERR_',1); /* set ERROR detection macro

variable */

run;

/***/

Procsqlnoprint; createtable EaringManagement asselecta.*, b.*

from Quyen a leftjoin depr b

on a.ticker=b.ticker and a.year=b.year

orderby ticker, year;quit;

Procsql; droptable Quyen; quit;

Procsql; droptable depr; quit;

/***/

Data EaringManagement;

set EaringManagement;

where (listing="HOSE" or listing="HNX");

if missing(cost_tangasset) then cost_tangasset=0;

if missing(cost_finasset) then cost_finasset=0;

if missing(cost_invest) then cost_invest=0;

run;

procsortdata=EaringManagement; by ticker year; run;

/****/

Data EaringManagement;

set EaringManagement;

accr=npat-ncfoa;

drev=rev-lag(rev);



if ticker^=lag(ticker) then drev=.;

ppe=cost_tangasset+cost_finasset+cost_invest;

accr1=accr/lag(ta);

ta1=1/lag(ta);

drev1=drev/lag(ta);

ppe1=ppe/lag(ta);

dep1=dep/lag(ta);

if ticker^=lag(ticker) thendo;

accr1=.;

ta1=.;

drev1=.;

ppe1=.;

dep1=.;

end;

run;

/****/

Procsqlnoprint; createtable Nobs_Industry as

select industry, year,

Count(ticker) as Nobs

from EaringManagement where ^missing(accr1)

groupby industry, year;quit;

data Nobs_Industry;

set Nobs_Industry;

where ^missing(industry);

if Nobs>=10then DNobs=1; else DNobs=0;

run;

Procsqlnoprint; createtable EaringManagement asselecta.*, b.DNobs

from EaringManagement a leftjoin Nobs_Industry b

on a.industry=b.industry and a.year=b.year

orderby industry, year;quit;

Procsql;droptable Nobs_Industry;quit;

Procregdata=EaringManagement outest=ACC rsquarenoprint ;

By industry year;

where DNobs=1;

M1: model accr1=ta1 drev1 ppe1;

run;quit;

Procsqlnoprint; createtable ACC asselect

industry, year,

ta1 as a1,

drev1 as a2,

ppe1 as a3

from ACC

orderby industry, year;quit;

Procsqlnoprint; createtable EaringManagement asselecta.*, b.*

from EaringManagement a leftjoin ACC b

on a.industry=b.industry and a.year=b.year

orderby industry, year;quit;

Procsql;droptable ACC;quit;

/******/

procsortdata=EaringManagement; by ticker year; run;

data EaringManagement;

set EaringManagement;

drec=rec-lag(rec);

if ticker^=lag(ticker) then drec=.;

cashrev=drev-lag(drec);

if ticker^=lag(ticker) then cashrev=.;

cashrev1=cashrev/lag(ta);

if ticker^=lag(ticker) then cashrev1=.;



nda = a1*ta1 + a2*cashrev1 + a3*ppe1;

da=accr1-nda;

run;

/************/

data EaringManagement (keep=year ticker ppe1 dep1 nda da);

set EaringManagement;

run;

procsortdata=EaringManagement; by ticker year; run;

data EaringManagement;

set EaringManagement;

l_ppe1=lag(ppe1);

l_dep1=lag(dep1);

l_nda=lag(nda);

l_da=lag(da);

if ticker^=lag(ticker) thendo;

l_ppe1=.;

l_dep1=.;

l_nda=.;

l_da=.;

end;

run;

/******/

Procsqlnoprint; createtable EM.quyen_data asselecta.*, b.*

from EM.quyen_data a leftjoin EaringManagement b

on a.ticker=b.ticker and a.year=b.year

orderby ticker, year;quit;

Procsql; droptable EaringManagement; quit;

/***** End *****/



+ Đo lường các biến kiểm soát:

/***************************************************/

/*********** Calculating firm-specific vars ********/

/***************************************************/

Libname VAR "C:\Quyen\SASData";

/** Accounting data **/

data financials;

set VAR.financials;

Bookvalue=AvOutSh*bv;

run;

/*** Scale 1000000000000 ***/

data financials;

set financials;

TotalAsset=TotalAsset/1000000000000;

LTLia=LTLia/1000000000000;

NPAT=NPAT/1000000000000;

MarketCaop=MarketCaop/1000000000000;

Bookvalue=Bookvalue/1000000000000;

run;

/***/

Procsqlnoprint; createtable Firmvars as

select year, ticker, listing,

log(TotalAsset) as logta,

log(MarketCaop) as logmv,

log(MarketCaop/Bookvalue) as logmb,

LTLia/TotalAsset as lev,

NPAT/TotalAsset as roa,

NPAT/Bookvalue as roe,

DivYield as DivYield,

DivPayout as DivPayout

from financials

orderby ticker, year;quit;

/*** Stock prices ***/

data Price0515;

set VAR.Price0515;

year=year(date);

month=month(date);

run;

procsortdata=Price0515; by ticker date; run;

data Price0515;

set Price0515;

lag_clsprice=lag(clsprice);

if ticker^=lag(ticker) thendo;

lag_clsprice=.;

end;

run;

data Price0515 (drop=lag_clsprice);

set Price0515;

ret=log(clsprice/lag_clsprice);

run;

Procsqlnoprint; createtable Returnvars as

select ticker, year, month,

sum(tradingvolume) as tradingvolume,

sum(ret) as ret

from Price0515

groupby ticker, year, month;quit;



Procsql; droptable Price0515; quit;

Procsqlnoprint; createtable Returnvars asselecta.*, b.AvOutSh

from Returnvars a leftjoin financials b on a.ticker=b.ticker and

a.year=b.year

orderby ticker, year;quit;

Procsql; droptable financials; quit;

Procsqlnoprint; createtable Year_Returnvars as

select ticker, year,

mean(tradingvolume)/mean(AvOutSh) as turnover,

std(ret) as stdret,

sum(ret) as ret12

from Returnvars

groupby ticker, year;quit;

Procsql; droptable Returnvars; quit;

Procsqlnoprint; createtable Firmvars asselecta.*, b.*

from Firmvars a leftjoin Year_Returnvars b on a.ticker=b.ticker and

a.year=b.year

orderby ticker, year;quit;

Procsql; droptable Year_Returnvars; quit;

/***** Add informativeness *****/

Procsqlnoprint; createtable Firmvars asselecta.*, b.*

from Firmvars a leftjoin VAR.comovement_ret b on a.ticker=b.ticker and

a.year=b.year

orderby ticker, year;quit;

/**** Lag and difference ****/

procsortdata=Firmvars; by ticker year; run;

data Firmvars;

set Firmvars;

l_logta=lag(logta);

l_logmv=lag(logmv);

l_logmb=lag(logmb);

l_lev=lag(lev);

l_roa=lag(roa);

l_roe=lag(roe);

l_DivYield=lag(DivYield);

l_DivPayout=lag(DivPayout);

l_turnover=lag(turnover);

l_stdret=lag(stdret);

l_ret12=lag(ret12);

if ticker^=lag(ticker) thendo;

l_logta=.;

l_logmv=.;

l_logmb=.;

l_lev=.;

l_roa=.;

l_roe=.;

l_DivYield=.;

l_DivPayout=.;

l_turnover=.;

l_stdret=.;

l_ret12=.;

end;

run;

/*** Export ***/

data VAR.Firmvars;

set Firmvars;

run;

/***/



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

MỘT SỐ KHUYẾN NGHỊ ĐỐI VỚI CÁC BÊN LIÊN QUAN

Tải bản đầy đủ ngay(0 tr)

×