@leggomaeggo Ah, thank you. That's a big help. Not sure where I missed that mentioned in the documentation.
Best posts made by branhoff
Latest posts made by branhoff
Quick Start Data Referenced but Not sourced?
I've been trying to follow along in my own local enviornement with the quickstart guide.
One thing that's tripping me up is in the section on adding a data feed.
In the code we have something like:
def example_3(): """adding a data feed""" cerebro = bt.Cerebro() modpath = os.path.dirname(os.path.abspath(sys.argv)) datapath = os.path.join(modpath, 'datas', 'orcl-1995-2014.txt') data = bt.feeds.YahooFinanceCSVData( dataname=datapath, fromdate=datetime.datetime(2000, 1, 1), todate=datetime.datetime(2000, 12, 31), reverse=False ) cerebro.adddata(data) cerebro.broker.setcash(100000.0) print('Starting Portfolio Value: %.2f' % cerebro.broker.getvalue()) cerebro.run() print('Final Portfolio Value: %.2f' % cerebro.broker.getvalue())
Where is this
coming from? Is it expecting us to download some data from Yahoo Finance or something?
VWAP vs. SMAP Analysis: Chronological Bias Error
I've been working on a little personal research project. I actually started it with a friend a couple years ago when I first started learning python, but didn't but it kind of dropped off as life got in the way.
I've been picking it back up and refreshing recently and wondering if anyone here has any experience backtesting stock data?
I've been trying to analyze whether Volume Weighted Average Price is a better predictor of future stock prices than a Simple Moving Average.
I'm realizing however, that the very simplistic back tested strategy I put together for both VWAP and SMAP have unnaturally better returns than a simple buy and hold. This leads me to believe that I'm accidentally bringing chronological bias into my model. Can anybody advise?