Skip to content

get_holding_position_count 函数添加参数only_stock 让返回持仓数可仅包含股票 - #44

Merged
silver6wings merged 1 commit into
silver6wings:mainfrom
dominicx:patch-28
Sep 8, 2025
Merged

get_holding_position_count 函数添加参数only_stock 让返回持仓数可仅包含股票#44
silver6wings merged 1 commit into
silver6wings:mainfrom
dominicx:patch-28

Conversation

@dominicx

@dominicx dominicx commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

run_xx,py 程序中scan_buy可修改如下来调整仓位计数仅股票,避免etf、逆回购导致的不准确。
if len(selections) > 0:
position_codes = [position.stock_code for position in positions]
position_count = get_holding_position_count(positions, only_stock=True)

run_xx,py 程序中scan_buy可修改如下来调整仓位计数仅股票,避免etf、逆回购导致的不准确。
    if len(selections) > 0:
        position_codes = [position.stock_code for position in positions]
        position_count = get_holding_position_count(positions, only_stock=True)
@silver6wings
silver6wings merged commit efe7551 into silver6wings:main Sep 8, 2025
1 check passed
@dominicx
dominicx deleted the patch-28 branch October 1, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants