Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Passing and manipulating portfolios of assets #531

Unanswered
asemic-horizon asked this question in Q&A
Discussion options

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.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /