In bolack in[13], ax1.plot(market_info[market_info['Date']>= split_date]['Date'].astype(datetime.datetime), market_info[(market_info['Date']+ datetime.timedelta(days=1))>= split_date]['bt_Close'].values[1:] * (1+bt_random_steps), label='Predicted')
Why choose to use values[1:] here? shouldn't it be values[:-1]?
use values[1:] then no meaning to get data 1 day before split_date by (market_info['Date']+ datetime.timedelta(days=1))>= split_date, [1:] will skip the first day, start apply random walk on actual_data(t), not actual_date(t-1).
In bolack in[13],
ax1.plot(market_info[market_info['Date']>= split_date]['Date'].astype(datetime.datetime), market_info[(market_info['Date']+ datetime.timedelta(days=1))>= split_date]['bt_Close'].values[1:] * (1+bt_random_steps), label='Predicted')Why choose to use
values[1:]here? shouldn't it bevalues[:-1]?use
values[1:]then no meaning to get data 1 day before split_date by(market_info['Date']+ datetime.timedelta(days=1))>= split_date,[1:]will skip the first day, start apply random walk on actual_data(t), not actual_date(t-1).