microsoft / qlib

Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
https://qlib.readthedocs.io/en/latest/
MIT License
14.54k stars 2.53k forks source link

HIST: What is the meaning of market_value? #1787

Open Hanson13 opened 1 month ago

Hanson13 commented 1 month ago

❓ Questions and Help

Dear authors, In the training code of HIST, I noticed the input of DataLoader includes df_train['market_value']. I didn't find this in the training of other models. Could you please tell me what it stands for? Is it the price of the stock? `

slc = slice(pd.Timestamp(args.train_start_date), pd.Timestamp(args.train_end_date))
df_train['market_value'] = df_market_value[slc]
df_train['market_value'] = df_train['market_value'].fillna(df_train['market_value'].mean())
df_train['stock_index'] = 733
df_train['stock_index'] = df_train.index.get_level_values('instrument').map(stock_index).fillna(733).astype(int)
train_loader = DataLoader(df_train["feature"], df_train["label"], df_train['market_value'], df_train['stock_index'], batch_size=args.batch_size, pin_memory=args.pin_memory, start_index=start_index, device = device)

`

Thank you for your kind reply!