'Append all details about the FillEvent to the CSV trade log.'

def record_trade(self, fill):

    fname = os.path.expanduser(os.path.join(self.config.OUTPUT_DIR, self.csv_filename))
    with open(fname, 'a') as csvfile:
        writer = csv.writer(csvfile)
        writer.writerow([fill.timestamp, fill.ticker, fill.action, fill.quantity, fill.exchange, PriceParser.display(fill.price, 4), PriceParser.display(fill.commission, 4)])
