-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Shenlei151 flexibility enhance #491
Shenlei151 flexibility enhance #491
Conversation
Thanks for your codes. It's great. I suggest to add type hint in all functions. In the new version, type hint will be added. |
@shenlei515 some research team contacted me about errors, they have a submission ddl, so I reverted this PR. |
Yes, I see some errors caused by my changes, I think my change only apply to my situation, maybe it need some modifications to be adapted for other situations. I am sorry for the result caused by my unreasonable PR. |
It is OK, not a big issue. |
@shenlei515 In addition, I think RL_stock.py is not suitable to be in the current folder. |
Thanks for your codes. I have several questions. What's the length of initial_list? What does initial_list mean? |
@zhumingpassional First element of initial_list is the cash we have in the beginning, rests of it are the share of stocks we have at first. So the length of initial_list is supposed to be 1+stock_dimension. |
Thanks for your reply. I suggest initial_list is seperated to two parts (parameters), initial_amount and num_stock_shares, since they have different units/denotations (money, and num of shares). |
Yes, that make more sense. |
@shenlei515 Could you please push a PR to revise it if you have enough time? The first PR focuses on this point (initial_list is seperated to two parts). A PR with small changes is more favorable. |
I have pulled a request to revise it. |
Merged. Thanks for your valuable codes. |
Fixes #481
I adjust a few lines of code in FinRL to make it more flexible for problems that I met with in my own project, though these changes may be aiming for my project, I think it might be useful to extend the feature of FinRL including:
feature extension:
bug:
5.fix bug that when buying stocks it didn't consider conmmision, which will cause the cash < 0 (fix it by modifying finrl/finrl_meta/env_stock_trading/env_stocktrading.py function _buy_stock)
These features are needed in my project, I hope it will help enhance the flexibility of FinRL
Also, I put part of my project code to explan why and how to use the features that I add in RL_stock.py, I hope it will help you understand the changes I made.