Commit Graph

94 Commits

Author SHA1 Message Date
21in7
6ae0f9d81b fix: MLXFilter fit/predict에 nan-safe 정규화 적용 (nanmean + nan_to_num)
Made-with: Cursor
2026-03-01 23:53:49 +09:00
21in7
820d8e0213 refactor: 분모 연산을 1e-8 epsilon 패턴으로 통일
Made-with: Cursor
2026-03-01 23:52:59 +09:00
21in7
417b8e3c6a feat: OI/펀딩비 결측 구간을 np.nan으로 마스킹 (0.0 → nan)
Made-with: Cursor
2026-03-01 23:52:19 +09:00
21in7
3b7ee3e890 chore: .worktrees/ gitignore에 추가
Made-with: Cursor
2026-03-01 23:50:18 +09:00
21in7
24d3ba9411 feat: enhance data fetching and model training with OI and funding rate integration
- Updated `fetch_history.py` to collect open interest (OI) and funding rate data from Binance, improving the dataset for model training.
- Modified `train_and_deploy.sh` to include options for OI and funding rate collection during data fetching.
- Enhanced `dataset_builder.py` to incorporate OI change and funding rate features with rolling z-score normalization.
- Updated training logs to reflect new metrics and features, ensuring comprehensive tracking of model performance.
- Adjusted feature columns in `ml_features.py` to include OI and funding rate for improved model robustness.
2026-03-01 22:25:38 +09:00
21in7
4245d7cdbf feat: implement 15-minute timeframe upgrade for model training and data processing
- Introduced a new markdown document detailing the plan to transition the entire pipeline from a 1-minute to a 15-minute timeframe, aiming to improve model AUC from 0.49-0.50 to over 0.53.
- Updated key parameters across multiple scripts, including `LOOKAHEAD` adjustments and default data paths to reflect the new 15-minute interval.
- Modified data fetching and training scripts to ensure compatibility with the new timeframe, including changes in `fetch_history.py`, `train_model.py`, and `train_and_deploy.sh`.
- Enhanced the bot's data stream configuration to operate on a 15-minute interval, ensuring real-time data processing aligns with the new model training strategy.
- Updated training logs to capture new model performance metrics under the revised timeframe.
2026-03-01 22:16:15 +09:00
21in7
a6697e7cca feat: implement LightGBM model improvement plan with feature normalization and walk-forward validation
- Added a new markdown document outlining the plan to enhance the LightGBM model's AUC from 0.54 to 0.57+ through feature normalization, strong time weighting, and walk-forward validation.
- Implemented rolling z-score normalization for absolute value features in `src/dataset_builder.py` to improve model robustness against regime changes.
- Introduced a walk-forward validation function in `scripts/train_model.py` to accurately measure future prediction performance.
- Updated training log to include new model performance metrics and added ONNX model export functionality for compatibility.
- Adjusted model training parameters for better performance and included detailed validation results in the training log.
2026-03-01 22:02:32 +09:00
21in7
c6428af64e feat: enhance Jenkins pipeline with Discord notifications and model hot-reload functionality
- Added a new stage to the Jenkins pipeline to notify Discord when a build starts, succeeds, or fails, improving communication during the CI/CD process.
- Implemented model hot-reload functionality in the MLFilter class, allowing automatic reloading of models when file changes are detected, enhancing responsiveness to updates.
- Updated deployment scripts to provide clearer messaging regarding model loading and container status, improving user experience and debugging capabilities.
2026-03-01 21:46:36 +09:00
21in7
d9238afaf9 feat: enhance MLX model training with combined data handling
- Introduced a new function `_split_combined` to separate XRP, BTC, and ETH data from a combined DataFrame.
- Updated `train_mlx` to utilize the new function, improving data management and feature handling.
- Adjusted dataset generation to accommodate BTC and ETH features, with warnings for missing features.
- Changed default data path in `train_mlx` and `train_model` to point to the combined dataset for consistency.
- Increased `LOOKAHEAD` from 60 to 90 and adjusted `ATR_TP_MULT` for better model performance.
2026-03-01 21:43:27 +09:00
21in7
db144750a3 feat: enhance model training and deployment scripts with time-weighted sampling
- Updated `train_model.py` and `train_mlx_model.py` to include a time weight decay parameter for improved sample weighting during training.
- Modified dataset generation to incorporate sample weights based on time decay, enhancing model performance.
- Adjusted deployment scripts to support new backend options and improved error handling for model file transfers.
- Added new entries to the training log for better tracking of model performance metrics over time.
- Included ONNX model export functionality in the MLX filter for compatibility with Linux servers.
2026-03-01 21:25:06 +09:00
21in7
301457ce57 chore: remove unused risk_per_trade references
Made-with: Cursor
2026-03-01 20:39:26 +09:00
21in7
ab580b18af feat: apply dynamic margin ratio in bot position sizing
Made-with: Cursor
2026-03-01 20:39:07 +09:00
21in7
795689ac49 feat: replace risk_per_trade with margin_ratio in calculate_quantity
Made-with: Cursor
2026-03-01 20:38:18 +09:00
21in7
fe9690698a feat: add get_dynamic_margin_ratio to RiskManager
Made-with: Cursor
2026-03-01 20:37:46 +09:00
21in7
95abac53a8 feat: add dynamic margin ratio config params
Made-with: Cursor
2026-03-01 20:37:04 +09:00
21in7
ac84fafbd0 feat: update Jenkinsfile for improved CI/CD process
- Renamed stages for clarity, changing 'Checkout' to 'Git Clone from Gitea' and 'Build Image' to 'Build Docker Image'.
- Updated Git checkout step to use specific branch and credentials for Gitea.
- Enhanced Docker login process with `withCredentials` for better security.
- Added a new stage for deploying to production LXC, including SSH commands for directory creation and Docker management.
- Updated success and failure messages to include Korean language support for better localization.
2026-03-01 19:51:17 +09:00
21in7
94d8cb352e docs: update README to include a motivational message for users
- Added a new line in the README encouraging users with a motivational phrase: "성투기원합니다." (Wishing you successful investments).
2026-03-01 19:37:16 +09:00
21in7
d1af736bfc feat: implement BTC/ETH correlation features for improved model accuracy
- Added a new design document outlining the integration of BTC/ETH candle data as additional features in the XRP ML filter, enhancing prediction accuracy.
- Introduced `MultiSymbolStream` for combined WebSocket data retrieval of XRP, BTC, and ETH.
- Expanded feature set from 13 to 21 by including 8 new BTC/ETH-related features.
- Updated various scripts and modules to support the new feature set and data handling.
- Enhanced training and deployment scripts to accommodate the new dataset structure.

