Skip to content

Please ask why bring my stock data into the training, the action produces nan #44

@longjie1101

Description

@longjie1101

The resulting problems are as follows

/home/xie/Tacrypto/DCmaster/env/EnvMultipleStock_validation.py:162: RuntimeWarning: invalid value encountered in greater
buy_index = argsort_actions[::-1][:np.where(actions > 0)[0].shape[0]]
/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020-master/env/EnvMultipleStock_validation.py:136: RuntimeWarning: invalid value encountered in double_scalars
df_total_value['daily_return'].std()
/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020-master/model/models.py:128: RuntimeWarning: invalid value encountered in double_scalars
df_total_value['daily_return'].std()
A2C Sharpe Ratio: nan
======PPO Training========
Training time (PPO): 5.048629434903463 minutes
======PPO Validation from: 20201126 to 20210303
PPO Sharpe Ratio: nan
======DDPG Training========
Training time (DDPG): 0.9256621718406677 minutes
======DDPG Validation from: 20201126 to 20210303
DDPG Sharpe Ratio: 0.07492627731887684

My data did not produce missing values, only DDPG in the three algorithms can run successfully to get results, the rest of A2C and PPO and even ACER, TD3 are training a certain amount of time after the action space to produce nan, why is this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions