Monday, 31 March 2008

Transpose Thomson Financial Data

The download link is as follow:

http://www.survey-partner.co.uk/spsite/index.php/Details/10.html

or

http://www.ssrrn.com/index.php/Details/Transpose-Thomson-Financial-Data.html

 

This code can:

1. Import accounting data downloaded from Thomson Financial database using the excel addin.

2. Transpose the datasets to Panel Data format.

and then you can export them to other formats such as excel, stata, sas, etc.

/*---------------------------------------------------------------------------------------------------------------------
Current Version: 0.1
Please do not remove this information;
Originally Created by Helix Lee, Centre for Advanced Studies in Finance, Leeds University Business School, Leeds, UK. Email: buszl@leeds.ac.uk
You can modify the codes as you wish.

How to use it.

1. Make sure you copy them to the c:temp, or you can use other folder and please make sure you change all the c:test to you folder in this code


2. Download the data from Thomson One Financial database using the Excel Add-in, say you save it as accounting.xls;


3. Copy the header from the worksheet in the test.xls inside the zip file, replace the header information in the accounting.xls;

the current header information is:
Entity Name: code Currency: Y1999 Y2000 Y2001 Y2002 Y2003 Y2004 Y2005 Y2006
Please note that the current code suports year from 1999 to 2006 only, if you want to extend it, please add Y1998 etc. in the front, and Y2007 in the end. And add these information
in the %Transpose macro


4. Run the codes.
a. These two commands import and transpose them into the Panel Data format
%create_acc_data(var=Sales,data=test.Sales);
%create_acc_data(var=TotalAssets,data=test.TotalAssets);
b. Merge the two dataset;
%merge_datax(data1=test.TotalAssets,data2=test.Sales,sort_ids=code cyear,output=test.AccData);
c. Remove the raw datasets
%drop_table(tablename=test.Sales);
%drop_table(tablename=test.TotalAssets);

-----------------------------------------------------------------------------------------------------------------------*/

Codes:

libname test 'c:temp'; *Change the library name and this folder if you want;
run;
/*----------------------------------------------------------------------------------------------------------------------
Change the file name, if you excel file is accounting.xls, change the
DATAFILE= "c:temptest.xls"
TO
DATAFILE= "c:tempaccounting.xls"
-----------------------------------------------------------------------------------------------------------------------*/
%macro import_acc_data(var=,table=);
PROC IMPORT OUT= &table.
DATAFILE= "c:temptest.xls"
DBMS=EXCEL REPLACE;
SHEET=&var.;
GETNAMES=YES;
MIXED=YES;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
%mend ;
%macro sort_datax(data=,sort_ids=);
Proc sort data= &data.;
by &sort_ids.;
RUN;
%mend;
%macro merge_datax(data1=,data2=,sort_ids=,output=);
%sort_datax(data=&data1.,sort_ids=&sort_ids.);
%sort_datax(data=&data2.,sort_ids=&sort_ids.);
DATA &output.;
merge &data1. &data2.;
by &sort_ids.;
run;
%mend;
%macro drop_table(tablename=);
proc sql;
drop table &tablename.;
%mend;
%macro transpose_data(indata=,outdata=,var=,period=);
%if &period.=year %then %do;
%sort_datax(data=&indata.,sort_ids=code);
data &indata.;
set &indata.;
keep code Y1999 Y2000 Y2001 Y2002 Y2003 Y2004 Y2005 Y2006;
run;
proc transpose data=&indata.
out=work.TEMP1;
by code;
run;
data work.TEMP1;
set work.TEMP1;
*------------------------------------
You can extend the periods here;
-------------------------------------*
if _NAME_='Y1999' then cyear=year('01dec99'd);
if _NAME_='Y2000' then cyear=year('01dec00'd);
if _NAME_='Y2001' then cyear=year('01dec01'd);
if _NAME_='Y2002' then cyear=year('01dec02'd);
if _NAME_='Y2003' then cyear=year('01dec03'd);
if _NAME_='Y2004' then cyear=year('01dec04'd);
if _NAME_='Y2005' then cyear=year('01dec05'd);
if _NAME_='Y2006' then cyear=year('01dec06'd);
rename COL1=&var.;
RUN;
data &outdata.;
length code $10;
set work.TEMP1 (where=(code is not missing));
keep code cyear &var.;
run;
%drop_table(tablename=work.Temp1);
%end;
%mend;
%macro create_acc_data(var=,data=,sp500=);
%import_acc_data(var=&var.,table=work.Temp_var1);
%transpose_data(indata=work.Temp_var1,outdata=&data.,var=&var.,period=year);
%drop_table(tablename=work.Temp_var1);
%mend;
/* ----------------------------------------------------------------------------------------------------------
Example to run the codes
----------------------------------------------------------------------------------------------------------*/
%create_acc_data(var=Sales,data=test.Sales);
%create_acc_data(var=TotalAssets,data=test.TotalAssets);
%merge_datax(data1=test.TotalAssets,data2=test.Sales,sort_ids=code cyear,output=test.AccData);
%drop_table(tablename=test.Sales);
%drop_table(tablename=test.TotalAssets);

