Live release feed
Sub-second macro releases for FX backtests
Point-in-time history
Official CPI, jobs, GDP, and central-bank events with point-in-time history.
USD 25/month 14-day free trial
Start Free Trial
Using FXMacroData with Prediction Markets: Kalshi and Polymarket article banner
Share headline card X LinkedIn Email
Download

Reference

Macro Education

예측 시장과 FXMacroData를 사용하여: 칼시 및 폴리마켓

단계별 안내 FXMacroData 매크로 발표, 합의 예측, 그리고 COT 위치 데이터를 작동하는 파이썬 코드와 함께 Kalshi 및 Polymarket 에 예측 시장 계약에 연결하는 방법.

다른 언어로도 제공 English
Share article X LinkedIn Email

매크로 데이터와 예측 시장이 일치하는 경우

예측 시장은 호기심에서 인프라로 바뀌었습니다. 칼시 미국 최초의 CFTC 규제 예측 거래소입니다. "will"와 같은 결과에 대한 계약을 거래할 수 있습니다. 미국 CPI exceed 3.5% in April?" or "Will the 연방준비제도 폴리마켓은 폴리곤 블록 체인에서 실행되며, 글로벌 오픈 액세스를 가진 매크로 이벤트에 대한 유사한 바이너리 결과 시장을 제공합니다. 두 플랫폼 모두 실시간으로 확률을 가격하고, 둘 다 이동하는 동일한 매크ሮ 데이터 릴리스에 민감합니다. USD/JPY EUR/USD그리고 FX 복합의 나머지 부분.

이미 FXMacroData를 사용하여 중앙은행 달력을 추적하고, CPI 놀라움을 모니터링하고, 정책금리 역사를 뽑는 경우, 이러한 시장에서 체계적인 우위를 구축하는 원료가 있습니다. 이 가이드는 점들을 연결하는 방법을 보여줍니다: FXMacrodata에서 구조화된 매크로 데이터를 뽑고, 예측 시장 계약을 열고, 파이썬에서 재생 가능한 의사 결정 워크플로를 구축하는 지도를 만듭니다.

목표
이 가이드의 끝으로 당신은 FXMacroData에서 다가오는 매크로 발표를 가져오는 파이썬 스크립트를 갖게 될 것입니다. 칼시와 폴리마켓에서 관련 예측 시장 계약과 일치하고, 당신의 위치를 알리는 데 도움이되는 역사적 놀라움 데이터에서 방향 신호를 계산합니다.

필수 조건

  • FXMacroData API 키 여기에 가입하세요 무료 체험용으로
  • 파이썬 3.10 이상 requests 설치된 (pip install requests) 의 내용입니다.
  • API 접속이 가능한 칼시 계정, 또는 수동적인 교차 참조를 위한 폴리마켓 지갑.
  • CPI에 대한 기본적인 친숙성, 농부 외의 임금그리고 정책금리 결정이 됩니다.

단계 1 다음 출시 달력을 뽑으십시오

첫 번째 필요한 것은 어떤 발표가 언제 올 것인지에 대한 명확한 그림입니다. FXMacroData의 출시 달력 엔드포인트는 예상 날짜와 발표 시간과 함께 화폐에 대한 모든 예정된 매크로 이벤트를 반환합니다.

import requests

API_KEY = "YOUR_API_KEY"
BASE = "https://fxmacrodata.com/api/v1"

def get_upcoming_releases(currency: str) -> list[dict]:
    url = f"{BASE}/calendar/{currency}?api_key={API_KEY}"
    resp = requests.get(url, timeout=10)
    resp.raise_for_status()
    return resp.json().get("data", [])

usd_calendar = get_upcoming_releases("usd")

for event in usd_calendar[:5]:
    print(event["indicator"], event.get("announcement_datetime"), event.get("next_release_date"))

각 항목에는 indicator (예를 들어, ) inflation non_farm_payrolls policy_rate), the scheduled announcement time as a Unix timestamp, and the next expected release date. This is your primary input for filtering open prediction market contracts — if a contract resolves on "CPI for March 2026" you need the exact announcement date to size your time horizon correctly.


단계 2 역사적인 발표 데이터를 가져와 놀라움 시리즈를 계산

Prediction markets price probability based on available information. If you can compute a recent-history surprise index for a given indicator — how often actual prints beat consensus, and by how much — you have a baseline for calibrating your position. Pull the last twelve months of actual vs. forecast data from the announcements endpoint:

