Hello all,
I have an unbalanced panel data set on funds and their respective 3 Factor alphas for each year. Moreover, I have their market segments based on their Objective Codes and their Management name. I need to construct the segment rank of a fund by ordering all funds belonging to a specific market segment (crsp_obj_cd) in a given year according to the 3 Factor alpha and rank them with a normalized value from 0 to 1 (best fund). Also, I need to order funds belonging to a specific family (mgmt_id) and assign to them a normalized rank according to the specified Segment rank.
Lastly, I need to perform a piecewise linear regression by estimating the slope coefficients for the bottom quintile, the 3 middle and the top quintile of segment and family ranks. The variables are as follows:
LOW(FamRank)i,t−1=min(FamRanki,t−1, 0.2)
LOW(SegRank)i,t−1=min(SegRanki,t−1, 0.2)
MID(FamRank)i,t−1=min(FamRanki,t−1 − LOW(FamRank)i,t−1, 0.6)
MID(SegRank)i,t−1=min(SegRanki,t−1 − LOW(SegRank)i,t−1, 0.6)
TOP(FamRank)i,t−1=FamRanki,t−1 − (LOW(FamRank)i,t−1 +MID(FamRank)i,t−1)
TOP(SegRank)i,t−1=SegRanki,t−1 − (LOW(SegRank)i,t−1 +MID(SegRank)i,t−1).
Any help is highly appreciated.
A sample of my dataset is given below:
Array
Related Posts with Slope coefficients for different quintiles of ranks
Taking the sum of some observationsHi all, I have a question. I have a dataset like the left table in my screenshot (small example). I…
coefplot rdrobust combinationDear STATAlists, I am trying to add on x-axes ticks and labels in order to have for each line one t…
Using poi2hdfe to account for both country-year and regional fixed effectsHi everyone, R user switching to STATA for replicaiton purposes here. Apologies in advance if my que…
Graph label while using "ciplot" commandDear All, Here is my data. It is in wide form (survey data). For instance I will use Vitamin D vari…
To convert 'blue digit ' column into 'black digit' column (string to normal variable)Hi. I am using a data set which contains more than 600,000 observations on household expenditure. T…
Subscribe to:
Post Comments (Atom)
0 Response to Slope coefficients for different quintiles of ranks
Post a Comment