stock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddQuarter

func AddQuarter(qdate string, diff int) (string, error)

func AddYear

func AddYear(qdate string, diff int) (string, error)

func BytesToFloat64

func BytesToFloat64(bys []byte) float64

func BytesToInt

func BytesToInt(bys []byte) uint16

func BytesToInt64

func BytesToInt64(bys []byte) int64

func CalApr

func CalApr(tpr float64, period float64) float64

func CalTpr

func CalTpr(apr float64, period float64) float64

func CreateI18n

func CreateI18n(data interface{}) string

func CurrentDate

func CurrentDate() int64

func CurrentMinute

func CurrentMinute() int64

func DiffYear

func DiffYear(sqdate string, eqdate string) (int, error)

func Equal

func Equal(src float64, target float64) bool

func GetJsonMap

func GetJsonMap(data interface{}) (map[string]string, map[string]string, []string)

func GetQReportDate

func GetQReportDate(reportDate string) string

func GetQTradeDate

func GetQTradeDate(tradeDate int64) string

func GetWTradeDate

func GetWTradeDate(tradeDate int64) string

func InBuildInt

func InBuildInt(colname string, paraInt []int) (string, []interface{})

func InBuildStr

func InBuildStr(colname string, paraStr string, sep string) (string, []interface{})

func Mkdir

func Mkdir(path string) error

func ReflectFields

func ReflectFields(d interface{}) (fieldParam string)

func Rename

func Rename(path string, newpath string) error

func StdPath

func StdPath(path string) string

func ToCsv

func ToCsv(head []string, data []interface{}) string

Types

type AggregationType

type AggregationType int
const (
	Aggregation_SUM AggregationType = iota + 1
	Aggregation_MAX
	Aggregation_MIN
	Aggregation_MEAN
	Aggregation_MEDIAN
	Aggregation_STDDEV
	Aggregation_RSD
	Aggregation_COV
	Aggregation_COR
	Aggregation_COUNT
	Aggregation_STD
	Aggregation_MINMAX
	Aggregation_PCA
)

type Stat

type Stat struct {
	Sum      interface{}
	Min      interface{}
	Max      interface{}
	Count    interface{}
	Median   []interface{}
	Mean     interface{}
	Stddev   interface{}
	Mad      interface{}
	Covs     map[string]interface{}
	Cors     map[string]interface{}
	Rsd      interface{}
	Pca      []interface{}
	Std      []interface{}
	Minmax   []interface{}
	Data     []interface{}
	Colnames []string
	// contains filtered or unexported fields
}

func CreateStat

func CreateStat(data []interface{}, std_colnames []string) *Stat

func (*Stat) CalCor

func (this *Stat) CalCor(x_colname string) interface{}

func (*Stat) CalCors

func (this *Stat) CalCors() map[string]interface{}

func (*Stat) CalCov

func (this *Stat) CalCov(x_colname string) interface{}

func (*Stat) CalMad

func (this *Stat) CalMad() interface{}

* 中位数偏差的中位数

func (*Stat) CalMean

func (this *Stat) CalMean() interface{}

func (*Stat) CalMedian

func (this *Stat) CalMedian() []interface{}

func (*Stat) CalPca

func (this *Stat) CalPca() []interface{}

func (*Stat) CalRsd

func (this *Stat) CalRsd() interface{}

func (*Stat) CalStd

func (this *Stat) CalStd(reserved_colnames []string, isWinsorize bool) ([]interface{}, []interface{})

func (*Stat) CalStddev

func (this *Stat) CalStddev() interface{}

func (*Stat) CalSum

func (this *Stat) CalSum() interface{}

Directories

Path Synopsis
tushare

Jump to

Keyboard shortcuts

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