util

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateLogReturns added in v0.1.14

func CalculateLogReturns(prices []float64) []float64

CalculateLogReturns calculates the logarithmic returns from a series of prices

func CalculateVolatility added in v0.1.14

func CalculateVolatility(returns []float64, window int) float64

CalculateVolatility calculates the standard deviation of returns for a given window

func IsNil added in v0.1.22

func IsNil(i interface{}) bool

IsNil checks whether the provided interface is nil. It correctly handles typed nils for pointers, slices, maps, channels, functions, and interfaces.

func LogExecutionTime

func LogExecutionTime(start time.Time, name string, fields interface{}, logger *zerolog.Logger)

func Revision added in v0.1.6

func Revision() string

Revision retrieves the VCS revision from build info. Available only if the build was done with -buildvcs flag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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