AI4Finance-Foundation / FinRL

FinRL: Financial Reinforcement Learning. 🔥
https://ai4finance.org
MIT License
9.48k stars 2.31k forks source link

Issue with Wrds #945

Open notBradPitt opened 1 year ago

notBradPitt commented 1 year ago

I'm having issues with wrds, specifically version 3.1.6 which is required by FinRL. However, version 3.1.5 seems to work fine and I had to downgrade before reinstalling FinRL without the depedencies image

YangletLiu commented 1 year ago

I'm having issues with wrds, specifically version 3.1.6 which is required by FinRL. However, version 3.1.5 seems to work fine and I had to downgrade before reinstalling FinRL without the depedencies image

Can you explain more and the code position? WRDS is not necessary…I forget how wrds is requirement?

zhumingpassional commented 1 year ago

did you use the data processor wrds, or encounter issues when installing wrds?

notBradPitt commented 1 year ago

Can you explain more and the code position? WRDS is not necessary…I forget how wrds is requirement?

So, library wrds>=3.1.6 is installed from here when I install from git image It then is imported here image Which in turn is used by data_processor image I'm trying to use DataProcessor in my code to get hourly data, since I don't think YahooDownloader has an option for interval. I think I saw this in one of the example notebooks. image

The error I mentioned earlier, I think is related to wrds and not FinRL itself.

did you use the data processor wrds, or encounter issues when installing wrds?

No, I didn't. Installation went well but I get this error when trying to import DataProcessor (which in turn imports wrds)

ndronen commented 1 year ago

WRDS is a requirement. See #939.

notBradPitt commented 1 year ago

WRDS is a requirement. See #939.

Why is this version 3.1.6 needed exactly? I found the offending code which is image sql.py of wrds 3.1.6 image This is the difference between f"{err=}" and f"{err}" image

Python 3.7 should be supported by FinRL and so is wrds, but this behavior is not supported in 3.7. Remove the = (equal sign) from wrds' sql.py code and it'll function properly.

image

ndronen commented 1 year ago

I don't know why that version is required. I just discovered last weekend, while trying to reproduce, that (1) the package is required and (2) the dependency was not specified in pyproject.toml.

This syntax error in wrds was introduced in wharton/wrds#39. I would suggest opening a PR against wrds that just removes that "=".

notBradPitt commented 1 year ago

I have created a new pull request on https://github.com/wharton/wrds/pull/40.