AlgoTraderAlgoTrader Documentation

Chapter 34. Reporting

AlgoTrader provides a convenient way to create custom CSV reports for strategy specific reporting. All relevant classes are available inside the package ch.algotrader.report.

To use the reporting functionality create a class similar to this:

public class MyCustomReport {


    private ListReporter reporter;
    public OrderReport() {
        String[] header = new String[] { "Date", "Symbol", "Quantity", "Signal" };
        this.reporter = new ListReporter(Report.generateFile("OrderReport"), header);
    }
    public void write(Date date, String symbol, int quantity, String signal) {
        this.reporter.write(date, symbol, quantity, signal);
    }
}

This will create a .csv report named OrderReport.csv inside the directory /files/report/ which contains the columns Date, Symbol, Quantity, Signal.

Some Reports are available out-of-the-box, for further details please see Section 6.6, “Performance Statistics”