def after_trading(context):
    logger.info('Hold count: {}'.format((context.holdid + 1)))
    profit = ((context.portfolio.cash + context.portfolio.market_value) - context.portfolio.starting_cash)
    profit_pct = (profit / (context.portfolio.market_value - profit))
    logger.info('after_trading: market_value {}, profit {}, percent {}'.format(context.portfolio.market_value, profit, profit_pct))
def after_trading(context):
    logger.info('Hold count: {}'.format((context.holdid + 1)))
    profit = ((context.portfolio.cash + context.portfolio.market_value) - context.portfolio.starting_cash)
    profit_pct = (profit / (context.portfolio.market_value - profit))
    logger.info('after_trading: market_value {}, profit {}, percent {}'.format(context.portfolio.market_value, profit, profit_pct))