BookmarkSubscribeRSS Feed
shalmali
Calcite | Level 5

Hi All,

I want to calculate Annual stock returns by compounding monthly stock returns for a twelve-month period ending four months after the end of the fiscal year of the firm. The information I have includes firm_ticker (firm identifier), dates, and fiscal_year_end.

The sample consists of around 4000 unique firms with information for the period 2004 to 2012. Mostly the firms have fiscal year end of December, March, June, and September. The subsample of the data looks as follows

FIRM_TICKER             DATES             FISCAL_YEAR_END             PRICE
A1/31/200498.5
A2/28/200498.25
A3/31/200498.6
A4/30/200499
A5/31/200498.33
A6/30/200498.4
A7/31/200498.6
A8/31/200498.9
A9/30/200498.75
A10/31/200498.8
A11/30/200498.4
A12/31/200498.22
A1/31/200598.9
A2/28/200598.75
A3/31/200598.8
A4/30/200598.4
A5/31/200598.22
A6/30/200598.4
A7/31/200598.6
A8/31/200597.9
A9/30/200597.8
A10/31/200598
A11/30/200598.2
A12/31/200598.25

I would appreciate if someone could share the code for annual return calculation.

Thanks in advance.

1 REPLY 1
Patrick
Opal | Level 21

Can you please provide a data step which creates sample data and then also give us a sample of how the result should look like?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1520 views
  • 0 likes
  • 2 in conversation