<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gain_to_loss_ratio(self):
 """Gain-to-loss ratio, ratio of positive to negative returns. Formula: (n pos. / n neg.) * (avg. up-month return / avg. down-month return) [Source: CFA Institute] Returns ------- float """


        gt = self > 0
        lt = self < 0
        return (nansum(gt) / nansum(lt)) * (self[gt].mean() / self[lt].mean())