Performance functions and reinforcement learning for trading systems and portfolios | Synapse