AI Slop Code RIsk Monitor

ricequant/rqalpha

A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities

13.9 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for ricequant/rqalpha, a Python project with 6,819 GitHub stars. SynthScan examined 60,061 lines of code across 252 source files, recording 710 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 13.9 (Moderate pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

13.9
Adjusted Signal
13.9
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
6.8K
Stars
Python
Language
60.1K
Lines of Code
252
Files
710
Pattern Hits
2026-10-12
Scan Date
0.10
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 31.4/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 445 finding(s).

Hallucinated Dependency & Supply Chain Risk 18.1/100 · LOW

Are imports declared and package/API names verified? 207 finding(s).

Agent Over-Engineering Ratio 26.5/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 278 finding(s).

PR Review Velocity Impact 51.2/100 · HIGH

Which changes need focused human review? 710 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 2HIGH 23MEDIUM 9LOW 676

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 710 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers214 hits · 219 pts
SeverityFileLineSnippetContext
LOWtests/unittest/test_const.py17def test_market_accepts_case_insensitive_values(value, expected):CODE
LOWtests/unittest/test_const.py30def test_market_accepts_case_insensitive_keys(key, expected):CODE
LOWtests/unittest/test_portfolio/test_account.py25def test_get_position_reraises_instrument_not_found_for_unknown_instrument():CODE
LOWtests/unittest/test_models/test_instruments.py72 def test_stock_specific_properties(self):CODE
LOWtests/unittest/test_models/test_instruments.py96 def test_future_specific_properties(self):CODE
LOWtests/unittest/test_models/test_instruments.py106 def test_round_lot_special_cases(self):CODE
LOWtests/unittest/test_models/test_instruments.py117 def test_listing_status_methods(self):CODE
LOWtests/unittest/test_models/test_instruments.py161 def test_call_auction_periods(self):CODE
LOWtests/unittest/test_models/test_instruments.py223 def test_future_continuous_contract_detection(self):CODE
LOWtests/unittest/test_models/test_instruments.py256 def test_contract_multiplier_validation(self):CODE
LOWtests/unittest/test_models/test_instruments.py318 def test_calc_cash_occupation(self, mock_env):CODE
LOW⚡tests/unittest/test_utils/test_price_limits.py26def test_reaches_limit_up_uses_last_tick_band():CODE
LOW⚡tests/unittest/test_utils/test_price_limits.py31def test_reaches_limit_down_uses_last_tick_band():CODE
LOW⚡tests/unittest/test_utils/test_price_limits.py36def test_reaches_limit_dispatches_by_side():CODE
LOW⚡tests/unittest/test_utils/test_price_limits.py43def test_vectorized_limit_helpers_match_scalar_behavior():CODE
LOWtests/unittest/test_utils/test_normalize_dtypes.py17def test_normalize_datetime_unit():CODE
LOW…est/test_data/test_data_proxy/test_instrument_mixin.py66 def test_get_active_instrument_raises_not_found_without_candidate(self):CODE
LOW…est/test_data/test_data_proxy/test_instrument_mixin.py76 def test_get_active_instrument_raises_for_multiple_candidates(self):CODE
LOW…st_auto_update_bundle/test_auto_update_bundle_mixin.py43 def _mock_get_open_auction_info(self, order_book_id, *args, **kwargs):CODE
LOW…st_auto_update_bundle/test_auto_update_bundle_mixin.py52 def _mock_get_open_auction_volume(self, instrument, dt):CODE
LOWtests/unittest/test_apis/test_decorator_typing.py6def test_api_decorators_preserve_signatures(tmp_path):CODE
LOW…/unittest/test_apis/test_require_explicit_expect_df.py19def test_binding_error_keeps_user_exception():CODE
LOW…t_mod/test_sys_transaction_cost/test_etf_commission.py60def test_etf_profile_selection_tax_and_missing_metadata():CODE
LOW…t_mod/test_sys_transaction_cost/test_etf_commission.py81def test_commission_state_handles_etf_profiles_and_preserves_stock_behavior():CODE
LOW…t_mod/test_sys_transaction_cost/test_etf_commission.py101def test_batch_estimate_uses_each_etf_profile():CODE
LOW…t_mod/test_sys_transaction_cost/test_etf_commission.py133def test_smart_portfolio_uses_etf_decider_only_for_etfs():CODE
LOW…t_mod/test_sys_transaction_cost/test_etf_commission.py198def test_etf_config_resolves_inheritance_per_field():CODE
LOW…t_mod/test_sys_transaction_cost/test_etf_commission.py220def test_invalid_etf_configs_are_rejected():CODE
LOWtests/unittest/test_mod/test_sys_risk/test_mod.py31def test_warns_when_partial_fill_is_enabled_without_cash_validation(monkeypatch):CODE
LOWtests/unittest/test_mod/test_sys_risk/test_mod.py54def test_does_not_warn_for_other_cash_validation_configurations(CODE
LOWtests/unittest/test_mod/test_sys_analyser/test_plot.py13def test_open_close_points_with_string_storage(monkeypatch, string_storage):CODE
LOW…nittest/test_mod/test_sys_accounts/test_trade_utils.py9def test_get_amount_from_value_uses_ask_exchange_rate_for_buying_power():CODE
LOW⚡…_api/test_order_target_portfolio_smart_api_unittest.py467def _mock_delisted_dividend_position(environment, order_book_id=DELISTED_ID, dividend=DIVIDEND_RECEIVABLE):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py101def test_order_target_portfolio_smart_base(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py122def test_order_target_portfolio_smart_empty_weights(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py128def test_order_target_portfolio_smart_single_stock(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py143def test_order_target_portfolio_smart_small_weights(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py164def test_order_target_portfolio_smart_negative_weights_error(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py173def test_order_target_portfolio_smart_limit_order(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py201def test_order_target_portfolio_smart_partial_limit_prices_error(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py215def test_order_target_portfolio_smart_nan_limit_price_rejected(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py233def test_order_target_portfolio_smart_custom_valuation_prices(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py254def test_order_target_portfolio_smart_missing_valuation_price_error(environment, on_handle_bar, assert_submitted_orders)CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py269def test_order_target_portfolio_smart_adjust_existing_positions(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py304def test_order_target_portfolio_smart_limit_and_valuation_prices(environment, on_handle_bar, assert_submitted_orders):CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py369def test_order_target_portfolio_smart_allows_limit_down_buy_after_rescale(CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py391def test_order_target_portfolio_smart_keeps_zero_target_out_of_distribution(CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py416def test_order_target_portfolio_smart_does_not_deny_unchanged_limit_up_position(CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py436def test_order_target_portfolio_smart_rejects_prices_in_last_tick_band(CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py483def test_order_target_portfolio_smart_ignores_delisted_zero_quantity_position(CODE
LOW…_api/test_order_target_portfolio_smart_api_unittest.py503def test_order_target_portfolio_smart_does_not_require_valuation_price_for_delisted_position(CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py196def test_bar_matcher_fills_market_order_by_volume_limit_and_cancels_remainder(fake_env):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py217def test_bar_matcher_leaves_non_crossed_limit_order_active(fake_env):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py228def test_matcher_reduces_cash_limited_fill_by_order_step_for_transaction_cost(fake_env):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py252def test_matcher_keeps_affordable_fill_without_cash_clipping(fake_env, monkeypatch):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py279def test_matcher_uses_cash_occupation_to_estimate_cash_limited_fill(fake_env, monkeypatch):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py303def test_matcher_rechecks_only_unfilled_quantity_after_partial_fill(fake_env):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py328def test_bar_matcher_returns_early_on_invalid_price(fake_env):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py339def test_tick_matcher_fills_with_best_counterparty_price(monkeypatch):CODE
LOW…/unittest/test_mod/test_sys_simulation/test_matcher.py360def test_tick_matcher_rejects_invalid_price(monkeypatch):CODE
154 more matches not shown…
Unused Imports200 hits · 200 pts
SeverityFileLineSnippetContext
LOWsetup.py14CODE
LOWtests/unittest/test_models/test_instruments.py13CODE
LOW…est/test_data/test_data_proxy/test_instrument_mixin.py15CODE
LOWtests/integration_tests/test_api/test_api_base.py22CODE
LOWtests/integration_tests/test_api/test_position_queue.py22CODE
LOWtests/integration_tests/test_api/test_config.py22CODE
LOWtests/integration_tests/test_api/test_config.py25CODE
LOWtests/integration_tests/test_api/test_api_stock.py21CODE
LOW…ntegration_tests/test_api/test_share_transformation.py4CODE
LOW…_tests/test_api/mod/sys_accounts/test_margin_stocks.py17CODE
LOW…_tests/test_api/mod/sys_accounts/test_margin_stocks.py47CODE
LOW…ests/test_api/mod/sys_accounts/test_position_models.py18CODE
LOW…mod/sys_accounts/test_futures_settlement_price_type.py17CODE
LOW…_tests/test_api/mod/sys_accounts/test_account_model.py22CODE
LOW…s/test_api/mod/sys_analyser/test_negative_benchmark.py19CODE
LOW…ion_tests/test_api/mod/sys_scheduler/test_scheduler.py20CODE
LOW…tests/test_api/mod/sys_scheduler/test_physical_time.py20CODE
LOW…ests/test_api/mod/sys_simulation/test_signal_broker.py20CODE
LOW…/test_api/mod/sys_simulation/test_simulation_broker.py20CODE
LOW…simulation/test_simulation_event_source_integration.py19CODE
LOW…sts/test_api/mod/sys_simulation/test_management_fee.py20CODE
LOW…mod/sys_transaction_cost/test_commission_multiplier.py17CODE
LOW…ts/integration_tests/test_backtest_results/conftest.py3CODE
LOW…n_tests/test_backtest_results/test_f_mean_reverting.py2CODE
LOW…tion_tests/test_backtest_results/test_f_macd_signal.py5CODE
LOW…integration_tests/test_backtest_results/test_f_macd.py3CODE
LOW…integration_tests/test_backtest_results/test_f_macd.py8CODE
LOWdocs/source/conf.py75CODE
LOWrqalpha/interface.py20CODE
LOWrqalpha/interface.py23CODE
LOWrqalpha/interface.py26CODE
LOWrqalpha/interface.py29CODE
LOWrqalpha/interface.py32CODE
LOWrqalpha/__init__.py21CODE
LOWrqalpha/__init__.py23CODE
LOWrqalpha/__init__.py23CODE
LOWrqalpha/__init__.py24CODE
LOWrqalpha/__init__.py25CODE
LOWrqalpha/__init__.py26CODE
LOWrqalpha/__init__.py27CODE
LOWrqalpha/__init__.py28CODE
LOWrqalpha/__init__.py29CODE
LOWrqalpha/environment.py19CODE
LOWrqalpha/environment.py25CODE
LOWrqalpha/environment.py33CODE
LOWrqalpha/environment.py35CODE
LOWrqalpha/environment.py36CODE
LOWrqalpha/environment.py37CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py38CODE
LOWrqalpha/environment.py40CODE
LOWrqalpha/environment.py41CODE
LOWrqalpha/main.py27CODE
LOWrqalpha/apis/api_base.py17CODE
140 more matches not shown…
Over-Commented Block153 hits · 153 pts
SeverityFileLineSnippetContext
LOWsetup.py1# -*- coding: utf-8 -*-COMMENT
LOWbabel.cfg1# For RQAlphaCOMMENT
LOWtests/unittest/test_portfolio/test_account.py1# -*- coding: utf-8 -*-COMMENT
LOW…/test_data/test_data_proxy/test_trading_dates_mixin.py1# -*- coding: utf-8 -*-COMMENT
LOW…est/test_data/test_data_proxy/test_instrument_mixin.py1# -*- coding: utf-8 -*-COMMENT
LOW…st_auto_update_bundle/test_auto_update_bundle_mixin.py1# -*- coding: utf-8 -*-COMMENT
LOW…od/test_sys_simulation/test_simulation_event_source.py1# -*- coding: utf-8 -*-COMMENT
LOWtests/integration_tests/test_api/test_api_base.py1# -*- coding: utf-8 -*-COMMENT
LOWtests/integration_tests/test_api/test_position_queue.py1# -*- coding: utf-8 -*-COMMENT
LOW…ests/test_api/test_order_target_portfolio_smart_api.py1# -*- coding: utf-8 -*-COMMENT
LOWtests/integration_tests/test_api/test_api_future.py1# -*- coding: utf-8 -*-COMMENT
LOWtests/integration_tests/test_api/test_config.py1# -*- coding: utf-8 -*-COMMENT
LOWtests/integration_tests/test_api/test_api_stock.py1# -*- coding: utf-8 -*-COMMENT
LOW…_tests/test_api/mod/sys_accounts/test_margin_stocks.py1# -*- coding: utf-8 -*-COMMENT
LOW…ests/test_api/mod/sys_accounts/test_position_models.py1# -*- coding: utf-8 -*-COMMENT
LOW…mod/sys_accounts/test_futures_settlement_price_type.py1# -*- coding: utf-8 -*-COMMENT
LOW…_tests/test_api/mod/sys_accounts/test_account_model.py1# -*- coding: utf-8 -*-COMMENT
LOW…s/test_api/mod/sys_analyser/test_negative_benchmark.py1# -*- coding: utf-8 -*-COMMENT
LOW…ion_tests/test_api/mod/sys_scheduler/test_scheduler.py1# -*- coding: utf-8 -*-COMMENT
LOW…tests/test_api/mod/sys_scheduler/test_physical_time.py1# -*- coding: utf-8 -*-COMMENT
LOW…ests/test_api/mod/sys_simulation/test_signal_broker.py1# -*- coding: utf-8 -*-COMMENT
LOW…/test_api/mod/sys_simulation/test_simulation_broker.py1# -*- coding: utf-8 -*-COMMENT
LOW…simulation/test_simulation_event_source_integration.py1# -*- coding: utf-8 -*-COMMENT
LOW…sts/test_api/mod/sys_simulation/test_management_fee.py1# -*- coding: utf-8 -*-COMMENT
LOW…mod/sys_transaction_cost/test_commission_multiplier.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/source/conf.py1#!/usr/bin/env python3COMMENT
LOWdocs/source/conf.py101#COMMENT
LOWdocs/source/conf.py121#COMMENT
LOWdocs/source/conf.py181# html_title = 'rqalpha v1.0'COMMENT
LOWdocs/source/conf.py201html_static_path = ['_static']COMMENT
LOWdocs/source/conf.py221#COMMENT
LOWdocs/source/conf.py241# If true, links to the reST sources are added to the pages.COMMENT
LOWdocs/source/conf.py261COMMENT
LOWrqalpha/interface.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/__init__.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/user_module.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/api.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/environment.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/main.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/__main__.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/const.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/apis/api_base.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/apis/__init__.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/apis/names.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/apis/api_rqdatac.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/apis/api_rqdatac.py201 index_weights('000016.XSHG')COMMENT
LOWrqalpha/apis/api_abstract.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/strategy_universe.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/events.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/events.py61COMMENT
LOWrqalpha/core/events.py101COMMENT
LOWrqalpha/core/events.py121 # settlement()COMMENT
LOWrqalpha/core/__init__.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/strategy.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/global_var.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/strategy_context.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/strategy_loader.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/execution_context.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/core/executor.py1# -*- coding: utf-8 -*-COMMENT
LOWrqalpha/cmds/bundle.py1# -*- coding: utf-8 -*-COMMENT
93 more matches not shown…
Empty Error Handlers18 hits · 90 pts
SeverityFileLineSnippetContext
HIGHtests/integration_tests/test_api/test_api_base.py286except RQInvalidArgument:CODE
HIGHtests/integration_tests/test_api/test_api_base.py167except RQInvalidArgument:CODE
HIGHrqalpha/__init__.py62except SystemExit as e:CODE
HIGHrqalpha/__init__.py148except:CODE
HIGHrqalpha/__init__.py206except:CODE
HIGHrqalpha/core/strategy_context.py49except:CODE
HIGHrqalpha/utils/testing/integration.py135except (ValueError, TypeError):CODE
HIGHrqalpha/utils/testing/integration.py124except (ValueError, TypeError):CODE
HIGHrqalpha/utils/testing/integration.py92except (ValueError, TypeError):CODE
HIGHrqalpha/utils/testing/fixtures.py121except AttributeError:CODE
HIGHrqalpha/portfolio/position.py45except AttributeError:CODE
HIGHrqalpha/data/bundle/daybar.py96except StopIteration:CODE
HIGHrqalpha/mod/utils.py32except ValueError:CODE
HIGHrqalpha/mod/utils.py58except Exception as e:CODE
HIGH…ha/mod/rqalpha_mod_sys_simulation/simulation_broker.py138except ValueError:CODE
HIGHrqalpha/mod/rqalpha_mod_sys_analyser/report/report.py151except:CODE
HIGHrqalpha/mod/rqalpha_mod_sys_accounts/position_model.py490except KeyError:CODE
HIGHrqalpha/mod/rqalpha_mod_sys_accounts/position_model.py194except NotImplementedError:CODE
Deep Nesting70 hits · 70 pts
SeverityFileLineSnippetContext
LOWtests/test_bundle/test_daybar_checker.py40CODE
LOWtests/integration_tests/test_api/test_api_base.py398CODE
LOWtests/integration_tests/test_api/test_api_base.py527CODE
LOWtests/integration_tests/test_api/test_api_base.py411CODE
LOWtests/integration_tests/test_api/test_api_base.py543CODE
LOWtests/integration_tests/test_api/test_position_queue.py48CODE
LOWtests/integration_tests/test_api/test_position_queue.py112CODE
LOWtests/integration_tests/test_api/test_position_queue.py338CODE
LOWtests/integration_tests/test_api/test_position_queue.py56CODE
LOWtests/integration_tests/test_api/test_position_queue.py138CODE
LOWtests/integration_tests/test_api/test_position_queue.py359CODE
LOWtests/integration_tests/test_api/test_portfolio.py83CODE
LOWtests/integration_tests/test_api/test_portfolio.py124CODE
LOWtests/integration_tests/test_api/test_portfolio.py94CODE
LOWtests/integration_tests/test_api/test_portfolio.py133CODE
LOW…_tests/test_api/mod/sys_accounts/test_margin_stocks.py44CODE
LOW…_tests/test_api/mod/sys_accounts/test_margin_stocks.py57CODE
LOW…ests/test_api/mod/sys_accounts/test_position_models.py187CODE
LOW…ests/test_api/mod/sys_accounts/test_position_models.py212CODE
LOW…_tests/test_api/mod/sys_accounts/test_account_model.py81CODE
LOW…_tests/test_api/mod/sys_accounts/test_account_model.py96CODE
LOW…on_tests/test_backtest_results/test_s_turtle_signal.py8CODE
LOW…on_tests/test_backtest_results/test_s_turtle_signal.py46CODE
LOW…tegration_tests/test_backtest_results/test_s_turtle.py8CODE
LOW…tegration_tests/test_backtest_results/test_s_turtle.py45CODE
LOWrqalpha/api.py52CODE
LOWrqalpha/main.py133CODE
LOWrqalpha/main.py267CODE
LOWrqalpha/apis/api_base.py264CODE
LOWrqalpha/apis/api_base.py303CODE
LOWrqalpha/apis/api_base.py563CODE
LOWrqalpha/apis/api_rqdatac.py1279CODE
LOWrqalpha/core/executor.py37CODE
LOWrqalpha/cmds/bundle.py161CODE
LOWrqalpha/cmds/bundle.py185CODE
LOWrqalpha/utils/concurrent.py13CODE
LOWrqalpha/utils/config.py139CODE
LOWrqalpha/utils/config.py227CODE
LOWrqalpha/utils/logger.py76CODE
LOWrqalpha/utils/strategy_loader_help.py21CODE
LOWrqalpha/utils/arg_checker.py83CODE
LOWrqalpha/utils/arg_checker.py114CODE
LOWrqalpha/utils/testing/integration.py82CODE
LOWrqalpha/examples/turtle.py44CODE
LOWrqalpha/model/instrument.py479CODE
LOWrqalpha/portfolio/__init__.py312CODE
LOWrqalpha/portfolio/position.py324CODE
LOWrqalpha/portfolio/account.py191CODE
LOWrqalpha/portfolio/account.py562CODE
LOWrqalpha/data/base_data_source/data_source.py192CODE
LOWrqalpha/data/base_data_source/storages.py127CODE
LOWrqalpha/data/bundle/daybar_checker.py27CODE
LOWrqalpha/data/bundle/__init__.py52CODE
LOWrqalpha/data/bundle/__init__.py247CODE
LOWrqalpha/data/bundle/__init__.py259CODE
LOWrqalpha/data/bundle/daybar.py49CODE
LOWrqalpha/data/bundle/daybar.py111CODE
LOWrqalpha/data/bundle/automatic_update.py54CODE
LOWrqalpha/mod/rqalpha_mod_sys_scheduler/scheduler.py264CODE
LOWrqalpha/mod/rqalpha_mod_sys_scheduler/scheduler.py274CODE
10 more matches not shown…
Excessive Try-Catch Wrapping27 hits · 32 pts
SeverityFileLineSnippetContext
LOWdocs/source/conf.py87except Exception:CODE
LOWrqalpha/api.py61 except Exception as e:CODE
LOWrqalpha/main.py128 except Exception as e:CODE
LOWrqalpha/main.py238 except Exception as e:CODE
LOWrqalpha/core/global_var.py25 except Exception:CODE
LOWrqalpha/core/global_var.py35 except Exception:CODE
LOWrqalpha/core/strategy_context.py159 except Exception as e:CODE
LOWrqalpha/core/strategy_context.py169 except Exception as e:CODE
LOWrqalpha/cmds/bundle.py197 except Exception:CODE
LOWrqalpha/utils/exception.py53 except Exception:CODE
MEDIUMrqalpha/utils/exception.py47def _repr(v):CODE
LOWrqalpha/utils/config.py105 except Exception as e:CODE
MEDIUMrqalpha/utils/config.py90def code_config(config, source_code=None):CODE
LOWrqalpha/utils/package_helper.py25 except Exception as e:CODE
LOWrqalpha/utils/strategy_loader_help.py26 except Exception as e:CODE
LOWrqalpha/utils/strategy_loader_help.py31 except Exception as e1:CODE
MEDIUMrqalpha/utils/strategy_loader_help.py21def compile_strategy(source_code, strategy, scope):CODE
LOWrqalpha/utils/i18n.py53 except Exception as e:CODE
LOWrqalpha/utils/arg_checker.py546 except Exception as e:CODE
MEDIUMrqalpha/utils/arg_checker.py190def _is_number(self, func_name, value):CODE
LOWrqalpha/utils/persisit_helper.py46 except Exception as e:CODE
LOWrqalpha/utils/persisit_helper.py77 except Exception:CODE
LOWrqalpha/model/bar.py369 except Exception as e:CODE
LOWrqalpha/data/bundle/__init__.py407 except Exception as e:CODE
MEDIUMrqalpha/data/bundle/__init__.py404def __call__(self):CODE
LOWrqalpha/mod/__init__.py85 except Exception as e:CODE
LOWrqalpha/mod/utils.py58 except Exception as e:CODE
Cross-Language Confusion5 hits · 20 pts
SeverityFileLineSnippetContext
HIGH…s/test_backtest_results/test_empty_positions_weight.py29 assert positions_weight.index.equals(result["sys_analyser"]["portfolio"].index)CODE
HIGHrqalpha/apis/api_base.py649 Instrument(order_book_id=000001.XSHE, symbol=平安银行, abbrev_symbol=PAYH, listed_date=19910403, de_listed_date=STRING
HIGHrqalpha/apis/api_base.py658 [Instrument(order_book_id=000001.XSHE, symbol=平安银行, abbrev_symbol=PAYH, listed_date=19910403, de_listed_dateSTRING
HIGHrqalpha/core/execution_context.py43 self.push(obj)CODE
HIGHrqalpha/core/execution_context.py66 self.stack.push(self)CODE
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALrqalpha/mod/rqalpha_mod_sys_analyser/mod.py494 "starting_cash": ",".join(f"{t}:{c}" for t, c in self._env.config.base.accounts.items())CODE
CRITICALrqalpha/mod/rqalpha_mod_sys_analyser/mod.py496 for account_type, starting_cash in self._env.config.base.accounts.items():CODE
Decorative Section Separators3 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUM⚡…_api/test_order_target_portfolio_smart_api_unittest.py459# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…_api/test_order_target_portfolio_smart_api_unittest.py461# ---------------------------------------------------------------------------COMMENT
MEDIUMrqalpha/data/instruments_mixin.py128 # ================================================================COMMENT
Modern Structural Boilerplate10 hits · 10 pts
SeverityFileLineSnippetContext
LOWrqalpha/interface.py51 def set_state(self, state: Any) -> None:CODE
LOWrqalpha/__init__.py31__all__ = [CODE
LOWrqalpha/api.py32__all__ = []CODE
LOWrqalpha/utils/logger.py25__all__ = [CODE
LOWrqalpha/utils/testing/__init__.py31__all__ = [CODE
LOWrqalpha/utils/testing/integration.py13__all__ = ['StructuredTextFormat', 'assert_result']CODE
LOW⚡rqalpha/portfolio/account.py542 def set_management_fee_rate(self, rate: float) -> None:CODE
LOWrqalpha/data/bundle/utils.py23def set_sval(value: Synchronized) -> None:CODE
LOWrqalpha/mod/rqalpha_mod_sys_risk/validators/__init__.py23__all__ = [CODE
LOWrqalpha/mod/rqalpha_mod_sys_accounts/api/api_future.py40__all__ = []CODE
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWrqalpha/apis/api_rqdatac.py1468CODE
LOWrqalpha/apis/api_rqdatac.py1449CODE
LOWrqalpha/utils/persisit_helper.py68CODE
LOWrqalpha/examples/data_source/read_csv_as_df.py21CODE
LOWrqalpha/examples/data_source/get_csv_module.py21CODE
LOW…pha/examples/extend_api/rqalpha_mod_extend_api_demo.py54CODE
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdocs/source/conf.py7# This file is execfile()d with the current directory set to itsCOMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWrqalpha/utils/config.py119 # Check if capital_gain_tax_rate is explicitly set;if not,throw a warning.COMMENT