prediction

package
v0.0.0-...-de2183f Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BarMeasure

type BarMeasure struct {
	Body, Top, Bottom float64
}

func NewBarMeasure

func NewBarMeasure(b *models.Bar, atr float64) *BarMeasure

func (*BarMeasure) ToFloat64s

func (m *BarMeasure) ToFloat64s() []float64

func (*BarMeasure) ToOHLC

func (m *BarMeasure) ToOHLC(atr, lastClose float64) *models.OHLC

type BarPredictor

type BarPredictor struct {
	*BarPredictorCore
	// contains filtered or unexported fields
}

func NewBarPredictor

func NewBarPredictor(
	barDur time.Duration,
	atrLen int,
	p Predictor) (*BarPredictor, error)

func (*BarPredictor) Predict

func (bp *BarPredictor) Predict(curBar *models.Bar) (*models.Bar, error)

func (*BarPredictor) Train

func (bp *BarPredictor) Train(bars []*models.Bar, nIter int) error

type BarPredictorCore

type BarPredictorCore struct {
	ATR *indicators.ATR
	// contains filtered or unexported fields
}

func (*BarPredictorCore) TotalWarmupPeriod

func (bp *BarPredictorCore) TotalWarmupPeriod() int

func (*BarPredictorCore) WarmUp

func (bp *BarPredictorCore) WarmUp(bars []*models.Bar) error

Directories

Path Synopsis
Package mock_prediction is a generated GoMock package.
Package mock_prediction is a generated GoMock package.

Jump to

Keyboard shortcuts

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