Saved other stock data into GOOG.CSV file. However results are showing for Previously saved GOOG data #581
Replies: 1 comment
-
I have saved reliance data in GOOG.csv in the test folder. !pip install backtesting tickers = pd.read_html('https://ournifty.com/stock-list-in-nse-fo-futures-and-options.html#:~:text=NSE%20F%26O%20Stock%20List%3A%20%20%20%20SL,%20%201000%20%2052%20more%20rows%20')[0] for count in range(len(tickers)): def MovingAverageCrossStrategy(stock_symbol = 'ULTRACEMCO.NS', start_date = '2010-01-01', short_window = 20, long_window = 50): for symbol in tickers:try:data = MovingAverageCrossStrategy("RELIANCE.NS", '2000-01-01', short_window = 10, long_window = 20) from backtesting import Backtest, Strategy from backtesting.test import SMA, GOOG class SmaCross(Strategy):
bt = Backtest(GOOG, SmaCross, output = bt.run() |
Beta Was this translation helpful? Give feedback.
-
Is there any bug in the code? I want to back test for 100 stocks but, for every data I am getting the same results which was displayed in the website. Please help me to resolve this
Beta Was this translation helpful? Give feedback.
All reactions