Cyan Spring ATS
Open Source Algorithmic Trading Software
Configure Cyan Spring ATS
Configure Back Testing
Cyan Spring back test framework allows your strategies to quickly run through millions of tick data to find out how your strategies perform against past. Although history may not always repeat itself, back testing does provide some benefits:
Run Back Testing
Please refer to [install_dir]/server/backtest.bat in your downloaded package as an example. Back test framework takes a strategy file and a number of tick files as inputs
Usage: strategy_file tick_file1 tick_file2...
At the end back testing, back test program saves a copy of strategy file as the result. It is shown at the last line of console output:
12:30:18,038 [main] INFO BackTest - Strategy back test result is saved as: backtest/out/DOLLAR_NEUTRAL.out.xml
Tick file formatBy default, the back test program accepts tick files in Cyans Spring defined format. You may take a look at the examples in [install_dir]/server/backtest/ticks.
TIME("time"), SYMBOL("symbol"), BID("bid"), ASK("ask"), BID_VOL("bid_vol"), ASK_VOL("ask_vol"), LAST("last"), LAST_VOL("last_vol"), HIGH("high"), LOW("low"), OPEN("open"), CLOSE("close"), TOTAL_VOL("total_vol"),
If your tick data are stored in a database or in other formats. You may consider to write your own com.cyanspring.common.marketdata.ITickDataReader implementation class, and change the following in back testing configuration file [install_dir]/server/conf/back_test.xml
<bean id="exchangeBT" class="com.cyanspring.server.bt.ExchangeBT"> <property name="tickDataReader"> <bean class="[your class]"/> </property> </bean>