Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaperTrading Deployment #7

Open
Daiiszuki opened this issue Aug 29, 2023 · 0 comments
Open

PaperTrading Deployment #7

Daiiszuki opened this issue Aug 29, 2023 · 0 comments

Comments

@Daiiszuki
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant