market

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package market 二级市场相关的功能性函数

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCodeList

func GetCodeList() []string

GetCodeList 加载全部股票代码

func GetStockCodeList added in v0.7.7

func GetStockCodeList() []string

func IndexSentiment

func IndexSentiment(codes ...string) (sentiment float64, consistent int)

IndexSentiment 情绪指数, 50%为平稳, 低于50%为情绪差, 高于50%为情绪好

func IsNeedIgnore

func IsNeedIgnore(securityCode string) bool

IsNeedIgnore 需要忽略的个股

检测需要的剔除ST、退市和摘牌的个股

func IsSubNewStock

func IsSubNewStock(code string) bool

IsSubNewStock 是否次新股

func PriceLimit added in v0.7.7

func PriceLimit(securityCode string, lastClose float64) (limitUp, limitDown float64)

PriceLimit 计算涨停板和跌停板的价格

func SecuritySentiment

func SecuritySentiment[E ~int | ~int64 | ~float32 | ~float64](up, down E) (sentiment float64, consistent int)

SecuritySentiment 计算证券情绪

func SnapshotSentiment

func SnapshotSentiment(snapshot quotes.Snapshot) (sentiment float64, consistent int)

SnapshotSentiment 情绪指数, 50%为平稳, 低于50%为情绪差, 高于50%为情绪好

Types

type SentimentType

type SentimentType = int
const (
	SentimentZero SentimentType = iota // 情绪一般
	SentimentHigh SentimentType = 1    // 情绪高涨
	SentimentLow  SentimentType = -1   // 情绪低迷
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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