Backtesting a mean-reversion strategy using the Johansen test. Python code included.
Why do you use a log here: portfolio_df['returns'] = np.log(portfolio_df['portfolio'] / portfolio_df['portfolio'].shift(1))
From what I see, portfolio_df['portfolio'] is essentially the dot product of (daily close & johansen eigenvector) right?
Isn't it backtest on train data period?
Why do you use a log here: portfolio_df['returns'] = np.log(portfolio_df['portfolio'] / portfolio_df['portfolio'].shift(1))
From what I see, portfolio_df['portfolio'] is essentially the dot product of (daily close & johansen eigenvector) right?
Isn't it backtest on train data period?