Skip to content

manifoldfinance/backtest

Repository files navigation

rainmaker:backtester

backtest stratagies and plot graph in nodejs

usage

  • Create a Strategy
const { Strategy } = require('./backtester');

class MyStrategy extends Strategy {
    constructr(..args){
        super(...args);
    }
    next(){
   // logic
    }
}

And then

  • Load data and create a Backtester instance

const bt = genBackTest(data,MyStrategy,10000,0,0,5)

And then

  • Execute bt.run()
  • Visual feedback use:bt.plot()

BackTester

  • data:[[timestamp],[open],[high],[low],[close]]``Strategy -bt.run()`
  • bt.plot()

Strategy

  • Strategy

  • next()

  • call every times in a cycle
    next()

  • use order

entry(qty);
buy(qty);
sell(qty);

About

automated strategy backtesting and validation

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published