Usually CrossEntropyLoss is used for classification problems, but your code seems to be predicting the value of the next day price difference. This would call for MSELoss (or maybe SmoothL1Loss which is less sensitive to outliers) rather than CrossEntropyLoss.
The other problem is that there seems to be a mismatch between the sizes of the predicted values and the target values.
predict has size (236, 1, 1) which gets reshaped to (236, 1)
y has size (1)
You seem to be taking all but the last of the training values as X, and saving the last value as y. So your model receives as input a sequence of 236 values, and produces 1 prediction for every timestep. Yet your loss tries to calculate the error between these 236 predicted values and the single value kept aside as y - therein lies the problem.
The solution might be as simple as doing…
y = Variable(torch.from_numpy(train[1,:]))

instead of
y = Variable(torch.from_numpy(train[-1,:]))

In other words I think that the training inputs should be the first, second, third, fourth, etc. values of the series, and the training targets should be the second, third, fourth, fifth, etc. values of the series.