How to phase out of a position with take profits levels? #563
Unanswered
IntergalacticWaffle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, thanks for creating this library or anyone else that is answering, thanks for the help! I was wondering how to phase out of a position with take profits? Ideally I can keep using vbt.Portfolio.from_signals. I assume this has to be accomplished using: adjust_tp_func_nb=adjust_tp_func_nb, and I have accumulate set to: accumulate="RemoveOnly", which I assume means to remove as in to phase out. I can't figure out how to actually close part of the position though, whenever a tp level is hit. I have started the tp function below. I anticipate another issue being the tp levels being hit over and over before the next level is hit if that makes any sense. If you could please provide any code or if there is an easy way to accomplish this that I am missing, it would be really appreciated for some information regarding my issue. Thanks again! @polakowo
Beta Was this translation helpful? Give feedback.
All reactions