backtest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStrategyNotFound = errors.New("strategy not found")
)

Functions

This section is empty.

Types

type Backtest

type Backtest struct {
	PortfolioModel *portfolio.Model
	Performance    *portfolio.Performance
}

func New

func New(ctx context.Context, shortcode string, params map[string]json.RawMessage, benchmark *data.Security, startDate time.Time, endDate time.Time) (*Backtest, error)

func (*Backtest) Save

func (b *Backtest) Save(ctx context.Context, userID string, permanent bool)

Save the backtest to the Database

Jump to

Keyboard shortcuts

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