-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在 BackTest 的 simulate() 方法中 trade_detail['hold_volume'] 不應該有小數部分 #273
Labels
bug
Something isn't working
Comments
@sakkyoi |
@linsamtw |
sakkyoi
added a commit
to sakkyoi/FinMind
that referenced
this issue
Mar 1, 2024
linsamtw
pushed a commit
to sakkyoi/FinMind
that referenced
this issue
Mar 23, 2024
linsamtw
pushed a commit
that referenced
this issue
Mar 24, 2024
已 release to 1.6.6 version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug (please complete the following information)[清晰簡潔的描述 bug]
當執行完 BackTest 的 simulate() 後,呼叫 BackTest.trade_detail 會報錯:
To Reproduce (please complete the following information)[一步一步說明如何重現 bug]
Steps to reproduce the behavior:
Expected behavior (please complete the following information)[清晰簡潔的描述你預期的結果]
應該要能正常 print 出 backtest_obj.trade_detail
Screenshots[如果方便的話,利用截圖來協助說明你的問題]
None
Desktop (please complete the following information):[提供程式的執行環境]
Additional context[額外的資訊幫助釐清問題]
首先,這個問題如果用 backtest_obj._trade_detail 即可解決,但我認為這是一個不應存在的 bug,因此回報問題。
問題的產生是由於個股資料中,StockEarningsDistribution 欄位可能是一個小數數值。
股票股利畸零股應被直接換算成現金,因此這個值是否要變成整數部分加入 hold_volume,小數部分加入 Profit (實務上還會被扣匯費)
The text was updated successfully, but these errors were encountered: