Back

Multiple Portfolios

How would I go about having two or more portfolios of instruments in the same backtest? I would like to have two different sets of forex pairs and compare their results or switch between them when needed.
Update Backtest








You can add as many securities you like within a single algorithm. We model everything under a single portfolio, so if you needed to keep them separated, that would need to be handled by your code. Just a few questions:
1. Why do you need multiple portfolios?
2. How many symbols per portfolio?
3. Would there be overlap between the portfolios (both have EURUSD, for example)?
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


This is what I am trying to test:
Buy 4 instruments on the first of each month in account 1
Sell same 4 instruments on the first of each month in account 2
After a few days liquidate the failing set and keep the profitable set
liquidate all on the 21st of the month

I guess I could put them all in the same account if the account allows hedging.

Thanks for the replies!
0

The QC infrastructure doesn't currently support position holdings as you've described (holding both long and short at the same time, hedging). This could be accomplished with completely different algorithms, or you could model your portfolio in a 'what if' scenario, and then after a few days make the purchase to the winning set.
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


I am trying a sector rotation to approach my test. Thanks for the comments.
0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed