← Issues一覧 完了 forex

001: 時間帯(セッション)特徴量の分析と強化

ステータス: active(バックテスト検証中)

概要

USD/JPYは東京・ロンドン・NYセッションで明確に異なる市場特性を持つ。 カテゴリカルなセッションフラグの代わりに、連続値のセッション派生特徴量を追加。

現状分析結果(過去90日・H足1472本)

セッション 平均値幅 最大値幅 陽線率
東京 (09-18 JST) 24.4 pips 195.1 pips 54.4%
ロンドン (16-01 JST) 26.1 pips 195.1 pips 49.7%
NY (22-07 JST) 22.7 pips 183.2 pips 51.1%
L-NY重複 (22-01 JST) 31.8 pips - 45.2%

最もボラが高い時間帯: 22時JST(32.5pips), 0時JST(32.5pips)

実施内容

Phase 1: セッション統計分析 — done

Phase 2: 特徴量エンジニアリング — done

Phase 3: 検証 — done

バックテスト結果(セッション特徴量追加後)

H足 (n=40) | 期間 | Close MAE | Dir Acc | 変化 | |------|-----------|---------|------| | +1h | 0.0723% | 52.5% | ±0 | | +4h | 0.1481% | 50.0% | +2.5% | | +12h | 0.2419% | 65.0% | ±0 |

30M足 (n=67) | 期間 | Close MAE | Dir Acc | 変化 | |------|-----------|---------|------| | +1 bars | 0.0536% | 41.8% | +1.5% | | +2 bars | 0.0718% | 50.7% | ±0 | | +6 bars | 0.1089% | 55.2% | -6.0% |

サンプル数が少なく統計的な誤差範囲。Optuna最適化で重み調整後に効果拡大の見込み。

ベースライン(セッション特徴量なし)

H足

期間 Close MAE Dir Acc
+1h 0.0707% 52.5%
+4h 0.1567% 47.5%
+12h 0.2404% 65.0%

30M足

期間 Close MAE Dir Acc
+1 bars 0.0456% 40.3%
+2 bars 0.0645% 50.7%
+6 bars 0.1092% 61.2%

変更ファイル

ファイル 変更内容
forex/management/commands/_predict_fx/feature_engineering.py _add_session_derived_features() 追加
forex/views.py fx_index, _compute_session_stats 追加
templates/forex/index.html FXトップページ(ガイド+統計)
forex/urls.py /forex/ パス追加
templates/forex/base.html ナビにFXガイドリンク追加
templates/includes/_nav_dropdowns.html FXドロップダウンにガイド追加