tribeca icon indicating copy to clipboard operation
tribeca copied to clipboard

Backtesting Question

Open CCKRK opened this issue 7 years ago • 1 comments

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...

CCKRK avatar Dec 05 '17 21:12 CCKRK

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

bernardoteixeirabtc avatar Jun 19 '18 16:06 bernardoteixeirabtc