29 Commits

Author SHA1 Message Date
zwitschi dc99f1604e Refactor code for improved readability and consistency
CI / lint-test-build (push) Successful in 54s
- Cleaned up multiline statements and removed unnecessary line breaks in various files.
- Ensured consistent formatting in function definitions and calls across the codebase.
- Updated docstrings and comments for clarity where applicable.
- Removed trailing newlines in module docstrings.
- Enhanced logging statements for better clarity in maintenance tasks.
2026-06-07 21:59:09 +02:00
zwitschi af0ac94a12 refactor: update tests to use async mocks and improve readability
CI / lint-test-build (push) Failing after 12s
2026-06-07 15:05:42 +02:00
zwitschi ef22e217c7 feat: update environment configuration and improve repository handling
CI / lint-test-build (push) Failing after 11s
- Added PG_PASSWORD to .env.example for database connection.
- Removed unnecessary imports and streamlined code in various modules.
- Enhanced error handling in ConfigSettingRepository and ConfigPairingRepository.
- Updated test files to remove unused imports and improve clarity.
2026-06-07 14:50:55 +02:00
zwitschi 529ff967cc Add integration tests for execution persistence, metrics, and opportunity writing
CI / lint-test-build (push) Failing after 1m23s
- Implemented integration tests for the execution writer to ensure trade orders and PnL are persisted correctly.
- Created integration tests for the metrics calculator to summarize execution data accurately.
- Added integration tests for the opportunity writer to verify event persistence.
- Established PostgreSQL schema validation tests to ensure all expected tables, columns, and constraints exist.
- Removed outdated unit tests that relied on DuckDB and replaced them with tests using PgStore.
2026-06-07 14:37:53 +02:00
zwitschi 44da9220d6 refactor: improve code formatting and readability in test files
CI / lint-test-build (push) Failing after 1m13s
2026-06-04 20:42:58 +02:00
zwitschi df59f5ad7c feat: enhance mock database store with context manager support and improve cursor behavior
CI / lint-test-build (push) Failing after 52s
2026-06-04 20:28:06 +02:00
zwitschi 170f59eb89 refactor: improve SQL query formatting and enhance readability across multiple files
CI / lint-test-build (push) Failing after 56s
2026-06-04 20:16:58 +02:00
zwitschi 8ceca2a7e4 feat: improve SQL query formatting and add type hints for better clarity
CI / lint-test-build (push) Failing after 53s
2026-06-04 19:53:32 +02:00
zwitschi c8e3daeb57 Refactor code for improved readability and consistency
CI / lint-test-build (push) Failing after 12s
- Consolidated multiline string formatting into single-line for SQL queries in multiple files.
- Adjusted argument formatting in function calls for better alignment and readability.
- Removed unnecessary line breaks and improved spacing in various sections of the codebase.
- Updated test cases to maintain consistency in formatting and improve clarity.
2026-06-04 19:04:30 +02:00
zwitschi 00bd2d664d feat: implement comprehensive configuration management system with web interface and database support
CI / lint-test-build (push) Failing after 1m18s
2026-06-02 17:23:58 +02:00
zwitschi 1df4b11aef Add HTML templates for dashboard, metrics, overview, and backtesting
CI / lint-test-build (push) Failing after 1m7s
- Introduced new HTML templates for the dashboard, metrics, overview, and backtesting functionalities.
- Implemented partial templates for metrics, overview, audit, controls, and charts to enhance modularity.
- Updated the Jinja2 template resolution logic to support different deployment environments.
- Added a health check template to display the service status.
- Included a test suite to verify the template resolution logic.
- Updated `pyproject.toml` to include new HTML templates in the package data.
2026-06-02 14:16:42 +02:00
zwitschi 38e1d64437 feat: add backtesting functionality with UI and API endpoints
CI / lint-test-build (push) Successful in 2m31s
- Introduced backtesting page and fragment in the dashboard for running backtests and viewing recent reports.
- Implemented backtest run logic with configuration options including event path, starting balances, trade capital, and fee profiles.
- Added recent backtest reports storage and retrieval.
- Created a new strategy module for statistical arbitrage experiments with validation on configuration parameters.
- Updated settings to include parameters for the statistical arbitrage strategy.
- Enhanced dashboard controls to support the new strategy mode.
- Added unit tests for backtesting functionality and strategy validation.
- Updated templates for backtesting UI integration.
2026-06-02 09:28:22 +02:00
zwitschi f612c8533a feat: Add backtesting parameter sweep support and related functionality 2026-06-02 08:44:10 +02:00
zwitschi 0d1f6961d6 style: Clean up code formatting for improved readability
CI / lint-test-build (push) Failing after 14s
2026-06-01 15:18:01 +02:00
zwitschi d742577484 feat: Add dashboard controls for tradable pairs and strategy configuration 2026-06-01 15:13:05 +02:00
zwitschi 7c86e838fa feat: Add deterministic replay backtesting engine and related documentation
CI / lint-test-build (push) Failing after 14s
2026-06-01 14:57:42 +02:00
zwitschi cc11082ea7 feat: Implement latency profiling and guardrails for performance monitoring
CI / lint-test-build (push) Failing after 19s
- Added synthetic latency profiler scenarios and CLI scripts for baseline generation and regression checks.
- Introduced latency baseline and threshold artifacts for CI enforcement.
- Enhanced CI workflow with latency guardrail checks.
- Updated documentation to include latency profiling commands and performance metrics.
- Added unit tests for latency guardrail evaluation.
2026-06-01 14:47:52 +02:00
zwitschi c17f41aaf8 feat: add audit events and runtime state snapshots to database
- Introduced new tables for audit events and runtime state snapshots in the database schema.
- Created data classes for AuditRecord and RuntimeStateRecord to represent the new entities.
- Implemented AuditRepository and RuntimeStateRepository for inserting and retrieving records.
- Enhanced the dashboard to include an audit trail section, displaying recent audit events.
- Added tests for the new audit repository and runtime lifecycle functionalities.
- Updated settings validation to ensure proper configuration for alerting features.
- Integrated alert notifications across various components, including execution sequencer and loss limits.
2026-06-01 14:18:12 +02:00
zwitschi 24f2b2ed88 feat: Add dashboard charts with interactivity and basic authentication support 2026-06-01 12:28:02 +02:00
zwitschi cde181f343 feat: Enhance dashboard with live overview panel and control features 2026-06-01 12:20:28 +02:00
zwitschi 0c232b7aee feat: Add performance metrics dashboard and metrics calculator 2026-06-01 12:06:04 +02:00
zwitschi 93f4f62d42 feat: Implement idempotency and recovery mechanisms for order execution
- Add IdempotencyKeyFactory for generating unique user references based on execution legs.
- Introduce OrderReconciler to reconcile order statuses with historical data.
- Implement PartialFillRecovery to handle partial fills by canceling orders and placing hedges.
- Create TriangularExecutionSequencer for executing triangular arbitrage strategies.
- Enhance storage with new tables for trades, orders, and PnL events.
- Develop AsyncExecutionWriter for asynchronous writing of execution records to the database.
- Add unit tests for execution persistence, sequencer behavior, fill monitoring, and idempotency checks.
- Update KrakenRestClient to ensure proper payloads for order placement and querying.
2026-06-01 11:59:13 +02:00
zwitschi 240a591a64 Add risk management features: implement KillSwitch and StopConditionsGuard; update settings and tests 2026-06-01 11:22:17 +02:00
zwitschi 45e219d103 Add risk management features: implement loss limits, trade limits, and pre-trade validation; update settings and tests 2026-06-01 11:16:37 +02:00
zwitschi 9d8a8a8a45 Add benchmark detection script and related tests; refactor settings and update project scripts 2026-06-01 11:01:53 +02:00
zwitschi a89886186f Add opportunity detection and storage functionality with async processing
- Introduced OpportunityEvent class for structured opportunity data.
- Enhanced IncrementalCycleDetector to generate opportunities based on updated pairs.
- Implemented AsyncOpportunityWriter for persisting opportunities to the database.
- Updated MarketDataFeed to handle opportunity detection and execution in both paper and live trading modes.
- Added unit tests for opportunity detection and persistence.
2026-06-01 10:59:09 +02:00
zwitschi 652b20274a Add IncrementalCycleDetector and related classes for cycle scoring
- Implement IncrementalCycleDetector for scoring based on updated market data.
- Introduce CycleScore class to encapsulate cycle scoring details.
- Update CurrencyGraph and MarketDataFeed to integrate cycle detection.
- Add unit tests for IncrementalCycleDetector functionality.
2026-06-01 10:36:35 +02:00
zwitschi 7d3071463e Implement Kraken integration with REST and WebSocket clients, add market data handling, and enhance settings configuration 2026-06-01 10:30:58 +02:00
zwitschi f3f369ad6b Add initial project structure with Docker, CI, and FastAPI setup
CI / lint-test-build (push) Failing after 8m23s
- Create Dockerfile and docker-compose.yml for containerization
- Add CI configuration for linting and testing
- Implement FastAPI application with health check routes
- Set up database schema using DuckDB
- Include environment configuration and secrets management
- Add README with project objectives and key features
- Implement logging setup and configuration
- Create initial tests for health route
- Add HTML templates for web interface
2026-06-01 09:15:38 +02:00