Monday, 24 March 2008

Useful Data - 9

European State Finance Database. French Revenues, 1179-1483

European State Finance Database. Great Britain: Income and Expenditure, 1790-1816

European State Finance Database. Italy, 1390-1805

European State Finance Database. Medieval Wool and Cloth Exports and Imports, 1280-1547

European State Finance Database. Nuremberg City Finances, 1431-1794

European State Finance Database. Polish State Finance, 1576-1717

European State Finance Database. Prussian State Finance, 1602-1808

European State Finance Database. Revenues and Expenditure in Spanish America c1570-c1816

European State Finance Database. Revenues and Expenditure of Swiss Towns, 16th and 17th Centuries

European State Finance Database. Revenues and Money Supply for Sweden, 1722-1809

Useful Data - 8

European State Finance Database. Austrian Finances in the Seventeenth and Eighteenth Centuries

European State Finance Database. Boislisle, French Royal Revenues and Expenditure, 1683-1707

European State Finance Database. Brittany Capitation Files, 1696

European State Finance Database. Castile: Revenues and Servicios, 1369-1474

European State Finance Database. Castilian Finances in the 15th Century

European State Finance Database. Comparative European Expenditure, 15th to 18th Centuries

European State Finance Database. Danish State Finance under Christian IV, 1588-1628

European State Finance Database. Danish State Finance, 1230-1867

European State Finance Database. Danish, Norwegian and Dutch Armies, Size and Cost, 1595-1896

European State Finance Database. English Economic Indicators, 1209-1816

European State Finance Database. English Revenues, 1485-1816

European State Finance Database. English Revenues, 991-1547

European State Finance Database. European Armies, Sizes, 1660-1861

European State Finance Database. European Silver Movements, 1501-1800

European State Finance Database. Forbonnais: Royal Revenues and Expenditure in France, 1661-1716

European State Finance Database. French Accounts of the Later Sixteenth Century

European State Finance Database. French Dixieme Files, 1711-1717

European State Finance Database. French Economic Indicators, 1308-1817

European State Finance Database. French Revenues and Expenditure, Derived Files, 1594-1785

European State Finance Database. French Revenues and Expenditure: Taille, Tax, Life Rents and Tontin

 

Useful Data - 7

Effects of Taxes and Benefits on Household Income, 1995-1996

Effects of Taxes and Benefits on Household Income, 1996-1997

Effects of Taxes and Benefits on Household Income, 1997-1998

Effects of Taxes and Benefits on Household Income, 1998-1999

Effects of Taxes and Benefits on Household Income, 1999-2000

Effects of Taxes and Benefits on Household Income, 2000-2001

Effects of Taxes and Benefits on Household Income, 2001-2002

Effects of Taxes and Benefits on Household Income, 2002-2003

Effects of Taxes and Benefits on Household Income, 2003-2004

Effects of Taxes and Benefits on Household Income, 2004-2005

 

Effects of Taxes and Benefits on Household Income, 2005-2006

Electricity Wholesale Market Data, 1996-2004

English Slave Trade, 1791-1799 : House of Lords Survey

Environmentally Friendly Farming and the Market: Extending Experience from England to France, 1996

Euro-Barometer 23: The European Currency Unit and Working Conditions, April 1985
Series:

