Portfolios allow you to organize your trading into discrete groups. Whenever you're using IQBroker, you're always operating in the context of a portfolio. For manual trading, you will typically use only one portfolio (unless you have accounts with several brokers, in which case you'll have one portfolio per account). But for automated trading, you'll often use multiple portfolios: either to group your trading strategies, or to run your strategies in different modes (backtesting, optimization and live trading).

Use a Separate Portfolio Per Connection

Each portfolio can only connect to one broker account at a time, so if you have multiple accounts you'll want to use a separate portfolio for each one.

Each portfolio can only connect to one data provider at a time, so if you have multiple data providers then you might want to create a separate portfolio for each one (or switch between them as needed).

Using Multiple Portfolios for Manual Trading

Most people use only one portfolio for Manual Trading (or one portfolio per broker account, if you have multiple accounts). However, it is possible to create multiple Manual Trading portfolios, even when using the same broker. In that case, each portfolio can have a different set of Positions and Orders. This may be useful if you want to work separately on different groups of symbols: e.g., one portfolio for Stocks; one for Futures; etc.

Using Multiple Portfolios for Automated Trading

Portfolios provide the biggest benefit when used for automated trading.

Use portfolios to divide your trading strategies into groups, so that related strategies are in the same portfolio. When you run a portfolio in backtesting, optimization or live trading mode, all of the strategies in the portfolio run at the same time, and generate unified performance results. This is much more powerful than running and analyzing each strategy separately, as is commonly done in other programs.

First, having unified performance results provide better information for analyzing a group of strategies (vs. separate results for each strategy).

Second, you can create portfolio level scripts, which have a global understanding of all the strategies in the portfolio. For example, you can create a dynamic allocation script to rebalance the amount of money available to each strategy based on its performance. This is possible because all the strategies run at the same time. Or you can create a risk management script, which modifies the orders made in the strategies using knowledge about the performance of the entire portfolio.

Using multiple portfolios, you can perform several activities at the same time: one portfolio can backtest strategies for research; another portfolio can optimizes a different group of strategies; and a third portfolio can trade live.

Adding and Deleting Portfolios

To create a new portfolio, select from the menu: Portfolios > New Portfolio...

To close a portfolio (without deleting it), click the Close button on its window. If you close the last open portfolio then the IQBroker program itself will shut down.

If you want to exit IQBroker without closing all of the portfolios then select from the menu: Portfolios > Exit.

To delete a portfolio: select from the menu: Portfolios > Open Portfolio... Find your portfolio; right-click it; and select Delete.

Portfolios Show a Limited View

Each portfolio shows only the Positions and Orders that were created in the context of that portfolio. Your broker account may contain additional Positions and Orders, but unless they were created in the current portfolio, they won't be shown in the main Positions and Orders tables.

Once you create an order for a symbol and it gets filled, that symbol starts showing up in the portfolio's Positions table. If you have an existing position for the symbol in your broker account then the portfolio will sync with it and show the full position: i.e., it won't show just the trade that you have made in IQBroker. For example, suppose you have 5 shares of AAPL in your broker account. Then, in IQBroker, you create a new portfolio, and buy 1 share of AAPL. Your portfolio will show a position of 6 shares of AAPL (and not just 1 share of AAPL), because that's your true position in the broker account.

Sometimes you do want to see all of the positions and orders in your broker account, even if they weren't created in the current portfolio. You can view the full state of your broker account in the Brokerage Account Positions and Brokerage Account Orders tabs. These tabs appear under the top-level Positions Tab and Orders Tab.