Closed holoiii closed 7 years ago
just read or make use ofsrc/server/backtest.ts
and /test/*.ts
files.
at https://github.com/ctubio/tribeca/blob/master/src/server/config.ts#L17 there is the name of the environment variable used to make the app run in enabled backtest mode, and at https://github.com/ctubio/tribeca/blob/master/src/server/backtest.ts#L395 there is the port used to access the backtest methods (/inputData, /nextParameters, /result); but i dont like to manually do tests, i would preffer to instead use scripts at /test/*.ts to periodically run the tests with mocha using command npm test
(since the app is updated daily, a manual test today will become useless tomorrow if the test is not executed again).
at https://github.com/ctubio/tribeca/blob/master/test/backtest.ts#L67 there is an example of moving forward the time, and at https://github.com/ctubio/tribeca/blob/master/test/backtest.ts#L94 there is another example to feed market data to the app and to wait for orders to be completed.
Amazing, thanks!
It would be great to have some kind of documentation on how to run backtests - I noticed that there was only this:
https://github.com/ctubio/tribeca/blob/master/MANUAL.md#how-can-i-test-new-trading-strategies
But it doesn't really provide any info on how to actually run backtests.
Thanks for any guidance, and great work!