FinRL_Crypto
FinRL_Crypto copied to clipboard
PaperTrading Deployment
I'm trying to deploy a trained model to begin paper trading on alpaca (Debian GNU/Linux 11)
Among the available options "AlpacaPaperTradingMultiCrypto" seems to be out dated, specifically theses lines:
agent.init(net_dim, state_dim, action_dim)
agent.save_or_load_agent(cwd=cwd, if_save=False)
which return ".... no method init " as well as "....no method save_or_load_agent"
I also tried using 'PaperTradingAlpaca', which return
Market opened.
Empty DataFrame
Columns: [index, tic]
Index: []
Traceback (most recent call last):
File "/.../paperTrade2.py", line 888, in <module>
paperTrade.run()
File "/paperTrade2.py", line 614, in run
self.trade()
File "/paperTrade2.py", line 634, in trade
state = self.get_state()
File ".../paperTrade2.py", line 725, in get_state
price, tech, turbulence = alpaca.fetch_latest_data(
File "/.../myenv2/lib/python3.10/site-packages/finrl/meta/data_processors/processor_alpaca.py", line 328, in fetch_latest_data
start_time = data_df.timestamp.min()
File "/home/scamma/myenv2/lib/python3.10/site-packages/pandas/core/generic.py", line 5989, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'timestamp'. Did you mean: 'to_timestamp'?
It looks like the data retrieval isn't successful but the model was loaded. The weird thing is that I've actually deployed one of my bots to alpaca (trading crypto) before with much ease.
I should also mention that the model was trained using finrl_crypto. Please assist in anyway possible.
What would be the best environment to achieve this? what could be causing the issue in "fetch_Data" of the alpaca processor ?
Do you require any additional info?
any recommendations?