strategy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct {
}

Basic is a basic test strategy, which interprets every DataEvent as a signal to buy

func (*Basic) CalculateSignal

func (s *Basic) CalculateSignal(e bt.DataEventHandler, data bt.DataHandler, p bt.PortfolioHandler) (bt.SignalEvent, error)

CalculateSignal handles the single Event

type BuyAndHold

type BuyAndHold struct {
}

BuyAndHold is a basic test strategy, which interprets the first DataEvent on a symbal as a signal to buy if the portfolio is not already invested.

func (*BuyAndHold) CalculateSignal

func (s *BuyAndHold) CalculateSignal(e bt.DataEventHandler, data bt.DataHandler, p bt.PortfolioHandler) (bt.SignalEvent, error)

CalculateSignal handles the single Event

Jump to

Keyboard shortcuts

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