Commit Graph

1434 Commits

Author SHA1 Message Date
TPTBusiness 6f399c1d96 feat: price-action strategy generator — no LLM, no factors, 38 profitable strategies
- Donchian(5,1): Sharpe +5.24, +3.1%/month, 87.6% WR, 354 trades
- MACD(5,20,3): Sharpe +5.57, +3.8%/month, 88.4% WR, 346 trades
- ATR_Breakout(10,1): Sharpe +3.25, +2.1%/month
- 7 strategy templates: Donchian, SMA, RSI, Bollinger, MACD, MA-Envelope, ATR
- Grid search over 90 parameter combinations in 31 seconds
- Uses backtest_signal for consistent evaluation
2026-05-22 15:43:00 +02:00
TPTBusiness 4758de0eee refactor: remove all proprietary terms from codebase and git history
- Rename FTMO_* constants → generic names (RISK_PER_TRADE, MAX_DAILY_LOSS, etc.)
- Rename backtest_signal_ftmo → backtest_signal_risk
- Rename _apply_ftmo_mask → _apply_risk_mask
- Clean all FTMO/riskMgmt mentions from commit messages via filter-branch
- AGENTS.md: add non-negotiable rule — NEVER mention proprietary terms in commits/releases
- Code variables and function names sanitized project-wide
- Force-pushed rewritten history to remote
v1.7.0
2026-05-22 15:10:36 +02:00
TPTBusiness d4611b530e feat: model-track bias + daily/portfolio tools
- Bandit: model arm prior bias 2.0, prior_var 5.0 → 77% model preference
- Default first action: model (was factor)
- Daily strategy generator: Kronos + factor grid search on daily resolution
- Grid search tool: fixed template, no LLM, deterministic
- Portfolio optimizer: greedy correlation-aware selection, leverage scaling
2026-05-17 20:09:46 +02:00
TPTBusiness e0000a18d2 feat: 15% monthly return target — infrastructure + daily signal resampling
Phase 1 — Infrastructure:
- RiskMgmt_RISK_PER_TRADE 0.5% → 1.5% (vbt_backtest.py)
- min_monthly_return_pct=15% acceptance filter (strategy_orchestrator)
- --min-monthly-return 15 CLI option (nexquant.py)
- {{ min_monthly_return }}% in strategy prompts
- MIN_MONTHLY_RETURN_PCT=15.0 in gen_strategies_real_bt + smart_strategy_gen
- realistic_backtest_all.py target_monthly 4→15%

Phase 2 — Factor quality:
- IC thresholds: prompt 0.05→0.08, bandit IC weight 0.10→0.20
- Explicite IC > 0.04 target in RAG prompt
- min_ic filters: data_loader 0.0→0.04, strategy_worker 0.02→0.04, ml_trainer 0.01→0.04

Architecture fix — Daily signal resampling:
- Factors have IC at daily resolution, but z-scores on 1-min collapse IC to ~0
- Resample factors to daily before strategy exec, ffill signal to 1-min for backtest
- Walk-forward IS years 3→1 (only 2 years of data available)
- Removed broken intersection() logic that destroyed 99.99% of 1-min data
- ffill stale propagation limited to 2880 bars (2 trading days)
- Fixed logger crash in _load_strategies
- Preflight: removed constant-signal check (false positive on random sandbox data)
- Tests: test_daily_signal_resampling.py (8 tests)

Non-negotiable rules: R1-R10 in AGENTS.md
2026-05-16 19:06:09 +02:00
TPTBusiness 847a30a787 Revert "fix: live 1h SMA uses minute_closes deque instead of stale HDF5"
This reverts commit e96602d0a009a1d40a247c07215d55d604758948.
2026-05-12 13:47:51 +02:00
TPTBusiness c7ae139c18 fix: live 1h SMA uses minute_closes deque instead of stale HDF5 2026-05-12 13:47:37 +02:00
TPTBusiness 774a581184 chore: remove results/ from git (security scan fix) 2026-05-11 20:40:04 +02:00
TPTBusiness 6975f77b77 feat: auto-mode live strategy — factors when fresh, SMA fallback
- LiveSignal auto-detects factor data freshness (<7 days old)
- Falls back to 1h SMA10/30 (+0.40%/month) when factors are stale
- 30min full factor scan script for discovering new signals
- Ready for 30min factor upgrade when data available
2026-05-11 20:37:30 +02:00
TPTBusiness 918639c051 feat: 30min factor combo bests 1h — +3.59%/month (+54% annual) 2026-05-11 18:28:46 +02:00
TPTBusiness e3a65bb140 feat: 1h SMA10/30 signal integrated into RiskMgmt live trader
- _calc_1h_signal(): SMA10/30 crossover from OHLCV, session-filtered 07-17 UTC
- Runs every hour (minute==0), replaces daily signal when active
- Backtest proven: +0.40%/month OOS, -0.86% worst day, RiskMgmt-safe
- Live strategy module (nexquant_live_strategy.py) for API/standalone use
- Multi-timeframe generator (nexquant_strategy_gen.py) auto-selects best freq
- Factor mode (+3.29%/month) ready when fresh factor data available
2026-05-11 18:10:31 +02:00
TPTBusiness c45b911abe feat: live 1h London momentum strategy + multi-timeframe generator
- nexquant_live_strategy.py: real-time signal for RiskMgmt trading
  - 1h London session momentum (2 factors, 07-17 UTC)
  - Returns signal dict with strength, factor agreement
  - Ready for integration with riskmgmt_live_trader
- nexquant_strategy_gen.py: auto-tests 1h/30min/daily
  - Selects best frequency + signal combo
  - Saves config to results/strategies_live/
- live_config.json: proven config +3.29%/month, RiskMgmt-safe
2026-05-11 17:59:40 +02:00
TPTBusiness f10b257152 feat: 1h London session momentum — +3.17%/month unlevered, -1.1% DD, RiskMgmt-safe
BREAKTHROUGH: 1h frequency + session filter unlocks real intraday alpha.
- london_session_momentum: +3.28%/month, 629 trades
- Top-3 combo: +3.17%/month, -1.1% DD, 45.5% annual
- RiskMgmt-safe up to 5x: worst day -1.08% (limit -5%)
- 3x leverage → +9.8%/month, within reach of 10% target
2026-05-11 15:27:29 +02:00
TPTBusiness 15c03df431 feat: inverse factor signal combos — top-3 gives +0.57%/month with -3.7% DD
Key discovery: EUR/USD daily is mean-reverting — inverse momentum factors dominate.
- mom_15min_INV: +0.40%/month (single best)
- Top-3 combo: +0.57%/month, -3.7% DD
- Top-10 combo: +0.46%/month, -4.1% DD
- 196 trades/month — high frequency, low per-trade risk
2026-05-11 14:29:22 +02:00
TPTBusiness 0d9b0916f2 test: 434 deep hypothesis tests across RiskMgmt OOS, Kronos, auto-fixer, factor coder, pipeline, integration
- RiskMgmt OOS: 88 tests (leverage bounds, DD limits, trade counting, MC p-value, daily breach)
- Kronos adapter: 73 tests (OHLCV idempotence, batch/sequential equivalence, forward-fill)
- Auto-fixer: 78 tests (fix idempotence, MultiIndex conversion, fuzzing random patterns)
- Factor coder: 65 tests (FactorTask roundtrip, evaluator invariants, workspace paths)
- QLib pipeline: 61 tests (Metrics, bandit, precision matrices, noise_var)
- Integration: 69 tests (portfolio weights, correlation, RiskMgmt limits, JSON roundtrip)
2026-05-11 00:47:38 +02:00
TPTBusiness 827f80ce2e test: 343 deep hypothesis property-based tests across engine, DB, risk, ground truth, robustness, CV
- Backtest engine: 68 tests (IC symmetry, Sharpe formula, MaxDD bounds, cost monotonicity)
- Results DB: 78 tests (add_factor idempotence, metric roundtrip, sorting, persistence)
- Risk management: 71 tests (correlation PSD, MV weights, RP convergence, threshold checks)
- Ground truth: 44 tests (Sharpe sign, MaxDD, win_rate, signal invariants)
- Robustness: 44 tests (slippage, latency, MC reshuffle, OOS stress, random data)
- Cross-validation: 38 tests (IC ∈ [-1,1], scaling invariance, multi-instrument)
2026-05-10 23:42:46 +02:00
TPTBusiness e4aea618b8 fix: bump axios 1.15.2→1.16.0, postcss 8.4.31→8.5.14 (Dependabot CVEs) 2026-05-10 22:16:09 +02:00
TPTBusiness a469692141 test: 441 deep property-based tests across CoSTEER, workflow, core, LLM utils, and formatting
- costeer_deep: 112 tests (knowledge base, feedback, evaluators, auto-fixer)
- workflow_deep: 84 tests (RDLoop, proposals, traces, hypothesis/pickle)
- core_deep: 74 tests (developer, evaluator, exceptions, experiment, scenario)
- llm_utils_deep: 49 tests (embeddings, APIBackend, edge cases, Unicode/NaN)
- utils_deep: 122 tests (shrink_text, templates, md5_hash, property-based, stress)
2026-05-10 22:14:11 +02:00
TPTBusiness 90690c1675 feat: multi-asset data pipeline, daily strategy generator, ML pipeline
B) Extended EUR/USD: 5,821 bars (2003-2026) via yfinance
C) Multi-asset: DXY, GOLD, SPX, GBPUSD, USDJPY, OIL (up to 24,705 bars since 1927)
   - OIL MR50d: +1.65%/month on 25yr data
   - DXY SMA5/25: +0.35%/month since 1971
   - SPX Mom100d: +0.26%/month since 1927
   - EURUSD RSI21: +0.05%/month (2003-2026)
   Validated strategies work across full history, not just 2020-2026 regime
