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

     1  package factors
     2  
     3  import (
     4  	"context"
     5  	"encoding/json"
     6  	"fmt"
     7  	"gitee.com/quant1x/engine/cache"
     8  	"gitee.com/quant1x/gox/api"
     9  	"testing"
    10  )
    11  
    12  func TestF10(t *testing.T) {
    13  	date := "2024-04-10"
    14  	q := getQuarterlyYearQuarter(date)
    15  	fmt.Println(q)
    16  	cacheDate, featureDate := cache.CorrectDate(date)
    17  	//cacheDate := "2023-09-28"
    18  	//featureDate := date
    19  	code := "sh600105"
    20  	code = "sh000001"
    21  	code = "sh600859"
    22  	code = "sz002685"
    23  	code = "sh603158"
    24  	code = "sh600178"
    25  	code = "sh880941"
    26  	code = "sh600016"
    27  	f10 := NewF10(cacheDate, code)
    28  	//barIndex := 1
    29  	ctx := context.Background()
    30  	f10.Init(ctx, featureDate)
    31  	f10.Repair(code, cacheDate, featureDate, true)
    32  	data, _ := json.Marshal(f10)
    33  	text := api.Bytes2String(data)
    34  	fmt.Println(text)
    35  }