Release: merge dev into main#403
Merged
Merged
Conversation
Changed trades_average_gain_percentage → average_trade_gain_percentage Changed trades_average_loss_percentage → average_trade_loss_percentage
…cs-keyerror fix: KeyError in trade_metrics_table.py (#352)
Adds a new CCXTTickerDataProvider that handles DataType.TICKER data sources using CCXT's fetch_ticker API. This resolves the 'No data provider found' error when strategies request ticker data. Changes: - New CCXTTickerDataProvider class in infrastructure/data_providers/ccxt.py - Registered as default data provider alongside CCXTOHLCVDataProvider - Exported from all package __init__.py levels - 15 unit tests with mocked CCXT calls Closes #350
Replace the CI-only skip with a fully mocked CCXT exchange so the download test reads from local CSV data in tests/resources/test_data/ohlcv instead of making network calls.
…-data-provider feat: add CCXTTickerDataProvider for TICKER data sources (#350)
…han data timeframe (#396) - Add validation in TradingStrategy.__init__ that compares the strategy's scheduling interval (time_unit * interval) against the smallest OHLCV data source timeframe. Raises OperationalException with a descriptive message if the interval is too fast. - Add 7 tests in tests/app/test_strategy_interval_validation.py covering all edge cases (faster, equal, slower, multiple sources, no sources, non-OHLCV sources, error message content). - Fix test strategies in test_data_completeness.py that had invalid 1-minute intervals with 1-day OHLCV data.
…nterval-faster-than-data-timeframe-396 feat: Warn or prevent scheduling interval faster than data timeframe (#396)
… by ~3x (#397) Bug 1: In create_order_metadata_with_trade_context, the cost variable accumulated across loop iterations but the entire accumulated value was subtracted from each trade's revenue. With N trades, earlier costs were subtracted N times instead of once, systematically understating net_gain. Fix: use per-iteration trade_cost variable. Bug 2: In _create_trade_metadata_with_sell_order_and_trades, net_gain used sell_amount (total sell order) instead of trade_data['amount'] (per-trade portion), overcounting gain per trade when a sell order was split across multiple trades. Fix: use trade_data['amount']. Added 3 regression tests in tests/services/test_trade_service_net_gain.py.
…ests (#331) - Add CSVTickerDataProvider class for ticker data from CSV files - Export CSVTickerDataProvider at all package levels - Add 19 new tests for CSVOHLCVDataProvider (has_data, get_data, backtest, edge cases, symbol/market/timeframe matching) - Add 7 new tests for CSVTickerDataProvider (loading, has_data, get_data, symbol/market/data_type matching, custom identifier) - Add new test data CSV files for backtesting scenarios - Fix test_trade_price_update to use proper data fixtures
…derstatement-397 fix: Portfolio NAV snapshot understates total_net_gain by ~3x (#397)
…-331 Fix CSV OHLCV based tests (#331)
…Is (#334) - tasks.md: Replace fabricated examples with real Task class (time_unit/interval) and @app.task() decorator usage - trades.md: Document actual Trade model attributes (opened_at, open_price, net_gain) and Context methods (get_trade, get_open_trades, add_stop_loss, etc.) - deployment.md: Replace generic Docker/VPS content with real CLI commands (iaf init, iaf deploy-aws-lambda, iaf deploy-azure-function) - Fix bug in app.py add_strategy() using non-existent worker_id instead of strategy_id - Uncomment and fix 2 eventloop tests (test_initialize, test_get_data_sources_for_iteration) - Update BacktestTradeOrderEvaluator constructor for new required params Closes #334
- Fix prism-react-renderer import for Docusaurus 3.x compatibility - Fix sidebar.js: replace missing doc IDs with actual files (data-sources, backtest_data) - tasks.md: add class-level attribute pattern alongside constructor pattern - Add show_docs.sh script for running docs locally (with --build option)
…es-deployment docs: rewrite Tasks, Trades, and Deployment sections with accurate APIs
Includes all dev work since last release: - feat: CSVTickerDataProvider and CCXTTickerDataProvider - feat: scheduling interval vs data timeframe validation - fix: portfolio net_gain accumulation bug - fix: trade_metrics_table KeyError - fix: app.py add_strategy() worker_id bug - docs: rewrite Tasks, Trades, Deployment sections with accurate APIs - fix: Docusaurus config and sidebar for v3 compatibility - tests: eventloop tests uncommented, new test coverage Excludes .squad/, squad workflows, and dev-only tooling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release: dev → main
Merges all dev work into main, excluding squad/CI tooling.
Features
OperationalExceptionwhen strategy interval is faster than data timeframe (Feature request: Warn or prevent scheduling interval faster than data timeframe #396)Bug Fixes
worker_idinstead ofstrategy_id)prism-react-rendererimport for Docusaurus 3.xDocumentation
TaskAPI (time_unit/interval,@app.task()decorator, class-level attributes)Trademodel and all Context methodsiaf init,iaf deploy-aws-lambda,iaf deploy-azure-function)Tests
Excluded from this PR
.squad/files (dev-only team config)squad.config.tsshow_docs.sh