Capital gains tax #481
Unanswered
Newtoniano
asked this question in
Q&A
Replies: 1 comment
-
|
I am also looking for this feature, I do not believe it is currently possible. Perhaps a custom fee callback argument could be provided to the backtest to allow any sort of custom fee structure, besides the existing fees & fixed_fees arguments. @polakowo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to consider a strategy's tax drag while calculating its performance. In my country we have a capital gains tax so that every time you sell a stock, if the price you sold it at is higher than what you bought it at, you pay 26% in taxes on the difference, on the profit you made, while there is no tax if you sold at a loss. In other words, 26% of your profit from each trade is gone immediately in taxes right after the trade (not at year end, but every time you sell at a profit). I'd like to take this tax into consideration while running the backtest, so that the total balance of my portfolio is always after-tax, so that every time I re-enter the position in the backtest with 100% of my account balance, the backtest doesn't use money that in reality I wouldn't have in a real world scenario. Is it possible to do this in vectorbt? If yes, how would I do it?
Thanks in advance for your help.
Beta Was this translation helpful? Give feedback.
All reactions