Thanks for that. But still ... where is the time input variable? I only see the R variables:I wrote the genetic programming part with C++ and opencl. The calculations for the function are done in opencl with single-precision floating point arithmetic. The controlling part is perl and shell (bash). The images are from gnuplot.
The only input to the function is time in the form of number of bars relative to the start of the data (0 through 88 calendar days for the example's data that was fitted). This allows the function to be applied for any time.
The attached inputData.csv has the input data with comma-separated format
<TICKER>,<DTYYYYMMDD>,<TIME>,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOLUME>,<UNADJCLOSE>,<UNADJVOLUME>
Calendar days in the data when U.S. stock markets were closed are linearly-interpolated from the previous trading close price.
The candlestick chart has the <OPEN>,<HIGH>,<LOW>,<CLOSE> columns.
The function is fitted on the <CLOSE> column only.
The fitted data and parabolic, least squares trend of the fitted data past the candlesticks is the predicted data (12 bars).
The raw, fitted data including the extra 12 predicted bars is in the attached fitted.txt. This data looks like it has more precision than the actual data because perl converts the single-precision floating point to double-precision.
The actual future data is in the attached unseendata.csv. Since this is recent data for an ETF, there isn't too much of it. This data wasn't used in any calculations or measurements.
y =
0: R4 = R2 * cos (-81.5485)
1: R0 = 50.7399 - R4
2: R4 = R4 * cos (0.199104)
3: R3 = sqrt (R4)
4: R4 = 41.8048 * cos (R3)
5: R4 = 4.3255 / R4
6: R4 = atan2 (R4 / R0)
7: R0 = R0 * cos (87.6408)
8: R0 = R4 + R0
9: R4 = R4 * sin (-4.13973)
10: R0 = R4 + R0
11: R2 = -44.0889 * sinh (R0)
12: R4 = abs (R0)
13: R3 = log (R4)
14: R4 = atan2 (R2 / 70.0589)
15: R0 = R4 + R0
16: R2 = asinh (R0)
17: R1 = 13.707 * sin (R3)
18: R1 = R1 * sin (-37.162)
19: R4 = 1.39025 * sin (R4)
20: R1 = R1 * cos (68.1254)
21: R3 = tanh (R1 * R3 + R4)
22: R2 = R2 - R3
23: R4 = asin (R1)
24: R1 = sigmoid (-12.9007 * R1 + R4)
25: R1 = R1 * cosh (R3)
26: R2 = R1 + R2
27: R2 = R2 * sin (1.16991)
28: R2 = R2 * sin (-79.8879)
29: R0 = 62.65 - R2
return R0
This formula, as it sits, will only output a single 'y' value. It offers no way to vary 'y' based on 't,' or based on any other variable. ??!!
If 't' is 1, where is the '1' represented in this formula?
If 't' is 2, where would the '2' be represented in this formula?
).