Passing and manipulating portfolios of assets #531
Unanswered
asemic-horizon
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
-
This may be me that didn't RTFM all the way, but I'm not finding what I need and maybe I need another ancillary library.
Suppose I have a portfolio defined as (asset, position) pairs. Position is possibly negative i.e. short. Suppose also that I know the fundamental value V of this portfolio, and the strategy is just "buy at V-eps, sell at V+eps". I don't know how to represent this strategy, nor what data structure should I feed backtesting.py to test it.
As a stretch goal -- assume this portfolio is adaptive (but not through buy/sell; when the portfolio weights change, we just wait out the opportunity to close our previous position completely). Is there anything in backtesting.py that can help manage this?
Please tell me RTFM if I just need to buckle up and read every single tutorial squinting harder at the code samples.
Beta Was this translation helpful? Give feedback.
All reactions