sthewissen / Mynt

An Azure Functions-based crypto currency trading bot; featuring 10 exchanges, 25 indicators, custom strategy support, backtester and more
BSD 3-Clause "New" or "Revised" License
237 stars 129 forks source link

Backtester use LiteDB, add some options to make it even more powerful #63

Closed LORDofDOOM closed 6 years ago

LORDofDOOM commented 6 years ago

Done: Option to set timeframe (e.g. 2018-04-01 until 2018-05-01) for backtest - This is possible with DB support.

LORDofDOOM commented 6 years ago

Add "Todo" -> Option to choose timeframe :-)

LORDofDOOM commented 6 years ago

Please check last commit ("Move BacktestFunctions to own file") before merge.

In my test anything is working. I move these functions to own file to abstract the functions from the netcoreapp. IMHO this is a useful change and will make web backtests possible (e.g. from Mynt.AspNetCore.Host).

I would also suggest to move backtester logic to Mynt.Core (did not do this currently - I don't know if thats your preferred way) because we could use backtest data to "warmup" strategies if we have enough data.

sthewissen commented 6 years ago

If we can do a clean separation of actual backtesting logic (going through strategies/defining trade advices) and console writing (which belongs in the console app) I'm all for it. That way we can indeed hook the backtesting code up to any other type of system.

LORDofDOOM commented 6 years ago

Backtest is now integrated in Mynt.Core - Please check if my integration is OK (I've added some samples for web api)

sthewissen commented 6 years ago

@cryptoandrej Would you be willing to review this as well, since I remember us talking about adding multiple exchange support a while ago?

LORDofDOOM commented 6 years ago

Backtester Database is now abstracted in Mynt.Data.

I currently add only NoSQL (LiteDB and MongoDB) because I don't use Azure or SQL Server and can't test. But it's possible to use different Databases for Backtester and Trading or if SQL is needed the backtest classes are easy to add.