Skip to content

Instantly share code, notes, and snippets.

View ddrummond's full-sized avatar

DDrummond ddrummond

View GitHub Profile
@ddrummond
ddrummond / dl4jRNNStockTimeSeriesRegressionExample.txt
Last active June 27, 2022 22:29
DL4J Example of Time Series Regression with 2 Outputs:
/*
Problem Description:
Time series forecast for a single securities minor reversal points.
A "minor reversal point" is defined as either a period (day) with a high price greater than both the previous and next high prices, or a period with a low value lower than both the previous and next low prices.
This is a time series regression problem with 8 input features and 2 regression output dimensions
Input Features:
- period return r = (p2 - p1) / p1, descr: a linear return value, typically [-0.05,0.05]
- period volume, descr: standardized, z = (x - Mean) / SD
- High-Low spread, descr: standardized, z = (x - Mean) / SD