SAS Procedures

Help using Base SAS procedures
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
amanjot_42
Fluorite | Level 6

Hi,

 

I want to keep stocks with very high negative beta values also in the respective deciles. The intuition is that both negative and low positive betas are good for portfolio mean-variance.

 

Thanks

 

Regards  

amanjot_42
Fluorite | Level 6

Hi,

 

1. You want to generate CAPM (capital asset pricing model,  i.e. MODEL retx=sprtrn) beta estimates using CRSP monthly data for your sample for a subperiod,  then use the beta estimates to form decile portfolios. 

 

Ans: Exactly, but my overall objective is Fama-Macbeth.

 

Then you want rolling 60 month PORTFOLIO returns, meaning that after the regresssion, you also will need a data step or proc to compound monthly returns of  each portfolio component.   (I presume there is no reweighting within portfolios over  the 60 month window).

 

Ans: You are right, there is no reweighting within portfolios over the 60 month window.

 

It's time to start a new question.    Don't move the goal posts within a topic.

Ans: I have posted a new question. Thanks for this.

 

Regards

mkeintz
PROC Star

@amanjot_42:

  1. You only want companies with data for the complete range, right?

  2. Show us some sample date, including date variable(s), company id vars,  and record order.
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
amanjot_42
Fluorite | Level 6

Hi,

Thanks for your reply,

 

This is a sample of my data.

 

1. You only want companies with data for the complete range, right?

Yes, I want companies' data for complete range specified earlier. 

 

Regards

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 4413 views
  • 2 likes
  • 4 in conversation