import json
import sys

def analyze():
    # We need to find the data. Let's look at the dates actually present in M15
    try:
        with open("/home/aryy/.hermes/profiles/finance/backtests/xauusd_2026/hybrid/data/ohlcv_M15.json") as f:
            data = json.load(f)
            
            # Check 2026-02-13 17:15:00
            res1 = [d for d in data if "2026-02-13" in d["timestamp"]]
            print(f"Items on 2026-02-13: {len(res1)}")
            for d in res1[-20:]: # look at the end of the day
                print(d)

            # Check 2026-02-16 00:00:00
            res2 = [d for d in data if "2026-02-16" in d["timestamp"]]
            print(f"\nItems on 2026-02-16: {len(res2)}")
            for d in res2[:20]: # look at start of day
                print(d)
                
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    analyze()
