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

strategy_backtest.run() error, your assistance please #370

Closed
dflow opened this issue Aug 22, 2021 · 1 comment
Closed

strategy_backtest.run() error, your assistance please #370

dflow opened this issue Aug 22, 2021 · 1 comment

Comments

@dflow
Copy link

dflow commented Aug 22, 2021

python 3.8.2 64-bit

i get the following error after following the tutorial:

File "/Users/dflow/code/qstrader/sixty_forty.py", line 45, in
strategy_backtest.run()
File "/Library/Python/3.8/site-packages/qstrader/trading/backtest.py", line 354, in run
self.qts(dt, stats=stats)
File "/Library/Python/3.8/site-packages/qstrader/system/qts.py", line 119, in call
rebalance_orders = self.portfolio_construction_model(dt, stats=stats)
File "/Library/Python/3.8/site-packages/qstrader/portcon/pcm.py", line 284, in call
target_portfolio = self._generate_target_portfolio(dt, full_weights)
File "/Library/Python/3.8/site-packages/qstrader/portcon/pcm.py", line 139, in _generate_target_portfolio
return self.order_sizer(dt, weights)
File "/Library/Python/3.8/site-packages/qstrader/portcon/order_sizer/dollar_weighted.py", line 162, in call
asset_quantity = int(
ValueError: cannot convert float NaN to integer

@juliettejames
Copy link
Collaborator

Version 0.2.4 now longer supports Python 3.8.
Please see the change log for more details.

Thanks

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