This commit lays the groundwork for improved model performance by leveraging the correlation between BTC and ETH with XRP.
2026-03-01 19:30:17 +09:00
21in7
c4062c39d3 feat: add duplicate training log entry for model evaluation
- Added a new entry to the training log for the LightGBM model, including date, AUC, sample count, and model path.
- This entry mirrors an existing one, potentially for tracking model performance over time.
2026-03-01 18:55:26 +09:00
21in7
6e73df196c chore: exclude mlx from container requirements (Apple Silicon only)
Made-with: Cursor
2026-03-01 18:54:38 +09:00
21in7
de933b97cc feat: remove in-container retraining, training is now mac-only
Made-with: Cursor
2026-03-01 18:54:00 +09:00
21in7
fd96055e73 perf: replace generate_dataset with vectorized version in train_mlx_model
Made-with: Cursor
2026-03-01 18:53:21 +09:00
21in7
db134c032a perf: replace generate_dataset with vectorized version in train_model
Made-with: Cursor
2026-03-01 18:52:56 +09:00
21in7
e1560f882b feat: add vectorized dataset builder (1x pandas_ta call)
Made-with: Cursor
2026-03-01 18:52:34 +09:00
21in7
8f834a1890 feat: implement training and deployment pipeline for LightGBM model on Mac to LXC
- Added comprehensive plans for training a LightGBM model on M4 Mac Mini and deploying it to an LXC container.
- Created scripts for model training, deployment, and a full pipeline execution.
- Enhanced model transfer with error handling and logging for better tracking.
- Introduced profiling for training time analysis and dataset generation optimization.

