In this guest post, Alberto Gallini (PhD), Engineering Manager at Prima and former Bloomberg engineer, walks through Open Portfolio, an OpenBB Workspace App built for asset management. He contextualizes how traditional and alternative asset managers approach portfolio construction, then breaks down the specific APIs Open Portfolio exposes for position imputation, holdings evaluation, and performance attribution. After demonstrating each API with concrete examples, Alberto closes with technical details on performance linking algorithms, architectural scalability, and the OpenBB Copilot.
Portfolio Management Context
The financial landscape is broadly divided into managers of Traditional Assets and those focused on Alternative Assets, alongside Family Offices.
Among Traditional Asset Managers are:
- Mutual Fund Managers, who oversee pooled investment vehicles;
- Hedge Fund Managers, who typically employ complex strategies and leverage to target high returns;
- Pension Fund Managers, tasked with investing plan assets to provide employee retirement benefits;
- Endowment Fund Managers, who manage long-term pools of capital to financially support institutions like universities or charities.
The Alternative Asset Managers group includes:
- Private Equity Managers, who invest in private companies using strategies like leveraged buyouts and venture capital;
- Real Estate Managers, who focus on assets such as commercial properties, residential properties, and REITs;
- Infrastructure Fund Managers, who invest in essential projects like roads, bridges, and utilities;
- Commodities Fund Managers, specializing in raw materials such as oil, gas, and precious metals.
Finally, Family Offices are private wealth management firms dedicated exclusively to managing the assets of high-net-worth individuals and their families.
Asset managers, irrespective of their specific focus, employ a variety of strategies and portfolio construction techniques centered around defined parameters.
These parameters include establishing clear Investment Objectives, which cover Return Expectations (the desired rate of return), Time Horizon (the timeframe for goals), and Risk Tolerance (the acceptable level of risk).
A key function is Asset Allocation, which involves:
- Diversification to spread investments across various asset classes like stocks, bonds, real estate, and commodities to mitigate risk
- Asset Class Weighting to set the precise proportion of each asset
- Rebalancing to periodically maintain the target allocation
Finally, they engage in Security Selection using three primary methodologies:
- Fundamental Analysis, which involves scrutinizing a company's financial statements and management quality;
- Technical Analysis, which uses charts and historical data to spot market patterns;
- Quantitative Analysis, which relies on mathematical models and statistical techniques for decision-making.
Once the strategy has been set and assessed, a portfolio enters its daily lifecycle: trading is performed accordingly throughout the day and is settled by the back office at the close of business. The back office's output is then used the next day to reassess the strategy, and the cycle continues.
How OpenBB changes the game
Open Portfolio Solution is an OpenBB Workspace App designed to cover the left side of the portfolio lifecycle.
The current set of exposed APIs comprises the following functions:
- Position Imputation: Converts a set of transactions into a reconciled, daily record of holdings.
- Holdings Evaluation: Assesses a daily portfolio of holdings by computing the position weight, market value, exposure, and leverage.
- Characteristics Indicators: Evaluates fundamental and other indicators at the position level and aggregates them at both the bucket (according to a chosen classification strategy) and total portfolio level.
- Ex-Post Risk Analytics: Evaluates metrics at position and aggregate levels, including the standard deviation of returns, Value-at-Risk (VaR), and tracking error.
- Index Fetching: Fetches the most relevant index constituents and uses their representation as a benchmark for user portfolios.
- Total Return, P&L, and Market-Value charts.
- Brinson Performance Attribution: Evaluates asset allocation and security selection performance. This solution is similar to the most common offerings available in the market.
Open Portfolio: API & use-cases
Impute Position
This API ingests a transaction file and its related field mapping JSON descriptor to create a portfolio of holdings. This portfolio consists of daily snapshots and is associated with a single base currency as the currency of denomination for the entire investment strategy. The API is capable of either creating a brand new portfolio or incrementing an existing one by appending a new set of holdings from a transaction delta.
While this API is exposed via a widget, it is primarily designed for batch processes aimed at daily portfolio creation and incrementation. Key features include:
- Asset Recognition: Identifies assets and stores their tickers by using OpenFigi (via ISIN or BBGID) as the security master.
- Corporate Actions: Reconciles corporate actions using a market data provider (e.g., Yahoo Finance is the default for Equity).
- Custom Data: Allows reading of custom data, such as prices and corporate actions, if provided.
- Data Storage: Stores daily snapshots and transactions in separate files to facilitate better diagnostics and audit processes.
Batches processes can be scheduled to call this API to periodically build/increment user portfolios in a local folder, ftp endpoint or s3 bucket and create a data/lake of portfolio-ready ready to be analyzed and compared with benchmarks.
Index Fetching
This API is designed to create index universes by fetching constituent data from tradingview.com and market data (prices and corporate actions) from Yahoo Finance. Since the data doesn't originate from the official index providers, the performance will not perfectly match the official indexes, which require original membership, weights, and returns. However, it offers a good proxy and allows for accurate historical performance attribution, as it eliminates pricing difference effects by using the same default provider (Yahoo Finance) for both portfolios and indexes.
Below is the Nasdaq Composite Index performance computed bottom-up by Open Portfolio in OpenBB and the top index price performance reported by tradingview.com:
Holdings Evaluation / Characteristics / Ex-Post Risk
This Holdings API delivers a series of portfolio snapshots within a specified time-frame (defined by a start and end date). Each portfolio snapshot is built upon a set of foundational indicators:
- Asset Market Value (at the start and end of the day)
- Asset Exposure
- Weight
Basic Performance and P&L (Profit & Loss) indicators are then computed on top of these. Snapshots can also be enriched with Characteristics fields like P/E, P/CF, Earnings per Share (relying on fundamental data from Yahoo Finance) and ex-post risk analytics, such as standard deviation (std-dev), Value-at-Risk (VaR at 95% or 99% confidence), and tracking error. All computed analytics are then aggregated at the bucket and total portfolio level according to the selected classification rule.
Total Return, P&L and Market-Value
This is a simple yet powerful API designed to compare a portfolio's top-level performance indicators — such as P&L, market value, or returns — against a benchmark over a specified time period. If a classification strategy is applied, the API also returns these values at the bucket level. This tool is highly valuable for understanding:
- How an investment strategy performs relative to an arbitrary benchmark over time:
- The historical performance trend for each bucket defined by the classification strategy:
- How the asset allocation across the investment strategy's buckets changes over time:
- P&L breakdown into income, transaction and total:
and much more …
Performance Attribution
Performance attribution is a critical analytical process aimed at explaining a portfolio's returns relative to a benchmark and identifying the specific sources of excess return (alpha).
Essentially, it is the mathematical process of:
- Disentangling the overall fund return into its component parts.
- Relating those returns to the various risk-taking decisions made by the portfolio manager.
- Quantifying which active investment decisions (e.g., asset allocation or security selection) succeeded and which did not.
In short, performance attribution serves as critical business intelligence by measuring the success or failure of investment decisions based on the underlying risks taken.
Open Portfolio isolates the trading and currency effect and identifies the local currency holding return as excess.
This is a very accurate approach for the Equity and ETF market where this solution is positioned.
The Performance Attribution implementation is based on the Brison methodology which is currently an industry standard exploited by many vendors like Bloomberg PORT, BlackRock Aladdin or Factset.
The Open Portfolio Performance Attribution fundamentally dissects a portfolio's active return (excess return over a benchmark) into the results of two primary, controllable decisions made by the portfolio manager:
Asset Allocation
Asset Allocation is the value added or subtracted by the manager's decision to weigh asset classes or sectors differently from the benchmark. It measures the impact of over-weighting asset classes that subsequently outperform and under-weighting those that subsequently underperform, based only on the benchmark returns of those asset classes.
Security Selection
Security Selection is the value added or subtracted by the manager's decisions within a specific asset class or sector. It measures the impact of holding specific securities that perform better or worse than the return of that asset class's benchmark, weighted by the portfolio's actual exposure to that class.
Leverage
This term measures the impact of derivatives in the portfolio. Their weight is basically removed from asset allocation and separately accounted into a global leverage effect.
The Performance Attribution also provides a trend-analysis mode showing the Attribution effects historically for each bucket (up to the constituents level if such level of transparency is required).
Here is an example of a test portfolio that is quite aligned in terms of asset allocation with the benchmark. The portfolio is outperforming the benchmark in October 2025, and the analysis shows the reason is the investment strategy is picking better stocks in the Technology sector. This is not only reflected by the higher returns of the sector but by the accurately measured security selection effect, computed daily and then linked over time.
Some Notes About Open Portfolio App
Performance Accumulation over time logic
Api like Holdings, Performance Attribution and Totals perform an important operation on the daily performance indicators (P&L and returns): they accumulate the daily values over time. While P&Ls are simply added, the returns are geometrically compounded according to the following:
This is done for both position level returns and bucket/top level returns which are aggregated as
The return components like transaction returns, holding returns, the contribution to returns and all the attribution effects are linked using the Carino Linking approach. The linking algorithms are important to keep the additivity of the return components and attribution effects over time. There are many linking algorithms, we preferred Carino as it is one of the most accurate — even if less intuitive than Menchero during periods of high volatility returns - and at the same time offers good stability on incremental linking (i.e., linking of pre-linked periods).
Performance Transparency
The Holdings API exposes all necessary fields for calculating and reconciling market values, P&Ls, and returns. This comprehensive data set makes it easy to verify all calculations and quickly identify any errors or inconsistencies in the input data, which is particularly useful when processing custom datasets.
Scalability
Thanks to OpenBB's flexible architecture, the Open Portfolio APIs are encapsulated in a portable Docker container that can be instantiated as many times as needed. The Widget that serves the OpenBB dashboards can be bound to different instances to isolate traffic and ensure dedicated computational resources per user, or even per widget. This capability allows you to configure your enterprise environment in a scalable and secure manner, offering access and visibility to resources based on role and responsibility.
Since the Open Portfolio APIs are primarily I/O-bound, this architecture ensures perfect horizontal scalability, guaranteeing no Service Level Agreement (SLA) degradation regardless of the number of terminals enabled to access the APIs.
OpenBB Copilot Integration
All widgets powered by the Open Portfolio API expose assets and indicators in a way that allows the OpenBB Copilot to extract meaningful information on the investment strategy, analyze it, and provide effective summaries and suggestions for tweaking and optimizing the strategy based on historical benchmark trends.
If you want to access the app Alberto has built, feel free to connect with him on LinkedIn or reach out to our team.
OpenBB enables financial institutions to bridge their data with AI by providing the interface to build AI-powered analytics applications, securely and on their terms. Between a BI tool and a terminal, the OpenBB Workspace provides the infrastructure and interface for data visualization and AI-assisted analysis.
Check our Solutions to see other workflow examples.