This gives me daily closing prices:
def initialize(context):
pass
def handle_data(context, data):
record(Daily_Close =data[sid(24)].close_price)
in a daily backtest. But I want to run a backtest minutely so I can trade at the end of the next minute rather than the end of the next day. And I want to use, say, a 50-Day Moving Average in the algo. What is the best way to use daily indicators in a minutely algo?
In the attached backtest I have stored the daily closing prices in a queue. I want to be able to calculate Moving Average but I don't think a queue is compatible with TA-Lib. And how would I get a VWAP from my daily close data if I needed it?
(The two record statements in the attached backtest produce the same graph in a minutely backtest as the code snippet above does in a daily backtest when run over the same date range.)
P.