Euro-Barometer 38.1: Consumer Protection, and Perceptions of Science and Technology, November 1992

Euro-Barometer 41.0: Trade Issues, Blood Donation, AIDS, and Smoking, April-May, 1994
Se

Euro-Barometer 4: Consumer Attitudes in Europe, October-November, 1975
Series: (Euro

European State Finance Database. Anglo-Portuguese Trade and Brazilian Gold, 1701-1810

European State Finance Database. Archives Nationales, KK355, Register of Revenues and Expenditure fo

 

 

Corporate Governance Research Methodology

Cited from http://www.survey-partner.co.uk/spsite/index.php/Goverannce/Governance-Data/Corporate-Governance-Research-Methodology.html

Step 1:

Literature Review: review the relevant literature in the area that you are interested in. Determines the model that you are going to use. And then identify the variables that you are going to use. Relevant variables include:

Board Size

The number of directors serving on the company's board at the beginning of the financial year

Committee Size

The number of directors serving on the company's committee (audit, compensation, nomination, governance) at the beginning of the financial year

Board Independence

The percentage of independent directors on the company's board at the beginning of the financial year

Committee Independence

The percentage of independent directors on the company's committee (audit, compensation, nomination, governance)  at the beginning of the financial year

Board Meetings

The number of board meetings held at the end of the financial year

Committee Meetings

The number of committee meetings held at the end of the financial year

CEO Duality

CEO of the company who also serves as the chairman of the board

Inside Director Ownership

Total percentage of shareholdings of inside and affiliate directors serving on the board

Outside Director Ownership

Total percentage of shareholdings of independent directors serving on the board

etc.

 

Step 2

Collecting data.

At this stage, use the existing data set or collect it yourself.

A) If you want to use the existing data set, you can use the data from the Corporate Library (available in the WRDS, U.S. companies).

Or

B) if you want to collect the new data set for your research, you can use the data collection system provided by Survey Partner (www.survey-partner.co.uk or www.survey-partner.com).

The first choice reduce your time in collecting and cleaning your data, but it might be not affordable for individual researchers.

The second choice would cost you some time but it is a cheaper choice. It may cost you 3-month-time to collect about 5-6 years data for 300 companies (See here as well: Link).

 

Step 3

Analyzing  the model you specified in Step 1, and revise them if necessary. At this stage, you may need to control for the following sensitivities:

A) Endogeneity

B) Firm and time effects if you use panel data

C) Other sensitivities may incur in your model.

Step 4

Revise your hypotheses, discover the reasons for the unexpected outcomes and write up your reports.

Revising the hypotheses always happen since there would be unexpected outcomes after you have controlled for different factors. The results may not support your hypothesis and you have to discover the reason behind this from a lot of sources other than academic journals.

Corporate Governance Research Methodology

Cited from http://www.survey-partner.co.uk/spsite/index.php/Goverannce/Governance-Data/Corporate-Governance-Research-Methodology.html

Step 1:

Literature Review: review the relevant literature in the area that you are interested in. Determines the model that you are going to use. And then identify the variables that you are going to use. Relevant variables include:

Board Size

The number of directors serving on the company's board at the beginning of the financial year

Committee Size

The number of directors serving on the company's committee (audit, compensation, nomination, governance) at the beginning of the financial year

Board Independence

The percentage of independent directors on the company's board at the beginning of the financial year

Committee Independence

The percentage of independent directors on the company's committee (audit, compensation, nomination, governance)  at the beginning of the financial year

Board Meetings

The number of board meetings held at the end of the financial year

Committee Meetings

The number of committee meetings held at the end of the financial year

CEO Duality

CEO of the company who also serves as the chairman of the board

Inside Director Ownership

Total percentage of shareholdings of inside and affiliate directors serving on the board

Outside Director Ownership

Total percentage of shareholdings of independent directors serving on the board

etc.

 

Step 2

Collecting data.

At this stage, use the existing data set or collect it yourself.

A) If you want to use the existing data set, you can use the data from the Corporate Library (available in the WRDS, U.S. companies).

Or

B) if you want to collect the new data set for your research, you can use the data collection system provided by Survey Partner (www.survey-partner.co.uk or www.survey-partner.com).

