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

Position和BasePosition代码的一点小瑕疵,不是bug! #1845

Open
initsownright opened this issue Aug 30, 2024 · 0 comments
Open

Position和BasePosition代码的一点小瑕疵,不是bug! #1845

initsownright opened this issue Aug 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@initsownright
Copy link

initsownright commented Aug 30, 2024

🐛 Bug Description

BasePosition是Position的基类,
在Position的构造函数__init__()中,使用super() . init() 调用BasePosition的构造函数。
BasePosition的__init__()函数的参数列表为 self, *args: Any, cash: float = 0.0, **kwargs: Any,

在BasePosition的__init__()方法的代码中,并没有使用到cash参数,
而且不是应该把*args和**kwargs放在形参列表的最后两个吗。

Screenshot

BasePosition__init__

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.

  • Qlib version: 0.9.5.99
  • Python version:
  • OS (Windows, Linux, MacOS):
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

@initsownright initsownright added the bug Something isn't working label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant