Skip to content

fix spot settlement price and fix dividend_investment transaction cost#1006

Merged
Cuizi7 merged 5 commits into
developfrom
RQSDK-830
May 19, 2026
Merged

fix spot settlement price and fix dividend_investment transaction cost#1006
Cuizi7 merged 5 commits into
developfrom
RQSDK-830

Conversation

@Lin-Dongzhao
Copy link
Copy Markdown
Collaborator

  1. 修复现货获取 settlement 问题
  2. 分红再投资买入股票时,新增手续费逻辑

Comment thread rqalpha/data/data_proxy.py Outdated
def get_settle_price(self, order_book_id, trading_dt: datetime):
instrument = self.get_active_instrument(order_book_id, trading_dt)
if instrument.type != 'Future':
if instrument.type not in [INSTRUMENT_TYPE.FUTURE, INSTRUMENT_TYPE.SPOT]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

期权

return payable_value - amount * last_price
transaction_cost = estimate_transaction_cost_calculator(self._env, self._instrument, amount, last_price)
if amount * last_price + transaction_cost > payable_value:
amount = round_order_quantity(self._instrument, amount - self._instrument.order_step_size)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

step 一次能保证资金够用么

@coveralls
Copy link
Copy Markdown

coveralls commented May 18, 2026

Coverage Status

Coverage is 68.183%RQSDK-830 into develop. No base build found for develop.

@Cuizi7 Cuizi7 merged commit 96ed040 into develop May 19, 2026
4 of 17 checks passed
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.

4 participants