Made-with: Cursor
2026-03-01 18:30:01 +09:00
21in7
298d4ad95e feat: enhance train_model.py to dynamically determine CPU count for parallel processing
- Added a new function to accurately retrieve the number of allocated CPUs in containerized environments, improving parallel processing efficiency.
- Updated the dataset generation function to utilize the new CPU count function, ensuring optimal resource usage during model training.

Made-with: Cursor
2026-03-01 17:46:40 +09:00
21in7
b86c88a8d6 feat: add README and enhance scripts for data fetching and model training
- Created README.md to document project features, structure, and setup instructions.
- Updated fetch_history.py to include path adjustments for module imports.
- Enhanced train_model.py for parallel processing of dataset generation and added command-line argument for specifying worker count.

Made-with: Cursor
2026-03-01 17:42:12 +09:00
21in7
7e4e9315c2 feat: implement ML filter with LightGBM for trading signal validation
- Added MLFilter class to load and evaluate LightGBM model for trading signals.
- Introduced retraining mechanism to update the model daily based on new data.
- Created feature engineering and label building utilities for model training.
- Updated bot logic to incorporate ML filter for signal validation.
- Added scripts for data fetching and model training.

Made-with: Cursor
2026-03-01 17:07:18 +09:00
21in7
ce57479b93 ci: Jenkins pipeline + Gitea registry CI/CD 설정
- Jenkinsfile 추가: Declarative Pipeline으로 빌드/push/cleanup 단계 구성
- docker-compose.yml 수정: build: . → Gitea Container Registry 이미지 참조

Made-with: Cursor
2026-03-01 16:31:34 +09:00
21in7
86904dddf7 fix: upgrade to Python 3.12 to support pandas-ta>=0.4.67b0
Made-with: Cursor
2026-03-01 16:14:03 +09:00
21in7
60b32a978e chore: add Dockerfile, docker-compose.yml, .dockerignore
Made-with: Cursor
2026-03-01 16:07:20 +09:00
21in7
3d05806155 feat: Discord 알림, 포지션 복구, 설정 개선 및 docs 추가
Made-with: Cursor
2026-03-01 15:57:08 +09:00
21in7
117fd9e6bc fix: AsyncClient.futures_klines await 누락 수정
Made-with: Cursor
2026-03-01 13:04:02 +09:00
21in7
4940de16fc feat: 봇 시작 시 과거 캔들 200개 프리로드 (즉시 신호 계산 가능)
Made-with: Cursor
2026-03-01 13:02:42 +09:00
21in7
8e5ec82244 fix: BinanceSocketManager 메서드명 수정 (futures_kline_socket → kline_futures_socket)
Made-with: Cursor
2026-03-01 12:56:53 +09:00
21in7
a90618896d feat: 엔트리포인트 및 로깅 설정 완료, 테스트 mock 개선
Made-with: Cursor
2026-03-01 12:54:21 +09:00
21in7
726e9cfd65 feat: TradingBot 메인 루프 구현 (진입/청산/손절/익절)
Made-with: Cursor
2026-03-01 12:53:40 +09:00
21in7
69b5675bfd feat: WebSocket 실시간 캔들 스트림 구현
Made-with: Cursor
2026-03-01 12:52:40 +09:00
21in7
4bab4cdba3 feat: 리스크 매니저 구현 (일일 손실 한도, 포지션 수 제한)
Made-with: Cursor
2026-03-01 12:52:05 +09:00
21in7
8bbf376425 feat: Notion 거래 이력 저장 모듈 구현
Made-with: Cursor
2026-03-01 12:51:27 +09:00
21in7
7a3dde2146 feat: 복합 기술 지표 모듈 구현 (RSI/MACD/BB/EMA/ATR/StochRSI)
Made-with: Cursor
2026-03-01 12:50:51 +09:00
21in7
b1a7632bbe feat: BinanceFuturesClient 구현
Made-with: Cursor
2026-03-01 12:49:26 +09:00
21in7
81b7a7f714 feat: Config 모듈 추가 (Notion 연동 포함)
Made-with: Cursor
2026-03-01 12:48:34 +09:00
21in7
60b0e01a01 chore: 프로젝트 초기 설정 및 의존성 추가
Made-with: Cursor
2026-03-01 12:48:03 +09:00