gitee.com/quant1x/engine@v1.8.4/market/ignore.go (about)

     1  package market
     2  
     3  import (
     4  	"gitee.com/quant1x/gotdx/securities"
     5  	"strings"
     6  )
     7  
     8  // IsNeedIgnore 需要忽略的个股
     9  //
    10  //	检测需要的剔除ST、退市和摘牌的个股
    11  func IsNeedIgnore(securityCode string) bool {
    12  	securityInfo, ok := securities.CheckoutSecurityInfo(securityCode)
    13  	if !ok {
    14  		// 没找到, 忽略
    15  		return true
    16  	}
    17  	name := strings.ToUpper(securityInfo.Name)
    18  	if strings.Contains(name, "ST") {
    19  		// ST标志, 忽略
    20  		return true
    21  	}
    22  	if strings.Contains(name, "退") {
    23  		// 退市标志, 忽略
    24  		return true
    25  	}
    26  	if strings.Contains(name, "摘牌") {
    27  		// 摘牌标志, 忽略
    28  		return true
    29  	}
    30  	return false
    31  }