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

main.py 오류 문의입니다. #125

Open
termini123 opened this issue Nov 21, 2021 · 1 comment
Open

main.py 오류 문의입니다. #125

termini123 opened this issue Nov 21, 2021 · 1 comment
Labels
question Further information is requested v2

Comments

@termini123
Copy link

python main.py --stock_code 005930 --rl_method dqn --net dnn --learning --num_epoches 100 --lr 0.001 --start_epsilon 1 --discount_factor 0.9
로 main.py(default='v2')로 실행시키면 아래와 같은 에러가 뜹니다.

Traceback (most recent call last):
File "main.py", line 89, in
min_trading_unit = max(int(100000 / chart_data.iloc[-1]['close']), 1)
File "C:\Users\Computer\anaconda3\lib\site-packages\pandas\core\indexing.py", line 931, in getitem
return self._getitem_axis(maybe_callable, axis=axis)
File "C:\Users\Computer\anaconda3\lib\site-packages\pandas\core\indexing.py", line 1566, in _getitem_axis
self._validate_integer(key, axis)
File "C:\Users\Computer\anaconda3\lib\site-packages\pandas\core\indexing.py", line 1500, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds

사용한 파일은 깃허브에서 바로 받은 파일인데 어떤 부분이 문제인지 전혀 모르겠습니다...
원래 있던 파일인데 왜 범위가 벗어났다고 뜨는걸까요? 혹시 v2로 설정할 때 main.py와 predict.py말고 수정할 부분이 또 있을까요?

@quantylab
Copy link
Owner

@termini123
v2 데이터가 2016~2019년까지라서 start_dateend_date를 넣어주셔야 합니다.
https://cafe.naver.com/quantylab 가입하시면 v3, v4 데이터 다운받으실 수 있습니다.

@quantylab quantylab added v2 question Further information is requested labels Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v2
Projects
None yet
Development

No branches or pull requests

2 participants