def get_announcement_history(currency: str, indicator: str, limit: int = 24) -> list[dict]:
    url = f"{BASE}/announcements/{currency}/{indicator}?api_key={API_KEY}&limit={limit}"
    resp = requests.get(url, timeout=10)
    resp.raise_for_status()
    return resp.json().get("data", [])

def compute_surprise_series(records: list[dict]) -> list[dict]:
    surprises = []
    for r in records:
        actual = r.get("actual_value")
        consensus = r.get("predicted_value")
        if actual is not None and consensus is not None:
            surprises.append({
                "date": r["date"],
                "actual": actual,
                "consensus": consensus,
                "surprise": actual - consensus,
                "direction": "beat" if actual > consensus else "miss",
            })
    return surprises

cpi_history = get_announcement_history("usd", "inflation", limit=24)
cpi_surprises = compute_surprise_series(cpi_history)

beat_count = sum(1 for s in cpi_surprises if s["direction"] == "beat")
miss_count = len(cpi_surprises) - beat_count
print(f"CPI beat rate (last 24 releases): {beat_count}/{len(cpi_surprises)} = {beat_count/len(cpi_surprises):.0%}")

- predicted_value 각 발표 기록에 필드는 권위있는 소스에서 시장 합의 (미화 달러 지표에 대한 전문 예측자 필라델피아 FED 조사) 를 저장합니다. 이것은 예측 시장 가격을 고정시키는 동일한 합의 신호입니다. 따라서 당신의 놀라움 시리즈는 칼시 CPI 계약에 내장 된 암시 확률과 직접 비교 될 것입니다.


단계 3 예측 시장 계약에 대한 지도 지표

칼시와 폴리마켓 모두 특정 지표의 임계치를 중심으로 거시 계약을 구성합니다. FXMacroData 지표 슬러그를 알고 나면 지도화는 간단합니다. 아래는 가장 유동적인 계약에 대한 참조 표입니다.

예측 시장 계약의 종류 FXMacroData 지표 슬러그 통화 API 문서
CPI가 X%를 넘을까요? inflation 미국 달러 /api-data-docs/USD/인플레이션
코어 CPI가 X%를 넘을까요? core_inflation 미국 달러 /api-data-docs/usd/core_inflation 이고, 이산화탄소 배출량은
NFP는 X,000을 넘을까요? non_farm_payrolls 미국 달러 /api-data-docs/usd/non_farm_payrolls 이 아닌 농부들의 월급
FED가 FOMC를 감축/지속/상승할 것인가? policy_rate 미국 달러 /api-data-docs/usd/policy_rate 이고
GDP 성장률이 X%를 넘을까요? gdp_quarterly 미국 달러 /api-data-docs/usd/GDP_quarterly 이고
실업률이 X% 이하로 떨어질까요? unemployment 미국 달러 /api-data-docs/usd/고직률
ECB가 다음 회의에서 금리를 낮출까요? policy_rate EUR /api-data-docs/eur/policy_rate 이고

- 발매 일정은 이 모든 지표 스케줄을 하나의 시각으로 표시합니다. 칼시 계약이 결제 날짜를 나열하면 next_release_date FXMacroData 달력에서 동일한 기본 발표에 대한 결단을 확인합니다. 계약이 사전 추정치 대 최종 개정으로 해결되는 불일치는 잘못된 가격의 일반적인 원천입니다.


단계 4 합의 고정에 대한 예측 최종 지점을 검색

FXMacroData의 예측 엔드포인트는 공식 조사 데이터에서 나온 미래 지향적 합의 값을 제공합니다. 예측 시장 참여자가 자신의 전망을 고정시키기 위해 사용하는 동일한 설문 조사: 다음 CPI 발표에 대한 현재 합의점을 뽑아 공개 칼시 계약의 임계값과 비교하십시오.

def get_predictions(currency: str, indicator: str) -> list[dict]:
    url = f"{BASE}/predictions/{currency}/{indicator}?api_key={API_KEY}"
    resp = requests.get(url, timeout=10)
    resp.raise_for_status()
    return resp.json().get("data", [])

cpi_predictions = get_predictions("usd", "inflation")

# Most recent upcoming prediction
if cpi_predictions:
    next_pred = cpi_predictions[0]
    for p in next_pred.get("predictions", []):
        print(f"Source: {p['prediction_source_label']}")
        print(f"Consensus: {p['predicted_value']}%")
        print(f"For release date: {next_pred['date']}")

샘플 응답 형태:

