605faf5310
Add cluster audit pipeline, united EA updates, brochure generators, and publication hygiene (gitignore, MT5 path desensitization, pre-upload scan). Remove tracked reports, models, and binary artifacts from the repo. Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
440 B
Python
19 lines
440 B
Python
from __future__ import annotations
|
|
|
|
import pandas as pd
|
|
|
|
|
|
REQUIRED_COLUMNS = {"date", "asset", "close"}
|
|
|
|
|
|
def load_prices_csv(file) -> pd.DataFrame:
|
|
df = pd.read_csv(file)
|
|
missing = REQUIRED_COLUMNS - set(df.columns)
|
|
if missing:
|
|
raise ValueError(f"Missing required columns: {sorted(missing)}")
|
|
|
|
df["date"] = pd.to_datetime(df["date"])
|
|
df = df.sort_values(["date", "asset"]).reset_index(drop=True)
|
|
return df
|
|
|