> For the complete documentation index, see [llms.txt](https://docs.optionomega.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optionomega.com/backtesting/portfolios.md).

# Portfolios

### What are Portfolios?

Portfolios are an extremely powerful tool that allows users to run multiple backtests dynamically over a period of time and analyze the aggregate results. This enables simulation of real-world trading, where several strategies are traded concurrently.

If you prefer a video summary, [this may be helpful](https://youtu.be/setuUdiYrFk).

## Setting up a Portfolio

In the web app, select **Portfolios** from the **Test** dropdown.

<figure><img src="/files/K2uXBkXNxRgqHa7Vj2xs" alt=""><figcaption></figcaption></figure>

This opens the main screen to create and manage the portfolio.

<figure><img src="/files/deHjyLTQ4bNffsfFBmOz" alt=""><figcaption></figcaption></figure>

You will at first see fewer options than the backtest creation screen.

Starting funds and a date range are required to be selected. NOTE: the starting funds and date range for the portfolio will OVERRIDE the starting funds and date range for the saved tests (it won’t actually change the saved tests, but for the purposes of the portfolio, it will use the portfolio starting funds and date range).

Note: When running a portfolio, you can override “Close Tests on Completion”, to close any open backtests.

After selecting these two items, the fun part begins!

You will see a list of saved backtests that you can select to include in the portfolio — up to 30 backtests can be run at a time. Note that portfolios are built from saved backtests, so if you want to create one from scratch, you will need to save the backtests that you want to incorporate first.

For users with an abundance of saved backtests, you can filter down the list by searching by the backtest name or by using tags to narrow down the tests, since many users like to run portfolios on a certain type of shared strategy.

The allocation field is critical. Similar to the starting funds, the allocation for the portfolio will OVERRIDE whatever the individual test(s) have as an allocation.

Importantly, the allocation does NOT have to add up to 100%. It can sometimes be more than 100% (depending on the length of tests, etc.). It may often be less than 100% as well.

[This video on portfolio allocation may be helpful.](https://youtu.be/-pj-zXzuSak)

There is now also a choice to cap contracts at the portfolio level.

<figure><img src="/files/DA9VHyRCakjnYm6ju7FH" alt=""><figcaption><p><strong>Max contracts can now be overridden when creating portfolios</strong>, similar to allocation percentage. If allocation and max contracts are both used and they are different amounts, as would normally be the case, whichever is smaller will be the deciding value.</p></figcaption></figure>

To add tests to the portfolio, simply select the checkbox. Once a test has been selected, it will be filled with an arrow, showing the test is part of the portfolio.

<figure><img src="/files/hPEhJqWqqmZxhPa5HXr7" alt=""><figcaption></figcaption></figure>

Once all the desired tests have been selected, it’s time to hit run, just like with a backtest.

## Portfolio Results Screen

<figure><img src="/files/aZCBRnVh5w1VYv8qrKrE" alt=""><figcaption></figcaption></figure>

The portfolio results screen will display many of the same metrics that the [backtest results screen](https://optionomegadocs.com/?docs=docly-documentation/getting-started/backtest-results#displayed-metrics) does:

* **Dates:** The range the test ran.
* **P/L:** Shows the overall profit or loss of the strategy during the time range. Note: Portfolio P/L is net liquidity end of day (EOD); the trade log PnL is closed trades only.
* **CAGR:** The compound annual growth rate of the strategy during the test. CAGR is based upon net liquidity, so it involves open trades.
* **Max Drawdown:** The max drawdown at EOD. If a trade is open, then the EOD value is used for MDD calculations. If the trade closes, then the loss is used for MDD calculations. (Please note: This is different from the max loss column on the trade log, which is intraday).
* **MAR Ratio:** CAGR / MDD
* **Sharpe / Sortino**: The Sharpe Ratio and Sortino Ratio (volatility adjusted risk-free returns) of the portfolio test results.
* **Total Premium**: The total amount of credit or debit.
* **Capture rate:** The % of the trade value that was realized.
* **Starting capital**: The amount of $ at the beginning of the backtest.
* **Ending capital:** The amount of $ at the end of the backtest.

## Portfolio results screen graphs

<figure><img src="/files/VRpC5lucSbGQbigY7epl" alt=""><figcaption></figcaption></figure>

The bottom of the portfolio screen displays two summary graphs. The one on the left graphs net liquidity against the benchmark, and the one on the right graphs the performance and max drawdown of both the portfolio and the benchmark.

The Daily Log and Trade Log columns both function similarly to these columns in backtests. The Strategies tab is unique to portfolios.

<figure><img src="/files/NMX25d3Ku5HcR4sfKqG8" alt=""><figcaption></figcaption></figure>

Selecting strategies will provide a snapshot of which backtests were selected, including the details of the allocation in the portfolio.

The **Daily Log** report is also unique to portfolios. Each column in the daily log summarizes the end-of-day values for the combined total impact of all open and closed trades in the account.

**Net Liquidity:** Account NLV value, includes EOD value of open trades, includes withdrawals, used to calculate P/L and drawdowns

**Current Funds:** Account value not including P/L of open trades, only updated when trades close, includes withdrawals

**Total Withdrawn:** Running total amount withdrawn when using monthly account withdrawal options

**Trading Funds:** Account value not including P/L of open trades, only updated when trades close, does not include withdrawals, used for % account position sizing

**P/L:** P/L at end of day, measured from prior day Net Liquidity

**P/L %:** P/L at end of day measured relative to prior day Net Liquidity

**Drawdown %:** Calculated from the maximum prior Net Liquidity value compared to the current Net Liquidity. Note, if running a PoO (Portfolio of One), you will find the max Drawdown % will match the Max Drawdown on the report page.

## Sharing the Portfolio

Saving a portfolio is easy. It is a similar process to saving a backtest.

<figure><img src="/files/SCUXb2Xaq1HQvhInMErp" alt=""><figcaption></figcaption></figure>

Select the icon next to New Portfolio. This will bring up the Save Portfolio choices. The process works the same as with backtests, including tagging and sharing the portfolio with other OO users.

## Recent Portfolio Runs

Similar to recent runs in a backtest, users can navigate and view recent portfolio runs for quick analysis.

<figure><img src="/files/06ivPdZSTJO0w2U7Yuw5" alt=""><figcaption></figcaption></figure>
