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

Backtest ValueError: NaN or Inf encountered! symbol=600832.SH #46

Open
maminzhao opened this issue May 29, 2018 · 1 comment
Open

Backtest ValueError: NaN or Inf encountered! symbol=600832.SH #46

maminzhao opened this issue May 29, 2018 · 1 comment

Comments

@maminzhao
Copy link

Traceback (most recent call last):
File "/home/ma/Documents/workspace-python/QuantSystem/JAQS/test/my_alpha_test.py", line 100, in
tr,props = do_back_test(dv)
File "/home/ma/Documents/workspace-python/QuantSystem/JAQS/test/my_alpha_test.py", line 76, in do_back_test
bt.run_alpha()
File "/home/ma/Documents/workspace-python/QuantSystem/JAQS/jaqs/trade/backtest.py", line 454, in run_alpha
self.re_balance_plan_after_open()
File "/home/ma/Documents/workspace-python/QuantSystem/JAQS/jaqs/trade/backtest.py", line 408, in re_balance_plan_after_open
suspensions=all_list)
File "/home/ma/Documents/workspace-python/QuantSystem/JAQS/jaqs/trade/strategy.py", line 712, in generate_weights_order
sec, price, w))
ValueError: NaN or Inf encountered!
trade_date=20150520, symbol=600832.SH, price=nan, weight=0.0059713192234979486

600832这个股票在20150520退市了,这种情况没有处理么,只要遇到这种情况就会终止运行么?

@CKAtGitHub
Copy link

同问,不知道题主解决了吗?

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

2 participants