HARN: Hierarchical Associative Resonance Network for Event-Driven Multi-Timeframe Forecasting
Organizations: Dr. APJ Abdul Kalam Technical University
Abstract
Financial time series evolve across multiple temporal resolutions, challenging forecasting systems to incorporate newly available information without repeatedly recomputing unchanged representations. We introduce HARN, a Hierarchical Associative Resonance Network for event-driven multi-timeframe forecasting. HARN maintains persistent representations across temporal levels and updates each level only when its corresponding completed bar becomes available. The architecture combines causal multi-scale temporal encoding, gated associative memory, cross-level resonance, and hierarchical evidence aggregation, with forecasting performed in basis-point space and reconstructed to the original price scale. We evaluate HARN on four assets spanning equity, foreign exchange, and commodity markets using multiple random seeds and component ablations. HARN achieves competitive reconstructed-price forecasting errors against single-timeframe PatchTST and TimeXer baselines, while ablations reveal the effects of removing individual components across assets and timeframes. A code-level audit further examines consistency between the implementation and the defined event-driven causal protocol. The results position HARN as a persistent multi-timeframe forecasting framework rather than evidence of universal predictive superiority.
Figures & tables
| Asset | Split | Hierarchy | Anchor | Observations | Period | Span (days) | Mean update |
|---|---|---|---|---|---|---|---|
| AAPL | Train | M15,H1 | M15 | 43,331 | 2017-02-07 2023-09-27 | 2,423.1 | 0.616 |
| AAPL | Val | M15,H1 | M15 | 9,285 | 2023-09-27 2025-03-06 | 525.8 | 0.615 |
| AAPL | Test | M15,H1 | M15 | 9,286 | 2025-03-06 2026-08-10 | 522.2 | 0.615 |
| EURUSD | Train | M15,H1,H4 | M15 | 69,967 | 2022-07-26 2025-05-15 | 1,024.2 | 0.438 |
| EURUSD | Val | M15,H1,H4 | M15 | 14,992 | 2025-05-15 2025-12-19 | 218.2 | 0.438 |
| EURUSD | Test | M15,H1,H4 | M15 | 14,994 | 2025-12-19 2026-07-29 | 221.8 | 0.437 |
| Dimension | HARN | PatchTST | TimeXer |
|---|---|---|---|
| Scope | Multi-timeframe, event-driven | Single-timeframe, anchor-only | Single-timeframe, anchor-only |
| Input | 5 OHLCV, all payload levels | 5 OHLCV, anchor only | 5 OHLCV, anchor only |
| Lookback / horizon | 32 per level / 1 | 32 / 1 | 32 / 1 |
| Training target | Stationary BPS delta | Normalized absolute-close target | Normalized absolute-close target |
| Batch/protocol | 256 (reported recipe); stateful contiguous streams | 256 shuffled; stateless | 256 shuffled; stateless |
| Schedule; patience | Cosine; 15 | Constant; 5 | Constant; 5 |
| Reported item | Associated configuration | Determined / not determined |
|---|---|---|
| Dataset table ( Table 1 ) | Supplied dataset table; dataset_config is available in the repository. | Values are transcribed. Raw vendor data cannot be redistributed, but the dataset can be regenerated from a compatible vendor feed with the vendor-neutral preprocessing pipeline. |
| HARN rows, Panels A and B (mean SD over three seeds) | Supplied recipe: batch size 256, 50 epochs, AdamW ( , ), clipping 1.0, cosine schedule, patience 15, CUDA AMP if available; seeds 42, 151, 359. | The recipe coincides with the production defaults except for the seed list ( Table 8 ). Seed-specific checkpoints and per-seed aggregate metric CSVs are available, and per-event predictions can be generated from them with the preprocessing pipeline. The standalone evaluator uses one stream, whereas the recipe describes eight; the stream count behind the metrics should be read from the available configuration and checkpoint metadata. Whether Panels A and B came from the same checkpoints is documented in repository metadata where available and is otherwise unresolved. |
| PatchTST and TimeXer rows, Panel A | Baseline configuration of Table 2 : single-timeframe, anchor-only, dimensions and patching as in Section 6 , batch 256 shuffled, constant learning rate, patience 5, no AMP. | Per-seed aggregate metrics are available in the repository, and per-event predictions can be generated from the available pipeline and checkpoints. In Panel A, HARN and the baselines are reported at the anchor timeframe of each asset (M15 for AAPL, EURUSD, and USDCHF; M5 for XAUUSD). |
| Ablation variants A0–A3 ( Table 5 ) | Ablation trainer defaults: batch 256, five epochs, seed 42, cosine schedule, patience 15, with configuration and seed retained in its checkpoint format. | The supplied evidence does not establish that these defaults were used for the table or identify repeated runs. A0 is full HARN within the ablation pipeline, but its values differ from the main HARN means and are not verified replicates; the reason is undetermined ( Section 8 ). |
| Figures 6 and 7 | Supplied evaluation visualizations. | The captions do not identify asset, timeframe, seed, checkpoint, or split; the underlying predictions can be regenerated from the available checkpoints and preprocessing pipeline. |
| Audit table ( Table 6 ) | Static inspection of the source code. | Not an experiment ( Section 9 ). |
| Panel/asset | Model/TF | MAE | RMSE | sMAPE | MASE |
|---|---|---|---|---|---|
| Panel A: HARN (multi-timeframe) versus single-timeframe anchor-only baselines (descriptive) | |||||
| AAPL | HARN/M15 | 0.507696 0.000509 | 0.933489 0.000420 | 0.204947 0.000209 | 1.327584 0.001331 |
| PatchTST/M15 | 2.074401 0.575730 | 2.702157 0.559581 | 0.794647 0.219045 | 5.424392 1.505489 | |
| TimeXer/M15 | 2.881886 0.811630 | 3.613453 0.848218 | 1.115299 0.292503 | 7.535901 2.122348 | |
| EURUSD | HARN/M15 | 0.000306 0.000002 | 0.000467 0.000002 | 0.026311 0.000188 | 0.865688 0.006210 |
| PatchTST/M15 | 0.000759 0.000275 | 0.000967 0.000305 | 0.065011 0.023455 | 2.144210 0.777650 | |
| Asset | TF | Variant | MAE | RMSE | sMAPE | MASE |
|---|---|---|---|---|---|---|
| AAPL | H1 | A0 | 1.055134 | 1.801484 | 0.424678 | 4.799395 |
| AAPL | H1 | A1 | 1.056989 | 1.798886 | 0.425441 | 4.807829 |
| AAPL | H1 | A2 | 1.060339 | 1.803577 | 0.426672 | 4.823069 |
| AAPL | H1 | A3 | 1.058882 | 1.796596 | 0.426056 | 4.816440 |
| AAPL | M15 | A0 | 0.506070 | 0.932352 | 0.204299 | 1.326365 |
| AAPL | M15 | A1 | 0.507230 | 0.933322 | 0.204760 | 1.323333 |
| # | Dimension | Mechanism observed in the code | Finding |
|---|---|---|---|
| 1 | Splitting | Chronological 70/15/15 train–validation–test slices | Consistent |
| 2 | Alignment | Latest completed timestamp no later than the anchor; exact timestamp equality determines an update | Consistent |
| 3 | Windows/ targets | Window ends at the selected completed bar; target is the next completed bar | Consistent |
| 4 | Statistics | Training-only feature and target statistics are reused during evaluation | Consistent |
| 5 | Local causality | Left-only padding and shifted previous-close features avoid dependence on future observations | Consistent |
| 6 | Resonance | Only states available at the same event are mixed | Consistent |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Shape |
|---|---|
| Raw window | |
| Derived features | |
| Encoder output ( Eq. 12 ) | |
| Update mask ( Eq. 3 ) | |
| Memory input (base / higher level) | / |
| Memory |
| Setting | Production | Main results | Ablations |
|---|---|---|---|
| Batch size | 256 | 256 | 256 |
| Max epochs | 50 | 50 | 5 |
| Evaluation streams | 8 | 8 | 8 |
| Optimizer | AdamW | AdamW | AdamW |
| Learning rate | |||
| Weight decay |
| Asset | TF | Seed | MAE | RMSE | sMAPE | MASE |
|---|---|---|---|---|---|---|
| AAPL | H1 | 42 | ||||
| 151 | ||||||
| 359 | ||||||
| M15 | 42 | |||||
| 151 | ||||||
| 359 |
| Asset | Model | TF | Seed | MAE | RMSE | sMAPE | MASE |
|---|---|---|---|---|---|---|---|
| AAPL | PatchTST | M15 | 42 | ||||
| 151 | |||||||
| 359 | |||||||
| TimeXer | M15 | 42 | |||||
| 151 | |||||||
| 359 |