sword134
sword134
> [`Strategy.data.index`](https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html#backtesting.backtesting.Strategy.data) is an instance of [`pd.DatetimeIndex`](https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.html) and it's values are [`pd.Timestamp`](https://pandas.pydata.org/docs/reference/api/pandas.Timestamp.html). So something like this might work: > > ```python > time = self.data.index[-1].time() > if start ... >...
> You can test the order via [`Order.is_long`](https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html#backtesting.backtesting.Order.is_long). The active [`Trade`](https://kernc.github.io/backtesting.py/doc/backtesting/backtesting.html#backtesting.backtesting.Trade.is_long) has a similar property. > > You can also just loop over `for order in self.orders`, because once the...
@Jackal08 i've found the bug. I use yfinance to get the data and there was an error in one of the tickers where it suddenly dropped 80% or so in...
@Jackal08 actually having sorted out the dataset issue, the best constant rebalanced portfolio returns are still smaller than the ones I get using an EG. Therefore I am reopening the...
When looking at the returns it will sometimes return over 100% while there is no where near that big increase in any of the assets its allowed to trade, how...
@Jackal08 for example, when I am looking at the returns and calculate the difference between each day of returns (I am training a daily model for the example) I can...
I tried changing the bottom line of code in LSTM_model.py to this ``` data = pdr.get_data_yahoo("AAPL", "2017-12-19", "2018-01-12") stock = data["Adj Close"] X_predict = np.array(stock).reshape((1, 10, 1)) / 200 #print(model.predict(X_predict)*200)...
@tombohub I never found a solution. The entire library was really bad in my opinion (especially since you cant use local data), so I just made my own manual backtest.
@boyac so its meant as the theoretical true price of an option vs what it is currently being sold for?
Also having timeout issues myself right now