michaelgrosner / tribeca

A high frequency, market making cryptocurrency trading platform in node.js
Other
4.02k stars 951 forks source link

Backtesting Question #192

Open CCKRK opened 7 years ago

CCKRK commented 7 years ago

I'm hoping someone can help me out getting a backtest scenario going. I've read #59 and looked at docs from the linked forks but I'm still a bit lost.

I'm running Tribeca through the compiled JS files in Tribeca/service with a MongoDB instance running in a docker container. I've set my ENV flags to TRIBECA_BACKTEST_MODE=true and set flags for MD_FILE = {Path to a Mongoexport --arrayJSON output.json from collected websocket market data} This is where my confusion starts. What kind of format is PARAM_FILE looking for? I took a look at backtest.ts + models.ts so I tried something like:

[{
    "startingBasePosition":10,
    "startingQuotePosition":5000,
    "QuotingParameters":{
        "width":0.1,
        "size":1,
        "mode":"Top",
        "fvModel":"BBO",
        "targetBasePosition": 10,
        "positionDivergence": 3,
        "ewmaProtection":false,
        "autoPositionMode":"Off",
        "aggressivePositionRebalancing":false,
        "tradesPerMinute":2.5,
        "tradeRateSeconds":300,
        "longEwma":0.095,
        "shortEwma":0.095,
        "quotingEwma":0.095,
        "aprMultiplier":3,
        "stepOverSize":0.01
    }
}]

in a .json file, however, any arrangement of parameters I've tried thus far cannot produce anything in /result from the backtest service. The backtest service will take in an enumerate my parameters but will hang at "done" (from recieving parameters) and not produce any output files.

Can anyone shed some light on this? Maybe show me another way of implementing backtesting altogether? I'm sure the way I'm going about it is a little backwards...

bernardoteixeirabtc commented 6 years ago

You probably moved on from this project, but in your PARAM_FILE it should be "quotingParameters" and not "QuotingParamenters".