Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created May 3, 2026 20:43
Show Gist options
  • Select an option

  • Save quantra-go-algo/57372d5dc1a00487d4cd424dd4b35c03 to your computer and use it in GitHub Desktop.

Select an option

Save quantra-go-algo/57372d5dc1a00487d4cd424dd4b35c03 to your computer and use it in GitHub Desktop.
DEEPSEEK_API_KEY = "PASTE_YOUR_DEEPSEEK_KEY_HERE"
DEEPSEEK_BASE_URL = "https://api.deepseek.com"
DEEPSEEK_MODEL = "deepseek-chat"
# --- Market / data ---
SYMBOL = "EURUSD=X"
START = "2006-01-01"
END = "2026-04-11"
OOS_START = "2023-01-01" # we show equity curves from this date onward
# --- Features / regime labeling ---
LOOKBACK_DAYS = 20 # window used to summarize a regime
LABEL_STEP_DAYS = 5 # label every N days (reduces LLM calls)
REGIME_SET = ["TREND_UP", "TREND_DOWN", "RANGE", "HIGH_VOL", "LOW_VOL", "UNCERTAIN"]
LLM_CACHE_FILE = "regime_cache_deepseek.json"
LLM_RATE_LIMIT_S = 0.25
LLM_TIMEOUT_S = 30
# --- Strategy / costs ---
COST_BPS = 1.0
MAX_LEVERAGE = 1.0
# --- Walk-forward optimization ---
TRAIN_YEARS = 3 # optimize each month using the last N years of data
# Parameter grid (small + readable)
Z_THRESH_GRID = [0.8, 1.0, 1.2] # range entry threshold
RANGE_SIZE_GRID = [0.5, 0.75, 1.0] # position size in RANGE
LOWVOL_SIZE_GRID = [0.25, 0.5, 0.75] # position size in LOW_VOL
HIGHVOL_SIZE_GRID = [0.0] # keep 0.0 for simplicity (flat in HIGH_VOL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment