https://github.com/manifoldfinance/backtest
automated strategy backtesting and validation
https://github.com/manifoldfinance/backtest
backtest econometric finance quant trading
Last synced: over 1 year ago
JSON representation
automated strategy backtesting and validation
- Host: GitHub
- URL: https://github.com/manifoldfinance/backtest
- Owner: manifoldfinance
- Created: 2020-12-28T03:26:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T03:27:13.000Z (over 5 years ago)
- Last Synced: 2025-03-16T01:11:38.803Z (over 1 year ago)
- Topics: backtest, econometric, finance, quant, trading
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### rainmaker:backtester
> backtest stratagies and plot graph in nodejs
#### usage
- Create a Strategy
```javascript
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
```javascript
entry(qty);
buy(qty);
sell(qty);
```