ax.plot(NG_price.index, np.log(Aluminium_price.Close.values/lead_price.Close.values), label='Spread')
TypeError: unsupported operand type(s) for /: 'float' and 'str'
ax.plot(NG_price.index, np.log(Aluminium_price.Close.values/lead_price.Close.values), label='Spread')
TypeError: unsupported operand type(s) for /: 'float' and 'str'
Hello Shanmugam,
I wasn't able to reproduce the error at the Quantra portal. If you're running this on your local system make sure that the columns Aluminium_price and lead_price both have numeric types like float or integer. To check the data type of a column you can use the template:
dataframe_name.column_name.dtype