PriceForecast/aa copy.py

62 lines
2.0 KiB
Python
Raw Normal View History

2025-02-13 11:25:03 +08:00
# 创建eta自定义指标数据
2024-11-01 16:38:21 +08:00
2025-02-13 11:25:03 +08:00
from lib.dataread import *
2024-11-01 16:38:21 +08:00
2025-02-13 11:25:03 +08:00
signature = BinanceAPI(APPID, SECRET)
etadata = EtaReader(signature=signature,
classifylisturl=classifylisturl,
classifyidlisturl=classifyidlisturl,
edbcodedataurl=edbcodedataurl,
edbcodelist=edbcodelist,
edbdatapushurl=edbdatapushurl,
edbdeleteurl=edbdeleteurl,
edbbusinessurl=edbbusinessurl
)
2024-11-01 16:38:21 +08:00
2025-02-13 11:25:03 +08:00
logger.info('从eta获取数据...')
signature = BinanceAPI(APPID, SECRET)
etadata = EtaReader(signature=signature,
classifylisturl=classifylisturl,
classifyidlisturl=classifyidlisturl,
edbcodedataurl=edbcodedataurl,
edbcodelist=edbcodelist,
edbdatapushurl=edbdatapushurl,
edbdeleteurl=edbdeleteurl,
edbbusinessurl=edbbusinessurl,
)
# eta自有数据指标编码
modelsindex = {
'NHITS': 'SELF0000077',
'Informer':'SELF0000078',
'LSTM':'SELF0000079',
'iTransformer':'SELF0000080',
'TSMixer':'SELF0000081',
'TSMixerx':'SELF0000082',
'PatchTST':'SELF0000083',
'RNN':'SELF0000084',
'GRU':'SELF0000085',
'TCN':'SELF0000086',
'BiTCN':'SELF0000087',
'DilatedRNN':'SELF0000088',
'MLP':'SELF0000089',
'DLinear':'SELF0000090',
'NLinear':'SELF0000091',
'TFT':'SELF0000092',
'FEDformer':'SELF0000093',
'StemGNN':'SELF0000094',
'MLPMultivariate':'SELF0000095',
'TiDE':'SELF0000096',
'DeepNPTS':'SELF0000097'
}
date = '2025-02-13'
value = 333444
for m in modelsindex.keys():
list = []
list.append({'Date':date,'Value':value})
data['DataList'] = list
# data['IndexCode'] = modelsindex[m]
data['IndexName'] = f'聚烯烃价格预测{m}模型'
data['Remark'] = m
etadata.push_data(data)