Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, For my class, we are required to replicate table 1 of a famous research paper by Eugene Fama and Kenneth French, The Cross Section

Hello,

For my class, we are required to replicate table 1 of a famous research paper by Eugene Fama and Kenneth French, "The Cross Section of Expected Stock Returns" (JOF 1992). I am having trouble with my SAS code for the start of this project. I have never used SAS before so I'm having trouble with the very beginning of the process of cleaning the data. I hope someone can help me by taking a look at my code. I know it's tough to accomplish without having the data set I'm working with but I hope this is enough for now:

/*To set the library;*/

libname RepLib 'C:\-----------\My SAS Files\9.4\FIN 701 Replication Project';

data sasff; set RepLib.Raw_Data_x01_192702;

run;

/*to clean data;*/

data sasff;

year=year(date); month=month(date);

mkteq=prc*shrout;

/*prc is "stock price" and is in the data table entitled, "Raw_Data_x01_192702";*/

/*shrout is "shares of stock outstanding" and is also in the data table mentioned for prc;*/

/*mkteq will give me the "market equity" which is the size of each stock;*/

if mkteq>0;

/*i don't want to include stocks with a zero or negative market equity size;*/

if not missing(siccd);

/*siccd is the "standard industrial code" and i want to exclude missing codes;*/

finfirms=substrn(siccd,1,2);

if 60=

if financial=2; /*exclude financial firms*/

keep cusip year month prc ret vwretd mkteq;

run;

-----END OF CODE-----

When I try to run this, I get the following errors:

Variable date, shrout, prc, siccd is uninitialized.

The variable cusip in the DROP, KEEP, or RENAME list has never been referenced.

The variable ret in the DROP, KEEP, or RENAME list has never been referenced.

The variable vwretd in the DROP, KEEP, or RENAME list has never been referenced.

Thank you for your time.

Summer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Exchange Rates and International Finance

Authors: Laurence Copeland

6th edition

273786040, 978-0273786047

More Books

Students also viewed these Finance questions