core/mixins/profit_and_loss.mixin library