{
  "currency": "USD",
  "indicator": "inflation",
  "count": 1,
  "prediction_count": 1,
  "data": [
    {
      "announcement_id": "usd_inflation_2026-05-14",
      "currency": "usd",
      "indicator": "inflation",
      "date": "2026-05-14",
      "announcement_datetime": 1747216200,
      "predictions": [
        {
          "predicted_value": 2.8,
          "prediction_type": "market_consensus",
          "prediction_source": "philly_fed_spf",
          "prediction_source_label": "Philadelphia Fed Survey of Professional Forecasters"
        }
      ]
    }
  ]
}

If a Kalshi contract asks "Will April CPI print above 2.9%?" and the SPF consensus is 2.8%, you now have a quantified starting point: the consensus says no with a 0.1 percentage point buffer. Your historical surprise series from Step 2 then tells you how often CPI has beaten consensus by more than 0.1 percentage point, giving you an empirical base rate to compare against the contract's implied probability.


단계 5 완전한 결정 신호를 구축

세 가지 입력값을 하나의 결정 함수로 집합합니다. 논리는 의도적으로 간단합니다. 목표는 재생 가능한 데이터 기반 신호이며 블랙박스가 아닙니다.

def prediction_market_signal(
    currency: str,
    indicator: str,
    contract_threshold: float,
    contract_direction: str,  # "above" or "below"
    lookback: int = 24,
) -> dict:
    """
    Returns a signal dict for a prediction market contract.

    contract_threshold: the numeric threshold in the contract question
                        (e.g. 2.9 for "Will CPI exceed 2.9%?")
    contract_direction: "above" means YES if actual > threshold
    """
    history = get_announcement_history(currency, indicator, limit=lookback)
    surprises = compute_surprise_series(history)
    predictions = get_predictions(currency, indicator)

    consensus = None
    release_date = None
    if predictions:
        latest_preds = predictions[0].get("predictions", [])
        if latest_preds:
            consensus = latest_preds[0]["predicted_value"]
            release_date = predictions[0]["date"]

    # Base rate: how often did actual exceed the threshold historically?
    actuals_above = sum(1 for r in history if r.get("actual_value") is not None
                        and r["actual_value"] > contract_threshold)
    base_rate = actuals_above / len(history) if history else None

    # Surprise bias: mean surprise (positive = beat)
    mean_surprise = (sum(s["surprise"] for s in surprises) / len(surprises)
                     if surprises else None)

    # Directional signal
    if consensus is not None:
        buffer = consensus - contract_threshold  # positive = consensus above threshold
        signal = "NO" if (contract_direction == "above" and buffer > 0) else "YES"
    else:
        signal = "NEUTRAL"

    return {
        "currency": currency.upper(),
        "indicator": indicator,
        "contract_threshold": contract_threshold,
        "contract_direction": contract_direction,
        "consensus": consensus,
        "release_date": release_date,
        "historical_base_rate_above_threshold": base_rate,
        "mean_surprise_last_n": mean_surprise,
        "lookback": lookback,
        "signal": signal,
    }


result = prediction_market_signal(
    currency="usd",
    indicator="inflation",
    contract_threshold=2.9,
    contract_direction="above",
    lookback=24,
)

import json
print(json.dumps(result, indent=2))

출력 예제:

{
  "currency": "USD",
  "indicator": "inflation",
  "contract_threshold": 2.9,
  "contract_direction": "above",
  "consensus": 2.8,
  "release_date": "2026-05-14",
  "historical_base_rate_above_threshold": 0.33,
  "mean_surprise_last_n": 0.04,
  "lookback": 24,
  "signal": "NO"
}

이 문서는: 합의율은 2.8% (2.9%의 임계 이하), 2.9% 이상의 CPI 인쇄에 대한 24번 출간의 역사적 기본률은 33%이며 평균 놀라움은 0.04ppt의 상승 편향이 있습니다. 원시 신호는 NO입니다. 그러나 기본률과 놀라움 편향의 조합은 이것이 높은 확신이있는 가늘지 않은 위치 크기를 적절히 조정하지 않는다는 것을 알려줍니다.


단계 6 USD 이외의 계약과 시장 간 계약에 적용

예측 시장은 점점 더 미국 달러 이외의 거시 이벤트에 대한 계약을 나열합니다. ECB 결정, 영국 CPI, 일본 은행 정책, 호주 고용. FXMacroData는 동일한 엔드포인트 구조를 통해 이 모든 것을 다루고 있으며 작업 흐름이 동일합니다.

# ECB rate decision signal
ecb_signal = prediction_market_signal(
    currency="eur",
    indicator="policy_rate",
    contract_threshold=3.15,   # "Will ECB rate fall below 3.15%?"
    contract_direction="below",
    lookback=12,
)

