fitness function for rsi using genetic algorithms
问题 This code is implementing a fitness function for rsi indicators using genetic algorithms but i have no idea what are the output for every function def strategy_return(trading_signal, asset_return): strat_ret = np.array(trading_signal[0:-1]) * np.array(asset_return[1::]) strat_ret = np.insert(strat_ret, 0, np.nan) return strat_ret def _cumulative_return(ret): cum_ret_list = [ret[0]] n = ret.shape[0] for i in range(1, n): cum_ret = (1 + ret[i]) * (1 + cum_ret_list[-1]) - 1 cum_ret_list.append