VMIN paid out a large dividend recently and correspondingly lowered the NAV value. This creates an issue when running a backtest because the account appears to have a large drawdown when it really doesn't. Likewise, the dividends seem to show up magically but in the backtest I don't see a way to see what they were (the cash balance simply increases).
It seems for the purposes of calculating account value and correspondingly drawdown, pending dividends should be factored in. In the backtest given, VMIN absolutely killed, but the drawdown appears much higher than it really was. Likewise, it would be nice to see when dividends show up in the account.
|Returns||1 Month||3 Month||6 Month||12 Month|
|Alpha||1 Month||3 Month||6 Month||12 Month|
|Beta||1 Month||3 Month||6 Month||12 Month|
|Sharpe||1 Month||3 Month||6 Month||12 Month|
|Sortino||1 Month||3 Month||6 Month||12 Month|
|Volatility||1 Month||3 Month||6 Month||12 Month|
|Max Drawdown||1 Month||3 Month||6 Month||12 Month|
""" This is a template algorithm on Quantopian for you to adapt and fill in. """ from quantopian.algorithm import attach_pipeline, pipeline_output from quantopian.pipeline import Pipeline from quantopian.pipeline.data.builtin import USEquityPricing from quantopian.pipeline.factors import AverageDollarVolume from quantopian.pipeline.filters.morningstar import Q1500US def initialize(context): """ Called once at the start of the algorithm. """ context.vmin = sid(49928) # Rebalance every day, 1 hour after market open. schedule_function(my_rebalance, date_rules.every_day(), time_rules.market_open(hours=1)) def my_rebalance(context,data): """ Execute orders according to our schedule_function() timing. """ order_target_percent(context.vmin, 1.0) def my_record_vars(context, data): """ Plot variables at the end of each day. """ pass