# UK inflation signal
uk_cpi_signal = prediction_market_signal(
    currency="gbp",
    indicator="inflation",
    contract_threshold=2.5,
    contract_direction="above",
    lookback=18,
)

# Australian employment signal
aus_employment_signal = prediction_market_signal(
    currency="aud",
    indicator="employment",
    contract_threshold=30.0,   # thousands, "Will employment add 30K+?"
    contract_direction="above",
    lookback=18,
)

- EUR/USD 그리고 GBP/USD 이 대시보드는 각 쌍의 정책금리 역사와 CPI 추세를 표면으로 표시하여 포지션을 수행하기 전에 시각적 맥락 검사를 제공합니다. 은행 has been cutting consistently over the last four meetings, a contract asking "Will the ECB cut in June?" has very different base-rate dynamics than one asking "Will the ECB hike?"


단계 7 확인 계층으로 COT 위치 모니터링

칼시와 폴리마켓 계약은 거시적 결과에 대한 거래가 고립되지 않습니다. COT 대시보드 CPI 인쇄에 큰 투기자들이 순장 또는 단장 달러가 있는지 보여줍니다. 스펙이 매우 순장 USD이고 CPI 신호가 NO (취약점 이하) 인 경우 잠재적인 이중 우편성이 있습니다. 예측 시장 계약은 사라질 가치가 있으며 FX 위치도 압축에 취약할 수 있습니다.

COT 데이터를 프로그램으로 가져와 신호 프레임워크에 포함시켜

def get_cot(currency: str) -> list[dict]:
    url = f"{BASE}/cot/{currency}?api_key={API_KEY}&limit=4"
    resp = requests.get(url, timeout=10)
    resp.raise_for_status()
    return resp.json().get("data", [])

usd_cot = get_cot("usd")
if usd_cot:
    latest = usd_cot[0]
    net_position = latest.get("net_position")
    print(f"USD spec net position (latest week): {net_position:+,.0f} contracts")

모든 것을 함께

전체 작업 흐름은 다음과 같습니다.

  1. 을 당겨 발매 일정은 앞으로 발표될 발표와 예정된 시간을 확인하기 위해서
  2. 경기 발표 날짜는 오픈 예측 시장 계약 칼시나 폴리마켓에서
  3. 가져와 예측 결과점 현재 합의값에 대한
  4. 계산해 역사적인 놀라움 시리즈 방향 편향과 기본 비율을 측정하기 위해서요.
  5. 생성 방향 신호 합의가 계약의 기준에 맞게 비교하는 것.
  6. 선택적으로 COT 위치 FX 선물에서 확인 신호로
  7. 계약에 명시된 확률과 empirical base rate 추정치 사이의 격차를 기준으로 여러분의 위치를 측정하세요.
결제 시점에 대한 중요한 참고
FXMacroData는 두 번째 레벨을 제공합니다. announcement_datetime timestamps for every release — critically important for prediction markets that resolve within seconds of the official print. Always verify that the contract's stated resolution source (e.g. "BLS CPI for March 2026, first release") matches exactly the FXMacroData indicator and revision flag you are querying. Advance estimates and final revisions are stored as separate data points.

시작해

이 가이드에서 사용되는 모든 최종 지점은 무료 평가판에서 사용할 수 있습니다. 신용 카드가 필요하지 않습니다. CPI, NFP, GDP, 실업, 코어 PCE 및 정책율을 포함한 USD 지표는 모두 무료 계층에서 액세스 할 수 있습니다.. USD 이외의 지표 및 COT 데이터는 프로페셔널 계획을 필요로합니다.

Blogroll

AI Answer-Ready

Key Facts

Page
FXmacrodata Prediction Markets Kalshi Polymarket
Section
Articles
Canonical URL
https://fxmacrodata.com/ko/articles/fxmacrodata-prediction-markets-kalshi-polymarket
Source
FXMacroData editorial and official publisher references
Last Updated
2026-06-15 11:36 UTC

Provenance And Trust

Cite the canonical URL and source field above. Where available, this page maps to official publisher releases and timestamped updates.

Quick Q&A

What is this page about? This page explains FXmacrodata Prediction Markets Kalshi Polymarket with directly usable context for trading, research, and API workflows.

What source should be cited? Use the canonical URL and the listed source field; cite official publisher references when available.

How fresh is this content? The last updated value above reflects the page metadata or latest available data timestamp.

Can this be used in AI assistants? Yes. This section is intentionally structured for retrieval and citation in chat assistants.

Prompt Packs

Use these in ChatGPT, Claude, Gemini, Mistral, Perplexity, or Grok for consistent source-aware outputs.