cgarib / ML_Nanodegree_DeepQTrader

Capstone Project for the Machine Learning Nanodegree. Used Deep Q Learning to create an agent that trade stocks.
15 stars 7 forks source link

how to do real time simulation with saved model #1

Open kaishijeng opened 8 years ago

kaishijeng commented 8 years ago

Hi,

I am able to run your code successfully and have a saved model, network-400. Now I plan to test this model for up to date simulation with initial portfolio, N dollars and fetching SPY quote from yahoo daily. Can you provide a guidance how to do this?

Thanks,

cgarib commented 8 years ago

Hi,

Create a DeepQTrader object and make sure the "restore" parameter is set to true so that network-400 is restored. The use DeepQTrader._trade and pass as parameters the preprocessed prices data you want to use for trading and the prices DataFrame.

Regards

kaishijeng commented 8 years ago

If I understand your email correctly, I need to download price of all stocks in SPY daily and run preprocessing and then feed to DeepQTrader._trade.

I will give it a try

Thanks,

On Wed, Aug 3, 2016 at 10:34 AM, Cristobal Garib notifications@github.com wrote:

Hi,

Create a DeepQTrader object and make sure the "restore" parameter is set to true so that network-400 is restored. The use DeepQTrader._trade and pass as parameters the preprocessed prices data you want to use for trading and the prices DataFrame.

Regards

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cgarib/ML_Nanodegree_DeepQTrader/issues/1#issuecomment-237299103, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGg3hQppu8ZYAdXYNYdrKD4kfhdzXKBks5qcNEpgaJpZM4JbRL_ .

kaishijeng commented 8 years ago

It seems the following function has been defined twice in preprocess.py CalculateBollingerBands(df)

Thanks,

On Wed, Aug 3, 2016 at 8:45 PM, kaishi Jeng kaishi.jeng@gmail.com wrote:

If I understand your email correctly, I need to download price of all stocks in SPY daily and run preprocessing and then feed to DeepQTrader._trade.

I will give it a try

Thanks,

On Wed, Aug 3, 2016 at 10:34 AM, Cristobal Garib <notifications@github.com

wrote:

Hi,

Create a DeepQTrader object and make sure the "restore" parameter is set to true so that network-400 is restored. The use DeepQTrader._trade and pass as parameters the preprocessed prices data you want to use for trading and the prices DataFrame.

Regards

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cgarib/ML_Nanodegree_DeepQTrader/issues/1#issuecomment-237299103, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGg3hQppu8ZYAdXYNYdrKD4kfhdzXKBks5qcNEpgaJpZM4JbRL_ .