﻿import pandas as pd
from pathlib import Path

# Look at last 5 rows of the CSV directly  
print("=== Last 5 rows of EURUSD_15M_2003_2026.csv ===")
path = Path(r"C:\Users\paul_\OneDrive\fx_macro_intraday\data\raw\prices\EURUSD\EURUSD_15M_2003_2026.csv")
df = pd.read_csv(path)
print(df.tail(5).to_string())
print()
print(f"File row count: {len(df):,}")
print(f"Column names (verbatim): {list(df.columns)}")
print()

# Look at a known event to determine tz: NFP first Friday 03 Jan 2025 14:30 ET = 19:30 UTC = 20:30 CET 
# If we look at 19:30 UTC and there is a vol spike there, file is UTC.  
# If spike is at 20:30 or 21:30, file is EET/EEST
print("=== Volatility around NFP 2025-01-03 ===")
df['datetime'] = pd.to_datetime(df['datetime'], format="%Y.%m.%d %H:%M:%S")
nfp_window = df[(df['datetime'] >= "2025-01-03 18:00:00") & 
                (df['datetime'] <= "2025-01-03 23:00:00")].copy()
nfp_window['range_pips'] = (nfp_window['high'] - nfp_window['low']) * 10000
print(nfp_window[['datetime', 'high', 'low', 'range_pips', 'volume']].to_string())
print()
print("NFP 03 Jan 2025 released at 13:30 ET = 18:30 UTC = 19:30 CET = 20:30 EET")
print("The bar with the highest range/volume tells us what TZ this file is in.")
