Correction and run time

Course Name: Deep Reinforcement Learning in Trading, Section No: 22, Unit No: 3, Unit type: Notebook

1) The commented for loop is already recency sampling.  Random would be: for i, idx in enumerate(np.random.randint(0, len_memory, size=inputs.shape[0])):

2) Is run time really meant to be long even on test mode? I am running on gpu and after 5h, only 7 trades and 1 month have passed.  The quantra run isn't any faster.

Hello Edgar, 


  1. That's a good observation. 

    For recency sampling, the code is :

    for i, idx in enumerate(np.arange(-inputs.shape[0],0)):



    and for random sampling, the code is :

    for i, idx in enumerate(np.random.randint(0, len_memory, size=inputs.shape[0])):



    The model solution notebook will be updated accordingly.


  2. Yes, running the RL model on price data would take time. For me, without GPU, it took almost the same amount of time to generate 7 trades. 



    Hope this helps!