Hi,
For this line of code at the end, i am getting below error. Using python 3.9, pandas version 2.2.0, please help.
import matplotlib.pyplot as plt
%matplotlib inline
Multiply the future percentage returns with the signals generated to calculate the strategy’s performance
strategy_perf1=pd.Series(strategy_perf*data_sim.close.pct_change().shift(-1).iloc[-simulation_length:].values)
plt.plot(np.nancumprod(strategy_perf1+1))
ValueError: operands could not be broadcast together with shapes (67,) (252,)
Course Name: Decision Trees in Trading, Section No: 10, Unit No: 12, Unit type: Notebook