Rl for multiple column , multiple feature case , where each column representing one asset

HI all

I would really appreciate if you can help on the below issue
Basically while am replicating the below code already attached (https://hilpisch.com/rlearn_finance.html), yet towards the last section basically in the case of finance class within the DQL agent every time I try to add another asset to the below line
 
env = Finance(['MSFT.O'], 'r') FOR EXAMPLE , env = Finance(['MSFT.O' , 'GOOG.O' ,'EUR=' ], 'r')
I get an error regarding the number of arguments / positional arguments , as it only expects one ticker at a time is there a way to get around this ? i.e. to be able to include 2 or more series which already attached above.
 
Do the examples provided within the keras-rl(github page) provide more efficient a way instead of the code provided / attached within ? is there a way to merge the two ? your guidance is highly appreciated
and my other general question if there is a way where i can add the features directly to an CSV (example attached as well ) and let the agent read directly the computed features from the CSV instead of adding them separately within the state part of the agent ?
 
looking back to hear from you
best regards
ashraf

Hello Ashraf,


  1. To be able to handle multiple symbols in the Finance environment you can try modifying the function _prepare_data(). You should make the modification where the symbol is being read from the raw dataframe to create a new data dataframe.


  2. Keras-rl library standardizes the data processing and simplifies agent creation. You simply have to pass the learning neural network and data processor into the model classes to be able to conveniently train various kinds of agent. Yes, you can easily merge this code with keras-rl. The only drawback of using the library is that it isn't maintained and new agent architectures aren't implemented. 


  3. Yes, you will be able to add other features except the closing price of particular symbols if you modify the _prepare_data() function as stated above. You will also have to modify _get_state() function as well to return a numpy matrix instead of an array. 





     

thanks akshay I will have a look at that AND I WILL GET BACK TO YOU , AS WELL I FIND YOUR GRESPONSES VERY PRECISE AND TO THE POINT



BETS REGARDS