The first choice reduce your time in collecting and cleaning your data, but it might be not affordable for individual researchers.

The second choice would cost you some time but it is a cheaper choice. It may cost you 3-month-time to collect about 5-6 years data for 300 companies.

 

Step 3

Analyzing  the model you specified in Step 1, and revise them if necessary. At this stage, you may need to control for the following sensitivities:

A) Endogeneity

B) Firm and time effects if you use panel data

C) Other sensitivities may incur in your model.

Step 4

Revise your hypotheses, discover the reasons for the unexpected outcomes and write up your reports.

Revising the hypotheses always happen since there would be unexpected outcomes after you have controlled for different factors. The results may not support your hypothesis and you have to discover the reason behind this from a lot of sources other than academic journals.

Corporate Governance Research Methodology

Step 1:

Literature Review: review the relevant literature in the area that you are interested in. Determines the model that you are going to use. And then identify the variables that you are going to use. Relevant variables include:

Board Size

The number of directors serving on the company's board at the beginning of the financial year

Committee Size

The number of directors serving on the company's committee (audit, compensation, nomination, governance) at the beginning of the financial year

Board Independence

The percentage of independent directors on the company's board at the beginning of the financial year

Committee Independence

The percentage of independent directors on the company's committee (audit, compensation, nomination, governance)  at the beginning of the financial year

Board Meetings

The number of board meetings held at the end of the financial year

Committee Meetings

The number of committee meetings held at the end of the financial year

CEO Duality

CEO of the company who also serves as the chairman of the board

Inside Director Ownership

Total percentage of shareholdings of inside and affiliate directors serving on the board

Outside Director Ownership

Total percentage of shareholdings of independent directors serving on the board

etc.

 

Step 2

Collecting data.

At this stage, use the existing data set or collect it yourself.

A) If you want to use the existing data set, you can use the data from the Corporate Library (available in the WRDS, U.S. companies).

Or

B) if you want to collect the new data set for your research, you can use the data collection system provided by Survey Partner (www.survey-partner.co.uk or www.survey-partner.com).

The first choice reduce your time in collecting and cleaning your data, but it might be not affordable for individual researchers.

The second choice would cost you some time but it is a cheaper choice. It may cost you 3-month-time to collect about 5-6 years data for 300 companies.

 

Step 3

Analyzing  the model you specified in Step 1, and revise them if necessary. At this stage, you may need to control for the following sensitivities:

A) Endogeneity

B) Firm and time effects if you use panel data

C) Other sensitivities may incur in your model.

Step 4

Revise your hypotheses, discover the reasons for the unexpected outcomes and write up your reports.

Revising the hypotheses always happen since there would be unexpected outcomes after you have controlled for different factors. The results may not support your hypothesis and you have to discover the reason behind this from a lot of sources other than academic journals.

Sunday, 23 March 2008

Useful Data - 5

Conflicts Over Land and Resources in the Bosawas Natural Resource Reserve North-Central Nicaragua, 1

Constructing the Company: Governance and Procedures in British and Irish Joint Stock Companies, 1720

Contemporary Work Situation of Clerical Employees, 1979-1981

Corporate Governance and Economic Performance, 1997-1998

Corporate Governance in UK Companies, 1995

Countryside Implications for England and Wales of Possible Changes in the Common Agricultural Policy

County and City Data Book (United States). Consolidated File, City Data 1944-1977

Crop Returns for England, 1801

Crops, Debt and Labour in Two South Indian Villages, 1994-1995

Databank of Information from the Aston Programme of Organization Studies, 1962-1973

Useful Data - 4

Datastream Historical Company Accounts, 1965-2005

Decision Making Styles in Financial Behaviour : Towards a Method for Measurement and Application, 20

Delivery Performance and Throughput Efficiency in the UK Manufacturing Industry, 1970-1980

Demonstration Farms Survey, 1980-1981

Differing Perceptions of Technological Innovations According to Management Levels, 1977-1980

Direct Marketing Farms Survey, 1979

Disputes in the Charitable Sector in England and Wales, 1979-2002

Doctors and the Development of Hospital Computer Systems : a Case Study, 1981-1985

