adjust

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const CacheLifetime = 24 * time.Hour

Variables

View Source
var RateChangeCacheMap = map[CacheKey]RateChangeCache{}
View Source
var (
	RounderNum = math.Pow(decimal, roundToDecimals)
)

Functions

This section is empty.

Types

type Actions

type Actions struct {
	Symbol string
	Tbk    *io.TimeBucketKey
	Rows   *CARows
}

func NewCorporateActions

func NewCorporateActions(symbol string) *Actions

func (*Actions) Len

func (act *Actions) Len() int

func (*Actions) Load

func (act *Actions) Load(catalogDir *catalog.Directory) error

func (*Actions) RateChangeEvents

func (act *Actions) RateChangeEvents(includeSplits, includeDividends bool) []RateChange

type Adjust

type Adjust struct {
	uda.AggInterface

	AdjustDividend bool
	AdjustSplit    bool

	CatalogDir *catalog.Directory
	// contains filtered or unexported fields
}

func (*Adjust) Accum

func (*Adjust) GetInitArgs

func (adj *Adjust) GetInitArgs() []io.DataShape

func (*Adjust) GetOptionalArgs

func (adj *Adjust) GetOptionalArgs() []io.DataShape

func (*Adjust) GetRequiredArgs

func (adj *Adjust) GetRequiredArgs() []io.DataShape

func (*Adjust) New

func (adj *Adjust) New(_ *functions.ArgumentMap, args ...interface{}) (uda.AggInterface, error)

func (*Adjust) Output

func (adj *Adjust) Output() *io.ColumnSeries

type CARows

type CARows struct {
	EntryDates               []int64
	TextNumbers              []int64
	UpdateTextNumbers        []int64
	DeleteTextNumbers        []int64
	NotificationTypes        []byte
	Statuses                 []byte
	UpdatedNotificationTypes []byte
	SecurityTypes            []byte
	VoluntaryMandatoryCodes  []byte
	EffectiveDates           []int64
	RecordDates              []int64
	ExpirationDates          []int64
	NewRates                 []float64
	OldRates                 []float64
	Rates                    []float64
}

func CARowsFromColumnSeries added in v4.1.18

func CARowsFromColumnSeries(cs *io.ColumnSeries) (*CARows, error)

func NewCARows

func NewCARows(length int) *CARows

type CacheKey

type CacheKey struct {
	Symbol    string
	Splits    bool
	Dividends bool
}

type RateChange

type RateChange struct {
	Textnumber int64
	Epoch      int64
	Type       enum.NotificationType
	Rate       float64
}

func GetRateChanges

func GetRateChanges(symbol string, includeSplits, includeDividends bool,
	catalogDir *catalog.Directory,
) []RateChange

type RateChangeCache

type RateChangeCache struct {
	Changes   []RateChange
	Access    int64
	CreatedAt time.Time
}

type RateChangeGetter

type RateChangeGetter func(string, bool, bool) []RateChange

Jump to

Keyboard shortcuts

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