04-30-2021
raqthesolid
Quartz | Level 8
Member since
05-18-2014
- 70 Posts
- 8 Likes Given
- 0 Solutions
- 5 Likes Received
-
Latest posts by raqthesolid
Subject Views Posted 1446 09-28-2020 03:43 PM 11251 11-28-2017 05:46 AM 1025 11-20-2017 11:55 PM 9434 11-11-2017 12:16 AM 9442 11-11-2017 12:00 AM 1765 11-06-2017 10:02 PM 1831 11-06-2017 11:21 AM 1293 10-10-2017 01:50 AM 1338 10-07-2017 02:03 AM 7537 09-26-2017 03:39 AM -
Activity Feed for raqthesolid
- Got a Like for Re: Amihud (2002) Liquidity Measure. 10-12-2021 04:03 PM
- Posted creating ranges and then percentages on Statistical Procedures. 09-28-2020 03:43 PM
- Liked Re: Amihud (2002) Liquidity Measure for EJAA. 09-28-2020 03:16 PM
- Got a Like for Re: Amihud (2002) Liquidity Measure. 02-08-2018 09:01 AM
- Posted Re: choose top 10 percent data based on one variable on SAS Programming. 11-28-2017 05:46 AM
- Liked Re: deleting a variable on the basis of another variable for mkeintz. 11-21-2017 12:19 AM
- Posted deleting a variable on the basis of another variable on SAS Data Management. 11-20-2017 11:55 PM
- Posted Re: Amihud (2002) Liquidity Measure on SAS Forecasting and Econometrics. 11-11-2017 12:16 AM
- Posted Re: Amihud (2002) Liquidity Measure on SAS Forecasting and Econometrics. 11-11-2017 12:00 AM
- Posted Re: Ripple of a date on SAS Data Management. 11-06-2017 10:02 PM
- Posted Ripple of a date on SAS Data Management. 11-06-2017 11:21 AM
- Got a Like for Re: Unbalanced panel data: How to chose between fixed effects or random effects. 11-05-2017 03:08 AM
- Got a Like for Re: Amihud (2002) Liquidity Measure. 10-11-2017 03:50 PM
- Posted Re: Panel regression vs. pooled OLS on SAS Forecasting and Econometrics. 10-10-2017 01:50 AM
- Posted Re: Panel regression vs. pooled OLS on SAS Forecasting and Econometrics. 10-07-2017 02:03 AM
- Posted Re: SAS Macro issue on SAS Programming. 09-26-2017 03:39 AM
- Liked Re: Proc Logistic for Ksharp. 09-26-2017 03:37 AM
- Posted Re: Amihud (2002) Liquidity Measure on SAS Forecasting and Econometrics. 09-26-2017 03:36 AM
- Posted Proc Logistic on Statistical Procedures. 07-25-2017 03:12 AM
- Tagged Proc Logistic on Statistical Procedures. 07-25-2017 03:12 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 3 1 1 -
My Liked Posts
Subject Likes Posted 1 03-23-2017 02:25 AM 1 01-03-2015 03:16 AM 2 09-26-2017 03:36 AM 1 04-01-2017 03:02 AM
09-28-2020
03:43 PM
Hello Folks, I have a data with Firm, Year, and ROA variables. MY ROA variables ranges from -50% to +50%. I want to create ranges using ROA which looks like
Range Percentage
less than 0 percentage of firms in this category
0 to1% percentage of firms in this category
2 to 3% percentage of firms in this category
4 to 5% percentage of firms in this category
......50% percentage of firms in this category
Data sample:
Firm Year ROA
PK0000201019
2016
11.70255
PK0000301017
2016
9.428861
PK0000401015
2016
-5.80082
PK0000601010
2016
17.6943
PK0001101010
2016
-8.47214
PK0001301016
2016
20.18228
PK0001901013
2016
11.68819
PK0002001011
2016
13.31986
PK0002101019
2016
2.865007
PK0002201017
2016
9.238791
PK0002301015
2016
19.7908
PK0002501010
2016
1.970355
PK0002701016
2016
64.1466
PK0002901012
2016
12.86187
PK0003001010
2016
-3.51228
PK0003101018
2016
19.38653
PK0003201016
2016
3.417498
PK0003301014
2016
22.99802
PK0003401012
2016
-10.3915
PK0003801013
2016
15.53839
PK0003901011
2016
4.804186
PK0004101017
2016
7.54267
PK0004301013
2016
22.41655
PK0004401011
2016
9.554636
PK0004701014
2016
8.438554
PK0004801012
2016
8.95593
PK0004901010
2016
7.656038
PK0005201014
2016
50.03889
PK0005401010
2016
-14.8514
PK0005501017
2016
8.194166
PK0005701013
2016
25.27504
PK0006001017
2016
3.329774
PK0006101015
2016
5.472684
PK0006801010
2016
10.02528
PK0006901018
2016
9.398788
PK0007101014
2016
29.06179
PK0008101013
2016
5.884868
PK0008201011
2016
18.7473
PK0008401017
2016
14.02341
PK0008501014
2016
7.427927
PK0009201010
2016
21.76193
PK0009401016
2016
-7.2675
PK0009501013
2016
-0.98955
PK0009801017
2016
30.41894
PK0010001011
2016
5.148667
PK0010301015
2016
-2.02785
PK0010501010
2016
14.67657
PK0010901012
2016
12.50834
PK0011001010
2016
6.203303
PK0011101018
2016
16.16196
PK0011201016
2016
22.07683
PK0011301014
2016
33.96201
PK0011501019
2016
-6.85826
PK0011701015
2016
34.67594
PK0012101017
2016
12.91066
PK0012401011
2016
10.27558
PK0012501018
2016
14.37119
PK0013401010
2016
4.465276
PK0014201013
2016
9.261005
PK0014501016
2016
9.95184
Thanks for any help.
... View more
11-28-2017
05:46 AM
Hello guys,
how to transform this code if i need top30 percentile and bottom30 percentile at the same time. thanks in advance
... View more
11-20-2017
11:55 PM
Hello Folks,
I have following kind of data;
Firm var_A
a 1
a 2
a 3
a 4
a 5
b 2
b 1
c 1
i know i can always use "if and then statement" but it will delete only 2,3 and 4.
i want to Delete Firm, if the var_A is between 2 to 4. i don't want to delete the only 2-4 but what i want is to delete the all of the Firm if any on the Var_A comes in the range of 2-4. so after that logic only C will remain. all of Firm A and b should delete. I will be thankful for any help. Regards
raq
... View more
11-11-2017
12:16 AM
I did not do for Amihud (2002) and never saw it on daily as well. You can do it daily if you know some papers who did it. Otherwise other measures like spread, turnover etc might be more suitable on daily basis.
... View more
11-11-2017
12:00 AM
Hello dear, you can easily create year, month and day variables from your date. if your date is in sas date formate. year = year(Date); month = month(Date); day = day(Date); i did this because i have to calculated illiquidity on monthly basis from days. additionally i also wanted to see how many days are being used in each month. i require atlease 10 days in a month.
sorry for confusion among permno and symbol.. i originally used permno (USA data) and changed it for you. but few were left out. please assume permno, firmid or symbol as firmID . hope this might help. feel free to ask. good day
... View more
11-06-2017
10:02 PM
Thank you for your reply. I think i could not through my idea well. I donot have this Event_all column in my data. I want to create this using other three columns. Simple i want to fill the missing values in Event data with the next non-missing value for each firm separately. good day
... View more
11-06-2017
11:21 AM
Hello experts,
I have three variables in my data set,
1) Date
2) Event date (this is present for few days not all of the data) this variable is missing for majority of data
3) firm ID
What i Want: I want to create a new variable "event all" which should have same event date in the previous date.
for example, my data start from 1st January 2017. First event occurs on 25 Feb 2017. I want to give "25 Feb 2017' date to all the observation from 1st January 2017 to 25 Feb 2017 in the new variable "event all".
In my data, there are multiple event and multiple firms, so i want to deal each firm and its date separately.
kindly help me to program this.
Regards
Data have;
Firm date event_date event_all
1 20170101 - 20170401
1 20170201 - 20170401
1 20170301 - 20170401
1 20170401 20170401 20170401
2 20160101 20160301
2 20160201 20160301
2 20160301 20160301 20160301
2 20160401 - -
My data has more than 400 firms and about 20 year of data. any help will be appreciated.
Thanks in advance
... View more
10-10-2017
01:50 AM
Thanks for the reply. i tried the following code to make sure this thing.
proc sort data=j out=c NODUPKEY; by gvkey year; run;
my first problem has been solved.
Regarding second thing there are about 5000 distinct GVKEY.
i am usning following codes;
proc sort data=j; by gvkey datadate; run; proc panel data=j ; id GVKEY DATADATE; model invest = TQ cfcon /fixtwo pooled; run;
now i am getting this issue;
ERROR: There is only one cross section or time series observation. Computations will be terminated.
any way to solve this thing. your efforts are always appreciated.
ABdul
... View more
10-07-2017
02:03 AM
I am trying to run proc panel model but having following issues;
1)
proc sort data=j; by gvkey datadate; run; proc panel data=j ; id GVKEY DATADATE; model invest = TQ cfcon /fixtwo pooled; run;
ERROR: Data set WORK.J is not sorted in ascending sequence with respect to time series ID. The current time period has year=2015 and the previous time period has year=2015 in cross section GVKEY=006506.
2) proc sort data=j; by datadate; run; proc panel data=j ; id GVKEY DATADATE; model invest = TQ cfcon /fixtwo pooled; run;
ERROR: There is only one cross section or time series observation. Computations will be terminated. any way to correct these issues.
THanks
... View more
09-26-2017
03:39 AM
sorry i could not figure out the issue and dropped these fitstatistics=fitresult OutputStatistics=residual; from ods output parameterestimates=pa0 fitstatistics=fitresult OutputStatistics=residual; quit; it worked for me. Abdul
... View more
09-26-2017
03:36 AM
2 Likes
Hello there,
the following codes worked for me. i hope they will help you too.
***Calculating liquidity from Daily data.; *liquidity calculation following Amihud (2002) conditions; 2) At least 10 trading days in a month 3) Using daily data to calculate monthly Liquidity;
data Dailyp; set daily; Trans_month = MDY(MONTH (Date),1, YEAR(Date)); run; proc sort; by trans_month; run; data dailypa (Drop=Vol); set dailyp; prc=abs(prc); if vol <= 0 then delete; *(-99 Volume is used when there are missing values); if prc=. then delete; if vol=. then delete; Dvol=prc*vol; run; **(2) Count "valid" dates per firm, per month. I assumed it means dates where volume > 0.; proc freq data=dailypa; tables symbol * year * month / noprint out=monthly_counts (drop=percent);run; data Monthly_counts1; set monthly_counts;*run; **(at least 10 trading days for each stock in a month; if COUNT<10 then delete; run;
data illiquid; set dailypa; if ret=0 then delete; ratio=abs(ret)/Dvol; run;
proc sort data=illiquid; by symbol year month; run;
proc summary data=illiquid nway; class symbol year month; var ratio; output out=summary_data (keep=symbol year month total_ratio) sum=total_ratio; run;
proc sort data=summary_data; by symbol year month; run; proc sort data=monthly_counts1; by symbol year month; run; data illiquidd; merge summary_data monthly_counts1; by symbol year month; if count<5 then delete; run;
data mydata.Liquidity(drop=ratio2 total_ratio count symbol); set illiquidd; ratio2=10**6 *total_ratio; *(this is just to show in better form); ILLIQUIDITY=ratio2/COUNT; permno=symbol; run;
proc sort; by ILLIQUIDITY; run; proc means; var illiquidity ; run;
Good luck. let me know if you stuck anywhere and if my presentation is not very helpful.
Regards
ABdul
... View more
07-25-2017
03:12 AM
Hello friends,
i am using follwing type of codes to run fixed effects logistic regressions;
proc logistic data=e descending; class SIC / param=ref ; model EI = ROA Size MB FATA DA Time SIC; output out=a pred=yhat; run;
or proc logistic data=e descending; strata SIC; model EI = ROA Size MB FATA DA Time; output out=a pred=yhat; run;
I want to get Pseudo R-square or R-Square from these. Is ther any commond option i can use to do that or any other way. Thank for any help.\
... View more
07-25-2017
03:05 AM
Hello dear Can I get Pseudo R squre using Proc logistic? Thanks for help
... View more
07-25-2017
03:05 AM
Hello dear ?
Can i get Pseudo R squre or R squre using this regression in SAS? any help will he highly appreciable. THnaks
... View more
06-05-2017
07:02 PM
Thank you very much for your cooperation. Someone else suggested helpful article which solved my issue perfectly. Good day
... View more