gitee.com/quant1x/engine@v1.8.4/factors/dataset_features.go (about)

     1  package factors
     2  
     3  // SecurityFeature 证券特征信息
     4  type SecurityFeature struct {
     5  	Date           string  `name:"日期" dataframe:"date,string"`
     6  	Open           float64 `name:"开盘" dataframe:"open,float64"`
     7  	Close          float64 `name:"收盘" dataframe:"close,float64"`
     8  	High           float64 `name:"最高" dataframe:"high,float64"`
     9  	Low            float64 `name:"最低" dataframe:"low,float64"`
    10  	Volume         int64   `name:"成交量" dataframe:"volume,int64"`
    11  	Amount         float64 `name:"成交额" dataframe:"amount,float64"`
    12  	Up             int     `name:"上涨家数" dataframe:"up,int64"`   // 个股无效
    13  	Down           int     `name:"下跌家数" dataframe:"down,int64"` // 个股无效
    14  	LastClose      float64 `name:"昨收" dataframe:"last_close,float64"`
    15  	ChangeRate     float64 `name:"涨跌幅" dataframe:"change_rate,float64"`
    16  	OpenVolume     int64   `name:"开盘量" dataframe:"open_volume,int64"`
    17  	OpenTurnZ      float64 `name:"开盘换手z" dataframe:"open_turnz,float64"`
    18  	OpenUnmatched  int64   `name:"开盘未匹配" dataframe:"open_unmatched,int64"` // K线无效, 调取misc特征数据获取
    19  	CloseVolume    int64   `name:"收盘量" dataframe:"close_volume,int64"`
    20  	CloseTurnZ     float64 `name:"收盘换手z" dataframe:"close_turnz,float64"`
    21  	CloseUnmatched int64   `name:"收盘未匹配" dataframe:"close_unmatched,int64"` // K线无效, 调取misc特征数据获取
    22  	InnerVolume    int64   `name:"内盘" dataframe:"inner_volume,int64"`
    23  	OuterVolume    int64   `name:"外盘" dataframe:"outer_volume,int64"`
    24  	InnerAmount    float64 `name:"流出金额" dataframe:"inner_amount,float64"`
    25  	OuterAmount    float64 `name:"流入金额" dataframe:"outer_amount,float64"`
    26  	//State          int     `name:"数据状态" dataframe:"state"`
    27  }
    28  
    29  // CheckSum 校验和
    30  func (this SecurityFeature) CheckSum() int {
    31  	sign := 0
    32  	sign += int(this.OpenVolume)
    33  	sign += int(this.OpenTurnZ)
    34  	sign += int(this.OpenUnmatched)
    35  	sign += int(this.CloseVolume)
    36  	sign += int(this.CloseTurnZ)
    37  	sign += int(this.CloseUnmatched)
    38  	sign += int(this.InnerVolume)
    39  	sign += int(this.OuterVolume)
    40  	sign += int(this.InnerAmount)
    41  	sign += int(this.OuterAmount)
    42  	return sign
    43  }
    44  
    45  // TurnoverDataSummary 换手数据概要
    46  type TurnoverDataSummary struct {
    47  	OpenVolume     int64   `name:"开盘量" dataframe:"open_volume,int64"`
    48  	OpenTurnZ      float64 `name:"开盘换手z" dataframe:"open_turnz,float64"`
    49  	OpenUnmatched  int64   `name:"开盘未匹配" dataframe:"open_unmatched,int64"` // K线无效, 调取misc特征数据获取
    50  	CloseVolume    int64   `name:"收盘量" dataframe:"close_volume,int64"`
    51  	CloseTurnZ     float64 `name:"收盘换手z" dataframe:"close_turnz,float64"`
    52  	CloseUnmatched int64   `name:"收盘未匹配" dataframe:"close_unmatched,int64"` // K线无效, 调取misc特征数据获取
    53  	InnerVolume    int64   `name:"内盘" dataframe:"inner_volume,int64"`
    54  	OuterVolume    int64   `name:"外盘" dataframe:"outer_volume,int64"`
    55  	InnerAmount    float64 `name:"流出金额" dataframe:"inner_amount,float64"`
    56  	OuterAmount    float64 `name:"流入金额" dataframe:"outer_amount,float64"`
    57  }