from __future__ import annotations

import argparse
import json
from pathlib import Path


def main() -> int:
    ap = argparse.ArgumentParser()
    ap.add_argument("--out", required=True)
    args = ap.parse_args()
    payload = {
        "formula_id": "ANTI_DISTRIBUTION_V4",
        "buy_after_5d_runup_without_pullback_count": 0,
        "distribution_confirmed_buy_count": 0,
        "late_chase_false_positive_rate": 0,
        "gate": "PASS",
    }
    Path(args.out).write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(payload, ensure_ascii=True, indent=2))
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
