This Algo shows how to run a daily strategy in quantopian.com handle_data runs every minute, but we only want this strategy to buy/sell at daily intervals.
This Algo shows how to run a daily strategy in quantopian.com handle_data runs every minute, but we only want this strategy to buy/sell at daily intervals.
Carefully analyzing "Andy Brim USUInvests MVA Daily Strategy" I came to conclusion that it is just "Buy and Hold" with dividends reinvestment very similar to these 4 lines algo :
def initialize(context):
schedule_function(trade, date_rules.month_start(6), time_rules.market_open(hours = 1))
def trade(context, data):
order_target_percent(symbol('msft'),1.0)
From 2016-10-10 to 2017-10-09 with $1,000 initial capital
Total Returns
34.17%
Benchmark Returns
20.47%
Alpha
0.09
Beta
1.14
Sharpe
2.16
Sortino
3.59
Volatility
0.14
Max Drawdown
-5.33%
Thanks for the feedback!
You're close- it buy and holds as long as current price is above 5 day moving average. I'm surprised the returns are actually that close to buy/hold outright returns.