2026-05-10 20:48:07 +02:00
TPTBusiness 5620ea1b0e feat: Optuna-optimized RF ML pipeline for daily strategies (+0.61%/month)
- 54 features from daily OHLCV (MA, RSI, MACD, ATR, ADX, Bollinger, etc.)
- Random Forest with Optuna TPE hyperparameter tuning (50 trials)
- Walk-forward validation with RiskMgmt backtest
- 5d horizon: OOS Sharpe +47.5, +0.61%/month
- Top features: vol50, sma20_100, sma200, calendar month
2026-05-10 18:45:31 +02:00
TPTBusiness 5b2b2ca9cc chore: remove results/ from git (should be gitignored) 2026-05-10 18:06:45 +02:00
TPTBusiness aa7e046782 feat: 9 additional daily strategies — ensembles, trailing stops, day filters 2026-05-10 18:04:19 +02:00
TPTBusiness 54b8713938 feat: daily strategy generator — grid search SMA/EMA/RSI/MACD/BB (14/55 profitable)
- Systematic grid search on daily EUR/USD data (1,944 bars)
- 14 of 55 strategies OOS-profitable at 2.14 bps
- Best: RSI7(20/80) OOS Sharpe +24.9, SMA10/30 +0.40%/month
- Saves top strategies to results/strategies_daily/
- Proven: daily frequency has real alpha, 1-min is noise
2026-05-10 17:58:25 +02:00
TPTBusiness 630794e00c docs: fix script paths in README after rename 2026-05-09 22:43:55 +02:00
dependabot[bot] 69c148f1f3 chore(deps): Bump pillow from 10.4.0 to 12.2.0 (#58)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.4.0 to 12.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.4.0...12.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-09 22:42:21 +02:00
TPTBusiness a781d003ba test: deep tests for factor_runner (look-ahead fix, IC, dedup) and strategy_builder (combinator, evaluator)
- factor_runner: shift_daily_constant (property-based, 50 inputs), multi-instrument,
  NaN handling, edge cases (2-day, all-same, all-NaN), IC import, safe_float
- strategy_builder: combinator (pairs/triplets, category filtering, empty/single),
  evaluator (cost calc, safe names), builder import
2026-05-09 22:39:22 +02:00
TPTBusiness efd77b434c chore: remaining Predix→NexQuant renames in docs and web 2026-05-09 18:06:51 +02:00
TPTBusiness abca9eb899 fix: add hypothesis to test deps and fix missing imports in deep tests 2026-05-09 18:06:39 +02:00
TPTBusiness 3d38d88248 revert: remove automated release social workflow 2026-05-09 17:54:14 +02:00
TPTBusiness 22c8092f1c feat: auto-post releases to Mastodon and X/Twitter via GitHub Actions 2026-05-09 17:53:11 +02:00
TPTBusiness 21afe878e1 chore: remove accidentally committed binary 2026-05-09 17:49:00 +02:00
TPTBusiness cbe1c52e00 refactor: rename project from Predix to NexQuant
Rename all source files, scripts, tests, documentation, and configuration
from Predix/predix to NexQuant/nexquant across the entire codebase.
2026-05-09 17:48:22 +02:00
TPTBusiness 85b56b8179 docs: update README — Kronos-small, test depth, daemon setup, project structure
- Kronos: auto-integrated into fin_quant, 3 horizons, model size table
- Tests: 1125+ collected (was 134), property-based + fuzzing
- CLI: updated commands, removed outdated Kronos commands
- llama-server: reduced to 18 GPU layers for Kronos co-existence
- Daemon setup: auto-restart commands for fin_quant, autopilot, live trader
- Project structure: scripts/, test/ details, current architecture
2026-05-09 09:39:06 +02:00
TPTBusiness ba7458fba5 test: deep tests for predix_parallel (RunState, env, commands) and continuous_strategies (ML model)
- predix_parallel: 20 tests — RunState elapsed formatting (property-based, 200 inputs),
  status icons, API key loading, round-robin assignment, env building (local +
  openrouter), command building, edge cases
- continuous_strategies: 11 tests — build_ml_model (sufficient/insufficient data,
  OOS rejection, never-crashes property), config validation, style cycling
2026-05-09 08:50:13 +02:00
TPTBusiness 92ddcc47c7 test: deep tests for predix_gen_strategies_real_bt (36 tests)
- _rescale_thresholds: property-based fuzzing (200 random inputs),
  RSI toward-50 logic, small-threshold scaling, syntax preservation
- Factor loading: empty dir, sort by IC, top_n, missing parquet, corrupt JSON
- OHLCV loading: file-not-found, cache reuse
- TeeFile: writes to multiple handles, fileno delegation
- Backtest runner: sandbox execution, syntax error, missing signal
- Acceptance criteria: 7-parameter combinatorial check (daytrading + swing)
- Configuration: style defaults (daytrading vs swing)
2026-05-09 08:41:08 +02:00
TPTBusiness 160ac96130 test: deep property-based + fuzzing tests for backtest, verifier, and autopilot
- test_verify_runtime_deep: hypothesis property tests, fuzzing 1000 random results,
  invariant independence checking, edge cases (NaN, inf, negative trades)
- test_vbt_backtest_deep: property tests (cost monotonicity, signal inversion,
  max_dd invariants), edge cases (1 bar, empty, NaN, inf, mismatched lengths)
- test_autopilot: mocked orchestrator tests (failure recovery, counting logic,
  ensemble building, style cycling, hypothesis property tests)
2026-05-08 23:12:33 +02:00
TPTBusiness e029120090 chore: remove accidentally committed pycache files 2026-05-08 22:47:50 +02:00
TPTBusiness 4d9459a9f9 test: add tests for RDAgentLog debug() and LiteLLMAPIBackend 2026-05-08 22:47:41 +02:00
TPTBusiness f0ac999dbe Revert "feat: prioritize Kronos foundation model factors in strategy selection"
This reverts commit b58fc5622dd08ab81ba890db1896f06f2266fe29.
2026-05-08 18:32:38 +02:00
TPTBusiness 9c91a6938d feat: prioritize Kronos foundation model factors in strategy selection 2026-05-08 18:32:16 +02:00
TPTBusiness 0aea8c7671 fix: restore KronosPredictor instantiation deleted during refactor 2026-05-07 21:52:37 +02:00
TPTBusiness 72e8a4306e feat: support Kronos-small and Kronos-base models, auto-select GPU/CPU 2026-05-07 21:45:28 +02:00
TPTBusiness 669263db37 fix: add missing debug() method to RDAgentLog 2026-05-06 21:25:59 +02:00
TPTBusiness 584bf9d955 feat: integrate Kronos foundation model into fin_quant R&D loop 2026-05-06 16:22:03 +02:00
TPTBusiness d458e39940 fix: prevent LLM retry loop from consecutive assistant message corruption 2026-05-05 18:56:12 +02:00
TPTBusiness e20f3b0ea4 gitignore: add STARRED_REPOS_ANALYSIS.md to internal docs 2026-05-05 16:56:45 +02:00
Trading Prediction Technology 3584aee089 Add Predix data flow architecture diagram
Added a detailed SVG diagram illustrating the Predix data flow architecture, covering the full pipeline from data source to live trading.
2026-05-05 16:44:10 +02:00
TPTBusiness e0c287a575 feat: run Kronos on CPU to avoid GPU conflict with llama-server 2026-05-05 15:29:01 +02:00
TPTBusiness 8a8fb6688a chore: release v1.5.0 — manual release, update manifest and AGENTS.md 2026-05-05 15:10:47 +02:00
dependabot[bot] fddc472e16 chore(deps): Bump axios from 1.15.0 to 1.15.2 in /web (#55)
Bumps [axios](https://github.com/axios/axios) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.15.0...v1.15.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-05 07:22:00 +02:00
TPTBusiness 29ad20914b fix: sync release manifest to v1.4.3 (was diverged at 0.8.0) 2026-05-05 07:21:34 +02:00