Dear Stata membets, I have been creating portfolios for the momentum, short term reversal and mean reversion anomalies. The winner and loser portfolio have been done, however I would also like to include the zero cost strategy portfolio. Is there a way to generate the portfolio as potfolio 10-1. I have long data for multiple firms and multiple years The code used for the portfolio constructure is as follows.

egen portfolio1 = xtile(ret1), nquantiles(10) by(mdate)
egen portfolio6 = xtile(ret6), nquantiles(10) by(mdate)
egen portfolio12 = xtile(ret12), nquantiles(10) by(mdate)
egen portfolio24 = xtile(ret24), nquantiles(10) by(mdate)
egen portfolio36 = xtile(ret36), nquantiles(10) by(mdate)

gen double LOGexcesreturn = log(excesreturn+1)
rangestat (sum) LOGexcesreturn (count) LOGexcesreturn, interval(mdate -5 0) by(code)
gen excesreturn6 = exp(LOGexcesreturn_sum) - 1 if LOGexcesreturn_count == 6
gen E_hold6 = f6.excesreturn6

collapse (mean) year five Date BidYieldClose RiskFree marketcap ret1 ret6 ret12 ret24 ret36 E_hold1 E_hold6 E_hold12 E_hold24 E_hold36 EQUALmarketreturn marketpremium marketpremium1 marketpremium6 marketpremium12 marketpremium24 marketpremium36 meanRet6 meanExces6 meanRet12 meanExces12 meanRet24 meanExces24 meanRet36 meanExces36 premiummean6 premiummean12 premiummean24 premiummean36 (sum) P6wmeanRet6 P6wmeanExces6 P6wmeanRet12 P6wmeanExces12 P12wmeanRet6 P12wmeanExces6 P12wmeanRet12 P12wmeanExces12 P24wmeanRet24 P24wmeanExces24 P24wmeanRet36 P24wmeanExces36 P36wmeanRet24 P36wmeanExces24 P36wmeanRet36 P36wmeanExces36 weight6 wreturn6 wexcesreturn6 W_hold6_p6 W_hold12_p6 W_hold24_p6 W_hold36_p6, by(mdate portfolio6)

I will use collapse per portfolio to do the by group regression, These are used to calculate future returns and used to calculate using abnormal returns against the market portfolio. How am i able to either create an extra observation per portfolio for winner minus loser portfolio or vice versa?