DSS/PSI Study of Improving Work Opportunities, 1996-1999

Economic Impact of Heathrow Airport upon Factories and Offices, 1969. Offices

Economic Data

Economic Impact of Heathrow Airport upon Factories and Offices, 1969. Factories

Effects of Company Training Policies on Women's Employment Opportunities in Plymouth, 1979-1980

Effects of Incentive Payment Systems, United Kingdom, 1977-1980

Electricity Wholesale Market Data, 1996-2004

Employee Benefits Today: a Survey of Attitudes and Company Practice, 1973

Employers on the Isle of Sheppey, 1981-1985

Employers Policies and Return to Work After Childbirth, 1988-1989

Employers' Information System, Cumbria, 1986

Series: (Future of W' >Employers' Workplace Policies in an Environment of Change, 2002
Series: (Future of W

Series: (Future of W' target='_blank'>Download / Source Link

Employment Practices of Multinational Companies in Organisational Context, 2005-2006

 

Useful Corporate Governance Data

Governance Index Data by Firm, 1990-2006

Governance Index Data by Firm, 1990-2006 For details on the construction of the Governance Index, see Gompers, Paul A., Joy L. Ishii, and Andrew Metrick, "Corporate Governance and Equity Prices", The Quarterly Journal of Economics 118(1), February 2003, 107-155.

Corporate Governance Data UK 1997-1998

Corporate Governance, Corporate Governance Data

Corporate Governance Data in UK 1995

Corporate Governance, Corporate Governance Data

Dual class firms, 1994 - 2002

Blockholder Data by Firm, 1996-2001

Corporate Governance Data, Board Structure Data UK 2001-2005

Corporate Governance Data, Board Structure Data US 2000-2005

Corporate Governance Data, Board Structure Data, US, Banking and Financial Institutions, 2001-2005

Friday, 21 March 2008

Useful Data - 3

Cambridge Centre for Business Research Professional Services Firms Dataset, 1990-1997

Cambridge Centre for Business Research SME Dataset (Second Panel), 1997

Cambridge Centre for Business Research SME Dataset, 1987-1995

Cambridge Centre for Business Research Survey of British and Japanese Entrepreneurs and their Busine

Cambridge Centre for Business Research Survey of the London Insurance Market, 1999-2000

Cambridge Centre for Business Research Survey of Venture Capital Firms in Western Europe, 2001

Cambridge/DTI Databank of Company Accounts, 1948-1990

Case Study of the Social Implications of a Computer Based Information System in a Hospital Out-Patie

Census of Woodlands and Trees, 1979-1982

Changing Forms of Local Politics, 1993-1995

Useful Data - 2

Activities and Power of Workplace Representatives on the Railway : a Comparative Study, 1979-1980

 Adoption of Sustainable Agricultural Technologies in Brazil: Economic and Non-Economic Determinants,

 Adoption of Sustainable Agricultural Technologies in Spain : Economic and Non-Economic Determinants,

 Adoption of Sustainable Agricultural Technologies in the UK : Economic and Non-Economic Determinants

 Advance Contracts for the Sale of Wool, c. 1200-1330

 Advance Factory Information System, 1976-1987. Private Sector Speculative Factories in Aberdeen City

 Advance Factory Information System, 1976-1987. Private Sector Speculative Factories in Rural Distric

 Advance Factory Information System, 1976-1987. Public Sector, Grampian Region

 Advertising and Industry Dataset, 1999

 Agrarian Typology of Provinces of European Russia at the Turn of the 20th Century

Useful Data

Constructing the Company: Governance and Procedures in British and Irish Joint Stock Companies, 1720

 Corporate Governance and Economic Performance, 1997-1998

 Corporate Governance in UK Companies, 1995

 National Health Service National Staff Survey, 2003
(NHS National Staff Survey, 2003)

 National Health Service National Staff Survey, 2004
(NHS National Staff Survey, 2004)

 National Health Service National Staff Survey, 2005
(NHS National Staff Survey, 2005)

 National Health Service National Staff Survey, 2006
(NHS National Staff Survey, 2006)

 Strategy, Structure and Institutions: British Firms in a European and Historical Perspective, 1983 a

 Symposium on Corporate Governance in China and India is March 30