We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
You may watch the following Loom video to understand the possible error:
https://www.loom.com/share/a078b84b92ba46feb1a9abf2d8fc8b93
pip install backtesting
from backtesting import Backtest, Strategy from backtesting.lib import crossover from backtesting.test import SMA, GOOG class SmaCross(Strategy): n1 = 10 n2 = 20 def init(self): close = self.data.Close self.sma1 = self.I(SMA, close, self.n1) self.sma2 = self.I(SMA, close, self.n2) def next(self): if crossover(self.sma1, self.sma2): self.buy() elif crossover(self.sma2, self.sma1): self.sell() bt = Backtest(GOOG, SmaCross, cash=10000, commission=.002, exclusive_orders=True) output = bt.run() bt.plot()
bokeh.__version__
The text was updated successfully, but these errors were encountered:
Already solved in #803
Sorry, something went wrong.
No branches or pull requests
Expected Behavior
Actual Behavior
You may watch the following Loom video to understand the possible error:
https://www.loom.com/share/a078b84b92ba46feb1a9abf2d8fc8b93
Steps to Reproduce
pip install backtesting
Additional info
bokeh.__version__
: 3.0.3The text was updated successfully, but these errors were encountered: