fynance.neural_networks.RollNeuralNet.run

RollNeuralNet.run(y, X, NN, plot_loss=True, plot_perf=True, x_axis=None)

Train rolling neural networks along time axis.

Display loss and performance if specified.

Parameters:
y : np.ndarray[np.float32, ndim=2], with shape (T, 1)

Time series of target to estimate or predict.

X : np.ndarray[np.float32, ndim=2], with shape (T, N)

Several time series of features.

NN : keras.Model or list of keras.Model

Neural networks to train and predict.

plot_loss : bool, optional

If true dynamic plot of loss function.

plot_perf : bool, optional

If true dynamic plot of strategy performance.

x_axis : list or array, optional

x-axis to plot (e.g. list of dates).

Returns:
rnn : RollNeuralNet