Strat 3
What is Strat3 ?
Strat3 is a generic backtester. Once a strategy is implemented it is compiled as a dynamic library and can be loaded in Strat3 without recompilation. Strat3 will then simulate the market and produce a report of the performance of the given strategy (multiple strategies can be given for comparison purposes).
What makes Strat3 special?
It was build to be flexibile. Each strategy is composed of multiple modules that can be
customized in order to improve diagnostic performance. For example, a Portfolio entity can be used to
test how a specific strategy reacts when trading tresholds are modified.
Strategyis used to implement the theoretical strategy. This entity returns a matrix of weight that will be used by the portfolio class to determine if trades need to be made.-
Portfoliodetermines when trade should be made based on the result returned by a strategy and makes them.- Is the new weight returned by the strategy sufficiently different for a transaction to happen ?
- Should a Stop order also be placed ?
- etc..
-
Market Engine, the market engine satisfes orders made by the strategy’s portfolio. It can be as simple asfill-all no-costtobid-ask ~ Distribution() and $ XX /trade. This allows us to test how a specific strategy reacts in different market situations. - Finally, each step is logged. This allows us to produce a comprehensive report on the strategy. Tex and HTML reports can be produced.
Extensive Reporting
Strat3 offers a default report format that can be seen below. Strat3 logged data can easily be accessed to generate new statistics and reports.
Table of content
Risk Section
Full report examples
Configure file
Since configuring strat3 can be tedious a command line. A program is available which enables you to easily backtest compiled strategies. Here is an example of a correct configuration file.
{
"Strategies":{
"MyStrategy":{
"strategy":{
"file": "./StandardStrategy.dll",
"init_struct": "None",
"window": 10,
"frequency": 2,
"rebalanced": true
},
"portfolio":{
"file": "./StandardPortfolio.dll",
"init_struct": "None",
"cash":1000
}
}
},
"Backtest":{
"data": {
"price":{
"file": "../../data/data.csv",
"type": "csv",
"price_matrix": true
}
},
"dates": "nothing",
"run": "all"
},
"Report":{
"type": "pdf",
"email": "myemail@email.com",
"extended": true,
"all_in_one": true
}
}
Planned
- Strat3 as a Web service
- Remplace Gnuplot as visualization package.
- Real time plotting