-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add a way to include transaction fees #12
Comments
I like it! Probably the best way to accomplish this is to add a What do you think? |
I just started to work on the subject and a question appeared: How do we deduce the commission from a position? I see two solution:
Solution 1This solution have as downside that the amount ordered will never be the one expected. For example if I open a position with 100 BTC with a 10% commission I remove the commission from the order and so I will end up with only 90 BTC inside my position. Solution 2This solution imply to create a new Analysis tool for the commissions and let the people deduce them at the end of the operations. It have as downside that the commission are not taken into account into the positions max amount. For example I have 100 BTC and I want to open a position with 10% commission with all my money. Normally I should be able to open a position for only 90 BTC due to the fact that 10 BTC have been paid for the commission. With the solution 2 the position will be opened with 100 BTC and the 10 BTC for the commission will be paid later. IMHO the solution 2 seems a lot easier to implement and less error prone. |
I currently do it this way : o := techan.Order{ On my trading platform there is a transaction fee of 0,075% I am not 100% sure this is correct, any suggestions here? |
Not sure it needs to be this complicated. The code used to determine when to place an order should figure in the commission before choosing to execute the order. Like, shouldn’t strategy tell your code it is time to buy or sell, then your code double-checks the fees, then if acceptable, do the math to exec the 90 BTC trade? Maybe I’m saying something wrong, but the repo does leave me wanting for more documentation via examples, with comments on every line, and more realistic scenarios. I know this is just a chore, and it’s easier said than done, but needs to be done. |
Hello!
Would it be possible to add a way to include transaction fees into the calculations?
I see two way to do it:
Strategy
interface in order to include it.What do you think of it?
The text was updated successfully, but these errors were encountered: