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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 3261 views
  • 2 likes
  • 4 in conversation