{
  "id": "mpf-parabolic-sar-extreme-point-acceleration-reversals-guide-20261116-v1",
  "frozen_at_utc": "2026-11-15T22:56:00.939366+00:00",
  "kind": "educational_indicator_guide",
  "instrument": "EURJPY HistData M1 Bid aggregated to H4",
  "source_evidence": "eurjpy-aroon-evidence.json",
  "source_sha256": "29858fbed84e573a6dbe348c8631bef451dfba6bb481ba49b09075c6a6de5973",
  "source_manifest": "eurjpy-aroon-source-manifest.json",
  "source_manifest_sha256": "9e88e3526802762c68887cc4ca2f05cd60c667fb9886177b4fa5c0773767cd37",
  "bar_seconds": 14400,
  "source_price_scale": 1000000,
  "source_fields": [
    "ts",
    "open",
    "high",
    "low",
    "close",
    "n",
    "first_ts",
    "last_ts",
    "source_open_int",
    "source_high_int",
    "source_low_int",
    "source_close_int"
  ],
  "parameters": {
    "af_start_num": 1,
    "af_start_den": 50,
    "af_step_num": 1,
    "af_step_den": 50,
    "af_max_num": 1,
    "af_max_den": 5
  },
  "variant": "Explicit TA-Lib-style high/low state order, exact rational arithmetic. Not a claim of bit-for-bit library/platform output.",
  "initialization": {
    "first": "First observed bar has no SAR/state output; first two observed highs/lows establish the seed at index1.",
    "direction": "downMove=L0-L1; upMove=H1-H0. Start down only if downMove>0 and downMove>upMove; otherwise start up, including ties.",
    "seed": "If up: incomingSAR=L0, EP=H1. If down: incomingSAR=H0, EP=L1. AF starts at1/50. Process index1 through the ordinary reversal test. Thus the initial preference can immediately reverse.",
    "first_clamp": "Only in first iteration, previous high/low for output and next-SAR clamps are H1/L1 again, not H0/L0; subsequent iterations use actual preceding observed bar."
  },
  "recurrence": {
    "entering": "At each processed bar carry direction_before, incoming_sar, ep_before, af_before. Incoming SAR was prepared at the preceding completed observed bar (except the explicit second-bar seed).",
    "reversal_test": "If prior direction up: current low<=incoming_sar reverses. If down: current high>=incoming_sar reverses. Equality reverses. Perform this test before ordinary new-EP processing; at most one reversal per observed bar.",
    "no_reversal": "Output SAR=incoming_sar and retain direction. On an up state, only current high>EP updates EP and AF=min(AF+1/50,1/5); on down only current low<EP does so. Equality to EP does not update AF. ep_updated=true only on that strict no-reversal extension.",
    "up_to_down": "Output SAR=max(ep_before,previous high,current high), set direction_after=down, EP=current low, AF=1/50. ep_updated=false and reversal=true; resetting EP is recorded separately by reversal, not as a continuation extension.",
    "down_to_up": "Output SAR=min(ep_before,previous low,current low), set direction_after=up, EP=current high, AF=1/50. ep_updated=false and reversal=true.",
    "projection": "After output/reversal/EP and AF updates, raw_next=SAR+AF*(EP-SAR). If direction_after up: next_sar=min(raw_next,previous low,current low); if down: next_sar=max(raw_next,previous high,current high). Set clamp_applied to exact next_sar!=raw_next. Carry next_sar as incoming SAR of the next observed bar.",
    "exact": "Original source integer prices divided by1000000 and Fraction arithmetic for every SAR projection, comparison and AF. AF may be represented by exact integer hundredths. Published JSON/CSV numbers are float representations, not comparison inputs.",
    "outputs": "No output for index0. For all other rows output incoming_sar,direction_before,sar,direction_after,ep_before,ep,af_before,af,reversal,ep_updated,raw_next,next_sar,clamp_applied; retain source price integers and coverage metadata."
  },
  "history_policy": "Single state replay from the first two observed source rows across all supplied history. Keep observed partial H4 candles and calendar gaps; no filling or weekend reset. Gaps are marked on plots and do not by themselves prove a supplier error. No strategy indicators from reused evidence are consumed.",
  "time_policy": "Provider source uses fixed EST without DST; add5hours for UTC as disclosed by pinned source. H4 anchors/scheduled ends and first/last source-minute interval labels are not exact tick or trade execution times.",
  "selection": {
    "start_utc": "2023-01-01T00:00:00Z",
    "start_ts": 1672531200,
    "order": [
      "up_reversal",
      "wick_reversal",
      "af_cap"
    ],
    "conditions": {
      "up_reversal": "direction_before=down and reversal=true, direction_after=up",
      "wick_reversal": "direction_before=up and reversal=true, current close>incoming_sar; high/low reversal with close remaining above the incoming test level",
      "af_cap": "reversal=false, ep_updated=true, af_before=1/5 and af=1/5; a new extreme at an already capped AF"
    },
    "eligibility": "Need25 preceding and5 following observed rows for31row chart. Previous andcurrent rows must be adjacent scheduled H4 anchors and full buckets: n=240,first_ts=ts,last_ts=ts+14340. Other earlier/later chart rows may be partial or separated by calendar gaps; metadata/markers remain visible.",
    "selection": "First eligible distinct source index per predicate in declared order; no fallback if none. Conditions depend only on completed current and prior data, never future outcomes.",
    "future_context": "Five later observed rows are required only for display availability; later prices, volume, quality and returns do not rank or choose cases.",
    "chart_previous": 25,
    "chart_following": 5,
    "reference_index": 25
  },
  "display": {
    "ohlc_decimals": 3,
    "sar_ep_decimals": 6,
    "af_decimals": 2,
    "candles": 31,
    "price_axis": "Candles, incoming SAR markers and plotted SAR dots share JPY per EUR axis containing all31 displayed values, fixed during selection. SAR dots are separate points and are not joined across reversals.",
    "af_axis": "Dimensionless 0..0.20 fixed axis, step path for post-bar AF.",
    "x_axis": "Even spacing by observed-row index; compress/mark calendar gaps. Outlined bodies identify incomplete source-minute buckets; do not fabricate absent rows."
  },
  "teaching": {
    "projection": {
      "direction_before": 1,
      "incoming_sar": 90,
      "ep_before": 110,
      "af_before_num": 1,
      "af_before_den": 50,
      "current_high": 112,
      "current_low": 95,
      "cases": [
        {
          "id": "free_projection",
          "previous_low": 91,
          "expected_af_num": 1,
          "expected_af_den": 25,
          "expected_raw_next": 90.88,
          "expected_next": 90.88,
          "clamped": false
        },
        {
          "id": "limited_projection",
          "previous_low": 90.2,
          "expected_af_num": 1,
          "expected_af_den": 25,
          "expected_raw_next": 90.88,
          "expected_next": 90.2,
          "clamped": true
        }
      ]
    },
    "touch": {
      "direction_before": 1,
      "incoming_sar": 95,
      "ep_before": 110,
      "af_before_num": 3,
      "af_before_den": 25,
      "previous_high": 109,
      "previous_low": 96,
      "current_high": 112,
      "current_close": 100,
      "cases": [
        {
          "id": "above_test",
          "current_low": 95.1,
          "expected_reversal": false,
          "expected_sar": 95,
          "expected_af_num": 7,
          "expected_af_den": 50
        },
        {
          "id": "equal_test",
          "current_low": 95,
          "expected_reversal": true,
          "expected_sar": 112,
          "expected_af_num": 1,
          "expected_af_den": 50
        },
        {
          "id": "below_test",
          "current_low": 94.9,
          "expected_reversal": true,
          "expected_sar": 112,
          "expected_af_num": 1,
          "expected_af_den": 50
        }
      ]
    },
    "units": "Constructed prices and SAR levels in JPY per EUR; AF is dimensionless. These are state-transition teaching fixtures, not historical candles or trades."
  },
  "research_disclosure": "Educational retrospective reused data; protocol frozen before any SAR candidate scan. No entries, exits, returns, execution or costs calculated. A displayed reversal dot is not an executable fill or a profit claim. Original ZIP archives are not downloaded again.",
  "performance_calculated": false,
  "sources": [
    "https://www.tradingview.com/support/solutions/43000502597-parabolic-sar-sar/",
    "https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_SAR.c",
    "https://www.histdata.com/f-a-q/data-files-detailed-specification/"
  ],
  "additional_context": [
    "https://ta-lib.org/functions/sar.html",
    "https://ta-lib.org/functions/stability.html"
  ]
}
