report

package
v0.0.0-...-ae86ed1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 15 Imported by: 0

README

GoCryptoTrader Backtester: Report package

Build Status Software License GoDoc Coverage Status Go Report Card

This report package is part of the GoCryptoTrader codebase.

This is still in active development

You can track ideas, planned features and what's in progress on this Trello board: https://trello.com/b/ZAhMhpOy/gocryptotrader.

Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack

Report package overview

The report package helps generates the output under the results folder.

As the application is run, many statistics such as purchase events are tracked. These events are utilised and enhanced in the report package in order to render an HTML report for easy comparison and historical strategy effectiveness.

The report utilises the following sweet technologies:

Output example: example

Please click GoDocs chevron above to view current GoDoc information for this package

Contribution

Please feel free to submit any pull requests or suggest any desired features to be added.

When submitting a PR, please abide by our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Code must adhere to our coding style.
  • Pull requests need to be based on and opened against the master branch.

Donations

If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:

bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	OriginalCandles []*kline.Item
	EnhancedCandles []DetailedKline
	Statistics      *statistics.Statistic
	Config          *config.Config
	TemplatePath    string
	OutputPath      string
}

Data holds all statistical information required to output detailed backtesting results

func (*Data) AddKlineItem

func (d *Data) AddKlineItem(k *kline.Item)

AddKlineItem appends a SET of candles for the report to enhance upon generation

func (*Data) GenerateReport

func (d *Data) GenerateReport() error

GenerateReport sends final data from statistics to a template to create a lovely final report for someone to view

type DetailedCandle

type DetailedCandle struct {
	Time           int64
	Open           float64
	High           float64
	Low            float64
	Close          float64
	Volume         float64
	VolumeColour   string
	MadeOrder      bool
	OrderDirection order.Side
	OrderAmount    float64
	Shape          string
	Text           string
	Position       string
	Colour         string
	PurchasePrice  float64
}

DetailedCandle contains extra details to enable rich reporting results

type DetailedKline

type DetailedKline struct {
	IsOverLimit bool
	Watermark   string
	Exchange    string
	Asset       asset.Item
	Pair        currency.Pair
	Interval    kline.Interval
	Candles     []DetailedCandle
}

DetailedKline enhances kline details for the purpose of rich reporting results

type Handler

type Handler interface {
	GenerateReport() error
	AddKlineItem(*kline.Item)
}

Handler contains all functions required to generate statistical reporting for backtesting results

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL