DEV Community

Discussion on: Who's looking for open source contributors? (September 17 edition)

dirkolbrich profile image
Dirk Olbrich


gobacktest is an event-driven backtesting framework written in Golang.

dirkolbrich / gobacktest

event-driven backtesting framework written in golang

Go Doc Travis Coverage Status Go Report Card Software License

Heads up: This is a framework in development, with only basic functionality.

gobacktest - Fundamental stock analysis backtesting

An event-driven backtesting framework to test stock trading strategies based on fundamental analysis. Preferably this package will be the core of a backend service exposed via a REST API.


Basic example:

package main
import (
func main() {
  // initiate a new backtester
  test := gobacktest.New()
  // define and load symbols
  symbols := []string{"TEST.DE"}
  // create a data provider and load the data into the backtest
  data := &data.BarEventFromCSVFile{FileDir: "../testdata/test/"}

  // choose a strategy
  strategy := strategy.BuyAndHold()

  // create an asset and append it to the strategy

The goal is to create a flexible backtesting system, which could be used as a backend or as a stand alone within a Jupyter notebook.

If you are interested in financial stuff, algorithmic trading or quantitative finance and writing code in Go, feel welcome.

I would appreciate contributors for basic algos, tearsheet and graph integration, documentation or just in general discussion about the structure of the framework from an end user perspective.